public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta: Allow to specify the snapshot date in the upstream format.
@ 2024-10-07 10:47 alexander.heinisch via isar-users
  2024-10-07 11:12 ` 'MOESSBAUER, Felix' via isar-users
  2024-10-07 11:13 ` 'Jan Kiszka' via isar-users
  0 siblings, 2 replies; 8+ messages in thread
From: alexander.heinisch via isar-users @ 2024-10-07 10:47 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, felix.moessbauer, Alexander Heinisch

From: Alexander Heinisch <alexander.heinisch@siemens.com>

Currently, it is only possible to specify a unix timestamp to resolve
the snapshot version used. Since this is not very user friendly, most
downstream projects put comments like `# 20240702T082400Z` next to the
snapshot assignment `ISAR_APT_SNAPSHOT_TIMESTAMP = ...`.

This patch makes it easier for users to specify the snapshot version
in a more natural way by `APT_SNAPSHOT_DATE = 20240702T082400Z`

Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 12f32ff0..125554e1 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -34,7 +34,7 @@ DISTRO_VARS_PREFIX ?= "${@'HOST_' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR
 BOOTSTRAP_DISTRO = "${@d.getVar('HOST_DISTRO' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else 'DISTRO')}"
 BOOTSTRAP_BASE_DISTRO = "${@d.getVar('HOST_BASE_DISTRO' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else 'BASE_DISTRO')}"
 FILESEXTRAPATHS:append = ":${BBPATH}"
-APT_SNAPSHOT_DATE = "${@ get_apt_snapshot_date(d)}"
+APT_SNAPSHOT_DATE ?= "${@ get_apt_snapshot_date(d)}"
 
 inherit deb-dl-dir
 
-- 
2.43.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20241007104713.70373-1-alexander.heinisch%40siemens.com.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] meta: Allow to specify the snapshot date in the upstream format.
  2024-10-07 10:47 [PATCH] meta: Allow to specify the snapshot date in the upstream format alexander.heinisch via isar-users
@ 2024-10-07 11:12 ` 'MOESSBAUER, Felix' via isar-users
  2024-10-07 11:13 ` 'Jan Kiszka' via isar-users
  1 sibling, 0 replies; 8+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2024-10-07 11:12 UTC (permalink / raw)
  To: Heinisch, Alexander, isar-users; +Cc: Kiszka, Jan

On Mon, 2024-10-07 at 12:47 +0200, alexander.heinisch@siemens.com
wrote:
> From: Alexander Heinisch <alexander.heinisch@siemens.com>
> 
> Currently, it is only possible to specify a unix timestamp to resolve
> the snapshot version used. Since this is not very user friendly, most
> downstream projects put comments like `# 20240702T082400Z` next to
> the
> snapshot assignment `ISAR_APT_SNAPSHOT_TIMESTAMP = ...`.
> 
> This patch makes it easier for users to specify the snapshot version
> in a more natural way by `APT_SNAPSHOT_DATE = 20240702T082400Z`

Thanks!

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

> 
> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
> ---
>  meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> index 12f32ff0..125554e1 100644
> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> @@ -34,7 +34,7 @@ DISTRO_VARS_PREFIX ?= "${@'HOST_' if
> bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR
>  BOOTSTRAP_DISTRO = "${@d.getVar('HOST_DISTRO' if
> bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else 'DISTRO')}"
>  BOOTSTRAP_BASE_DISTRO = "${@d.getVar('HOST_BASE_DISTRO' if
> bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else
> 'BASE_DISTRO')}"
>  FILESEXTRAPATHS:append = ":${BBPATH}"
> -APT_SNAPSHOT_DATE = "${@ get_apt_snapshot_date(d)}"
> +APT_SNAPSHOT_DATE ?= "${@ get_apt_snapshot_date(d)}"
>  
>  inherit deb-dl-dir
>  

-- 
Siemens AG, Technology
Linux Expert Center


-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/a2d83639d43565863d6f55a810288d435f9f4153.camel%40siemens.com.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] meta: Allow to specify the snapshot date in the upstream format.
  2024-10-07 10:47 [PATCH] meta: Allow to specify the snapshot date in the upstream format alexander.heinisch via isar-users
  2024-10-07 11:12 ` 'MOESSBAUER, Felix' via isar-users
@ 2024-10-07 11:13 ` 'Jan Kiszka' via isar-users
  2024-10-07 11:21   ` 'Heinisch, Alexander' via isar-users
  1 sibling, 1 reply; 8+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2024-10-07 11:13 UTC (permalink / raw)
  To: alexander.heinisch, isar-users; +Cc: felix.moessbauer

On 07.10.24 12:47, alexander.heinisch@siemens.com wrote:
> From: Alexander Heinisch <alexander.heinisch@siemens.com>
> 
> Currently, it is only possible to specify a unix timestamp to resolve
> the snapshot version used. Since this is not very user friendly, most
> downstream projects put comments like `# 20240702T082400Z` next to the
> snapshot assignment `ISAR_APT_SNAPSHOT_TIMESTAMP = ...`.
> 
> This patch makes it easier for users to specify the snapshot version
> in a more natural way by `APT_SNAPSHOT_DATE = 20240702T082400Z`
> 
> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
> ---
>  meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> index 12f32ff0..125554e1 100644
> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> @@ -34,7 +34,7 @@ DISTRO_VARS_PREFIX ?= "${@'HOST_' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR
>  BOOTSTRAP_DISTRO = "${@d.getVar('HOST_DISTRO' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else 'DISTRO')}"
>  BOOTSTRAP_BASE_DISTRO = "${@d.getVar('HOST_BASE_DISTRO' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else 'BASE_DISTRO')}"
>  FILESEXTRAPATHS:append = ":${BBPATH}"
> -APT_SNAPSHOT_DATE = "${@ get_apt_snapshot_date(d)}"
> +APT_SNAPSHOT_DATE ?= "${@ get_apt_snapshot_date(d)}"
>  

Nicely minimal invasive - but now you should also document this, just
like ISAR_APT_SNAPSHOT_TIMESTAMP. And naming should be aligned.

Jan

>  inherit deb-dl-dir
>  

-- 
Siemens AG, Technology
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/2415fd60-0a9c-46c6-8417-fb92b9776d7f%40siemens.com.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] meta: Allow to specify the snapshot date in the upstream format.
  2024-10-07 11:13 ` 'Jan Kiszka' via isar-users
@ 2024-10-07 11:21   ` 'Heinisch, Alexander' via isar-users
  2024-10-07 11:27     ` 'Jan Kiszka' via isar-users
  0 siblings, 1 reply; 8+ messages in thread
From: 'Heinisch, Alexander' via isar-users @ 2024-10-07 11:21 UTC (permalink / raw)
  To: Kiszka, Jan, isar-users; +Cc: MOESSBAUER, Felix

> Nicely minimal invasive - but now you should also document this, just like > ISAR_APT_SNAPSHOT_TIMESTAMP. And naming should be aligned.

Sure. Just wanted to get feedback early, before spending much time on docs 😊.

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/AM7PR10MB3320D5E5FA48F34EC844D5BF867D2%40AM7PR10MB3320.EURPRD10.PROD.OUTLOOK.COM.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] meta: Allow to specify the snapshot date in the upstream format.
  2024-10-07 11:21   ` 'Heinisch, Alexander' via isar-users
@ 2024-10-07 11:27     ` 'Jan Kiszka' via isar-users
  2024-10-07 11:30       ` 'Heinisch, Alexander' via isar-users
  0 siblings, 1 reply; 8+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2024-10-07 11:27 UTC (permalink / raw)
  To: Heinisch, Alexander (T CED SES-AT), isar-users
  Cc: Moessbauer, Felix (FT RPD CED OES-DE)

On 07.10.24 13:21, Heinisch, Alexander (T CED SES-AT) wrote:
>> Nicely minimal invasive - but now you should also document this, just like > ISAR_APT_SNAPSHOT_TIMESTAMP. And naming should be aligned.
> 
> Sure. Just wanted to get feedback early, before spending much time on docs 😊.

It will definitely help with the kconfig approach, avoid non-working
conversion attempts there.

Let's just rename the var to ISAR_APT_SNAPSHOT_DATE and also clarify in
the doc that to masks ISAR_APT_SNAPSHOT_TIMESTAMP when both are provided.

Jan

-- 
Siemens AG, Technology
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/42653669-5e3a-4591-a6ed-dc4cf687c3cf%40siemens.com.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] meta: Allow to specify the snapshot date in the upstream format.
  2024-10-07 11:27     ` 'Jan Kiszka' via isar-users
@ 2024-10-07 11:30       ` 'Heinisch, Alexander' via isar-users
  0 siblings, 0 replies; 8+ messages in thread
From: 'Heinisch, Alexander' via isar-users @ 2024-10-07 11:30 UTC (permalink / raw)
  To: Kiszka, Jan, isar-users; +Cc: MOESSBAUER, Felix

> It will definitely help with the kconfig approach, avoid non-working conversion attempts there.
>
> Let's just rename the var to ISAR_APT_SNAPSHOT_DATE and also clarify in the doc that to masks ISAR_APT_SNAPSHOT_TIMESTAMP when both are provided.

Renaming APT_SNAPSHOT_DATE makes sense!, also won't break downstream! Will add this.

BR Alexander

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/AM7PR10MB3320CE3F4BD94D0F4A7F293E867D2%40AM7PR10MB3320.EURPRD10.PROD.OUTLOOK.COM.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] meta: Allow to specify the snapshot date in the upstream format.
  2024-10-07 11:27 alexander.heinisch via isar-users
@ 2024-10-07 11:34 ` Anton Mikanovich
  0 siblings, 0 replies; 8+ messages in thread
From: Anton Mikanovich @ 2024-10-07 11:34 UTC (permalink / raw)
  To: alexander.heinisch, isar-users; +Cc: jan.kiszka, felix.moessbauer

07/10/2024 14:27, alexander.heinisch via isar-users wrote:
> From: Alexander Heinisch <alexander.heinisch@siemens.com>
>
> Currently, it is only possible to specify a unix timestamp to resolve
> the snapshot version used. Since this is not very user friendly, most
> downstream projects put comments like `# 20240702T082400Z` next to the
> snapshot assignment `ISAR_APT_SNAPSHOT_TIMESTAMP = ...`.
>
> This patch makes it easier for users to specify the snapshot version
> in a more natural way by `APT_SNAPSHOT_DATE = 20240702T082400Z`
>
> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>

Please mark later patchset versions with v3, v4, etc, to make it easier
to track changes between patchset versions.

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/10485668-2035-48f4-9057-2f7b4250c24c%40ilbers.de.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] meta: Allow to specify the snapshot date in the upstream format.
@ 2024-10-07 11:27 alexander.heinisch via isar-users
  2024-10-07 11:34 ` Anton Mikanovich
  0 siblings, 1 reply; 8+ messages in thread
From: alexander.heinisch via isar-users @ 2024-10-07 11:27 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, felix.moessbauer, Alexander Heinisch

From: Alexander Heinisch <alexander.heinisch@siemens.com>

Currently, it is only possible to specify a unix timestamp to resolve
the snapshot version used. Since this is not very user friendly, most
downstream projects put comments like `# 20240702T082400Z` next to the
snapshot assignment `ISAR_APT_SNAPSHOT_TIMESTAMP = ...`.

This patch makes it easier for users to specify the snapshot version
in a more natural way by `APT_SNAPSHOT_DATE = 20240702T082400Z`

Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
 doc/user_manual.md                                  | 3 ++-
 kas/opt/Kconfig                                     | 2 +-
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/user_manual.md b/doc/user_manual.md
index 706c74bf..bcfea5a0 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -435,7 +435,8 @@ Some other variables include:
  - `ISAR_USE_APT_SNAPSHOT` - Use a frozen apt snapshot instead of the live mirror. Optional.
    `ISAR_APT_DL_LIMIT` - Rate limit the apt fetching to n kB / s. Optional.
  - `DISTRO_APT_SNAPSHOT_PREMIRROR` - Similar to `DISTRO_APT_PREMIRRORS` but for a snapshot, pre-defined for supported distros.
- - `ISAR_APT_SNAPSHOT_TIMESTAMP` - Timestamp of the apt snapshot. Automatically derived from `SOURCE_DATE_EPOCH` if not overwritten.
+ - `ISAR_APT_SNAPSHOT_TIMESTAMP` - Unix timestamp of the apt snapshot. Automatically derived from `SOURCE_DATE_EPOCH` if not overwritten. (Consider `APT_SNAPSHOT_DATE` for a more user friendly format)
+ - `APT_SNAPSHOT_DATE` - Timestamp in upstream format (e.g. `20240702T082400Z`) of the apt snapshot. Automatically derived from `ISAR_APT_SNAPSHOT_TIMESTAMP`
  - `THIRD_PARTY_APT_KEYS` - List of gpg key URIs used to verify apt repos for apt installation after bootstrapping.
  - `FILESEXTRAPATHS` - The default directories BitBake uses when it processes recipes are initially defined by the FILESPATH variable. You can extend FILESPATH variable by using FILESEXTRAPATHS.
  - `FILESOVERRIDES` - A subset of OVERRIDES used by the build system for creating FILESPATH. The FILESOVERRIDES variable uses overrides to automatically extend the FILESPATH variable.
diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
index 65482e3a..802bb1a0 100644
--- a/kas/opt/Kconfig
+++ b/kas/opt/Kconfig
@@ -44,7 +44,7 @@ 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. The date is defined by APT_SNAPSHOT_DATE.
 
 config KAS_INCLUDE_APT_SNAPSHOT
 	string
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 12f32ff0..125554e1 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -34,7 +34,7 @@ DISTRO_VARS_PREFIX ?= "${@'HOST_' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR
 BOOTSTRAP_DISTRO = "${@d.getVar('HOST_DISTRO' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else 'DISTRO')}"
 BOOTSTRAP_BASE_DISTRO = "${@d.getVar('HOST_BASE_DISTRO' if bb.utils.to_boolean(d.getVar('BOOTSTRAP_FOR_HOST')) else 'BASE_DISTRO')}"
 FILESEXTRAPATHS:append = ":${BBPATH}"
-APT_SNAPSHOT_DATE = "${@ get_apt_snapshot_date(d)}"
+APT_SNAPSHOT_DATE ?= "${@ get_apt_snapshot_date(d)}"
 
 inherit deb-dl-dir
 
-- 
2.43.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20241007112745.92905-1-alexander.heinisch%40siemens.com.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-10-07 11:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-07 10:47 [PATCH] meta: Allow to specify the snapshot date in the upstream format alexander.heinisch via isar-users
2024-10-07 11:12 ` 'MOESSBAUER, Felix' via isar-users
2024-10-07 11:13 ` 'Jan Kiszka' via isar-users
2024-10-07 11:21   ` 'Heinisch, Alexander' via isar-users
2024-10-07 11:27     ` 'Jan Kiszka' via isar-users
2024-10-07 11:30       ` 'Heinisch, Alexander' via isar-users
2024-10-07 11:27 alexander.heinisch via isar-users
2024-10-07 11:34 ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox