Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel tag to ROOTFS_VERSION if KERNEL_TAG is provided #4154

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

rucoder
Copy link
Contributor

@rucoder rucoder commented Aug 19, 2024

When building EVE with custome kernel i.e. make KERNEL_TAG=... rootfs version doesn’t take it into account and it may be really confusing especially when building from a tag. E.g. when building from 12.0.3-lts tag EVE version will be set to 12.0.3-lts and so

  • it looks like an official image but it is not
  • if the image is uploaded to cloud the official image with the same tag cannot be uploaded anymore

QUESTION: the only concern I have is a length of version string on cloud side. Is there any limit?

When building EVE with custome kernel i.e. make KERNEL_TAG=... rootfs version doesn’t take it into account
and it may be really confusing especially when building from a tag.
E.g. when building from 12.0.3-lts tag EVE version will be set to 12.0.3-lts and so

- it looks like an official image but it is not
- if the image is uploaded to cloud the official image with the same tag cannot be uploaded anymore

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
@rucoder
Copy link
Contributor Author

rucoder commented Aug 19, 2024

so the longest could try is 0.0.0-rucoder_rootfs-tag-1f6834ec-k-amd64-v6.1.38-generic-8499d2d23df7-mikem-gcc-kvm-amd64 and it works just fine

@@ -107,6 +107,10 @@ endif
# set this to the current tag only if we are building from a tag
ROOTFS_VERSION:=$(if $(findstring snapshot,$(REPO_TAG)),$(EVE_SNAPSHOT_VERSION)-$(REPO_BRANCH)-$(REPO_SHA)$(REPO_DIRTY_TAG)$(DEV_TAG),$(REPO_TAG))

#if KERNEL_TAG is set, append it to the ROOTFS_VERSION but replace docker.io/lfedge/eve-kernel:eve-kernel- part with k-
SHORT_KERNEL_TAG=$(subst docker.io/lfedge/eve-kernel:eve-kernel-,k-,$(KERNEL_TAG))
ROOTFS_VERSION:=$(if $(SHORT_KERNEL_TAG),$(ROOTFS_VERSION)-$(SHORT_KERNEL_TAG),$(ROOTFS_VERSION))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if KERNEL_TAG is unset, then ROOTFS_VERSION is unchanged? I guess this makes sense. Can we document these expected behaviours somewhere (other than reading the Makefile or its comments)? Don't we have a doc somewhere that describes "this is what the version string will be"?

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as soon as we are sure we do not forget to change here, when change branch name here:

KERNEL_BRANCH = eve-kernel-$(ZARCH)-$(KERNEL_VERSION)-$(KERNEL_FLAVOR)

@OhmSpectator OhmSpectator merged commit ad247cf into lf-edge:master Aug 28, 2024
38 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants