Skip to content

build tag v1.31.1+k3s1#3

Open
nicusorhuhulea wants to merge 8 commits intoMentorEmbedded:mel/v1.31.1+k3s1from
nicusorhuhulea:indos/v1.31.1+k3s1
Open

build tag v1.31.1+k3s1#3
nicusorhuhulea wants to merge 8 commits intoMentorEmbedded:mel/v1.31.1+k3s1from
nicusorhuhulea:indos/v1.31.1+k3s1

Conversation

@nicusorhuhulea
Copy link
Copy Markdown

@nicusorhuhulea nicusorhuhulea commented Nov 28, 2024

This brings the previous changes from 1.27.1+k3s1 version, some minor fixes regarding the go version and fixing the run time version.

jjmcdn and others added 7 commits November 28, 2024 16:37
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Since go requires GOCACHE be set and the default ($HOME/.go-cache) will
cause a build failure with sbuild, we must ensure that GOCACHE points
somewhere defined and writable during the debuild.  Setting $HOME to
$(CURDIR) is a default solution to this problem for some such packages:

     https://lists.debian.org/debian-mentors/2018/08/msg00003.html

Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
@nicusorhuhulea
Copy link
Copy Markdown
Author

@chombourger we need to re target the MentorEmbedded:mel/v1.31.1+k3s1 to k3s-io@452dbbc
the conflicts should go away. 452dbbc is the last commit for tag v1.31.1+k3s1
Versioning confusing was solved in this PR.

Comment thread debian/changelog Outdated
@@ -0,0 +1,31 @@
k3s (1.31.1+k3s1+mel5) UNRELEASED; urgency=medium
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

change suffix to ind1

Comment thread debian/changelog Outdated

* upgrade k3s

-- Industrial OS Team <industrial-os@edge.siemens.cloud> Mon, 25 Nov 2024 13:46:00 +0200
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

update date

Comment thread debian/copyright
Upstream-Contact: Derek Nola <derek.nola@suse.com>

Files: *
Copyright: 2021 K3s Project Authors
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

still valid?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It was from a ported commit. Seeing this now I believe I should remove it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

reading the docs I don't thing I should remove it. Kept the upstream then added our own for debian/*

@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

* update the go version in order for the k3s.service to start and the
  build to succeed.
* preset DRONE_TAG in order to use the correct tag in the version script
  The official k3s build process is using dapper which we had to disable
  due to debian incompatibilities. DRONE_TAG is used by dapper therefore
  this was missing and the version part was falling back to a derived version
  which does not include the "k3s1" suffix. To ensure the proper versioning
  DRONE_TAG is initialized to the git tag version

Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
Comment thread Makefile
esac \
fi
@if ! type yq 2>/dev/null ; then \
echo "yq not found, fetching."; \
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

could we add yq to Build-Depends in debian/control so we don't need to fetch it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed with your comments until I did the tests and surprisingly there are 2 implementation of 'yq' and debian is not using the one that k3s is using - https://github.com/mikefarah/yq), but instead is using the implementation from https://github.com/kislyuk/yq , hence the error that I'm seeing:
usage: yq [-h] [--yaml-output] [--yaml-roundtrip] [--yaml-output-grammar-version {1.1,1.2}] [--width WIDTH] [--indentless-lists] [--in-place] [--version] [jq_filter] [files ...] yq: error: argument files: can't open '.dependencies[] | select(.name == "golang: upstream version").version': [Errno 2] No such file or directory: '.dependencies[] | select(.name == "golang: upstream version").version'
My understanding is that the debian version is older and not so widely used. I don't think that we should adapt the script for the older version, but instead keep the modern 'yq' that supports the syntax already.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@chombourger , any more updates on this one?

Comment thread Makefile
fi
$(info Checking go version for compatibility.)
@if [ ! -d $(GOROOT) ] ; then \
echo "No go found, fetching compatible version." ; curl -sL https://go.dev/dl/go$(GO_VERSION).linux-$(ARCH).tar.gz | tar -C $$PWD/bin -zxf - ; \
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we shouldn't do this either.
we can pull golang from backports: https://packages.debian.org/bookworm-backports/golang

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

something similar to yq, except that the version of go (1.22.6) needed to build is not available in the debian repository https://packages.debian.org/search?searchon=names&keywords=golang therefore, this was the reason at that time with the decision to pull from the official Go. Probably because k3s is trying to use the latest features and improvements.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

yes k3s is following Go releases to get the latest & greatest. Debian is not by policy. The only solution I can think of is to create a layer like our meta-isar-docker where we would use trixie as a base. We would then have to clear relevant go packages from trixie.

your approach will not work because the newer version of go would not be cleared

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ok, I understand the reason. I will try your proposed solution.

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