[PATCH] kas: Allow to define custom snapshot date

48 views
Skip to first unread message

Jan Kiszka

unread,
Oct 4, 2024, 6:20:09 AM10/4/24
to isar-users
From: Jan Kiszka <jan.k...@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.k...@siemens.com>
---
kas/opt/Kconfig | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
index 65482e3a..de7700f5 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_TIMESTAMP.
+ 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_TIMESTAMP
+ string "Custom snapshot date"
+ depends on APT_SNAPSHOT_CUSTOM_DATE
+ default "1707606000"

config KAS_INCLUDE_APT_SNAPSHOT
string
--
2.43.0

MOESSBAUER, Felix

unread,
Oct 7, 2024, 3:26:56 AM10/7/24
to isar-...@googlegroups.com, Kiszka, Jan, Heinisch, Alexander
The term "date" might be misleading here, as the value is a unix
timestamp. IIRC Alexander wanted to send a similar patch to specify the
apt snaptshot date in the upstream format (e.g. 20240702T082400Z),
making it easier to read.

Either we rename that here to "Custom timestamp", or we wait for the
patch of Alexander and adapt accordingly.

Felix

> +
> +endchoice
> +
> +config ISAR_APT_SNAPSHOT_TIMESTAMP
> +       string "Custom snapshot date"
> +       depends on APT_SNAPSHOT_CUSTOM_DATE
> +       default "1707606000"
>  
>  config KAS_INCLUDE_APT_SNAPSHOT
>         string
> --
> 2.43.0
>

--
Siemens AG, Technology
Linux Expert Center


Jan Kiszka

unread,
Oct 7, 2024, 5:58:01 AM10/7/24
to Moessbauer, Felix (FT RPD CED OES-DE), isar-...@googlegroups.com, Heinisch, Alexander (T CED SES-AT)
This just exposes an existing isar variable. I can clarify the
description of that string.

I also tried some ad-hoc conversion, but the inline python support of
bitbake is too limited for that (required "import datetime; ..."). We
need some helper in the base class for that.

Jan

Heinisch, Alexander

unread,
Oct 7, 2024, 6:57:53 AM10/7/24
to Kiszka, Jan, MOESSBAUER, Felix, isar-...@googlegroups.com
> > The term "date" might be misleading here, as the value is a unix
> > timestamp. IIRC Alexander wanted to send a similar patch to specify
> > the apt snaptshot date in the upstream format (e.g. 20240702T082400Z),
> > making it easier to read.
> >
> > Either we rename that here to "Custom timestamp", or we wait for the
> > patch of Alexander and adapt accordingly.

Just posted: https://groups.google.com/g/isar-users/c/PzIksFyNDyc

BR Alexander

Jan Kiszka

unread,
Oct 10, 2024, 12:45:39 AM10/10/24
to isar-users, Heinisch, Alexander (T CED SES-AT), Moessbauer, Felix (T CED SES-DE)
From: Jan Kiszka <jan.k...@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.k...@siemens.com>
---

Changes in v2:
- base on ISAR_APT_SNAPSHOT_DATE patch

Depends on https://patchwork.isar-build.org/project/isar/patch/20241007122709.215901...@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"
+
+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"

Heinisch, Alexander

unread,
Oct 10, 2024, 12:26:16 PM10/10/24
to Kiszka, Jan, isar-users, MOESSBAUER, Felix
"Use timestamp of latest git commit"

BR Alexander

Jan Kiszka

unread,
Oct 11, 2024, 1:34:14 AM10/11/24
to isar-users, Heinisch, Alexander (T CED SES-AT), Moessbauer, Felix (T CED SES-DE)
From: Jan Kiszka <jan.k...@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.k...@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"

Uladzimir Bely

unread,
Oct 14, 2024, 1:30:01 PM10/14/24
to Jan Kiszka, isar-users
Applied to next, thanks.

--
Best regards,
Uladzimir.



Reply all
Reply to author
Forward
0 new messages