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

build tag v1.31.1+k3s1 #3

Open
wants to merge 8 commits into
base: mel/v1.31.1+k3s1
Choose a base branch
from

Conversation

nicusorhuhulea
Copy link

@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: Cedric Hombourger <[email protected]>
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 <[email protected]>
@nicusorhuhulea
Copy link
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.

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

Choose a reason for hiding this comment

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

change suffix to ind1

debian/changelog Outdated

* upgrade k3s

-- Industrial OS Team <[email protected]> Mon, 25 Nov 2024 13:46:00 +0200

Choose a reason for hiding this comment

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

update date

Upstream-Contact: Derek Nola <[email protected]>

Files: *
Copyright: 2021 K3s Project Authors

Choose a reason for hiding this comment

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

still valid?

Copy link
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
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

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 <[email protected]>
esac \
fi
@if ! type yq 2>/dev/null ; then \
echo "yq not found, fetching."; \

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
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.

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 - ; \

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

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