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

[app-crypt/clevis] Add preliminary support for clevis #909

Closed
wants to merge 17 commits into from

Conversation

krishjainx
Copy link
Contributor

@krishjainx krishjainx commented Jun 13, 2023

[app-crypt/clevis] Add preliminary support for clevis

I've added preliminary support for clevis and included all of its dependencies. On the suggestion of @pothos I am submitting this PR in order to get the image built through GitHub actions so that it can be downloaded later. (currently the bootengine ebuild here is also using the latest commit in krishjainx/bootengine).

Most of the work is already done. Just need to iron out a couple of ends and we should be able to include clevis support!

Testing done

Tested that the required wrappers and binaries are installed and accessible in the initramfs by building and using parameters for instance rd.shell rd.break=pre-pivot

CI: http://jenkins.infra.kinvolk.io:8080/job/container/job/packages_all_arches/2188/cldsv/

@pothos
Copy link
Member

pothos commented Jun 14, 2023

The branch needs a rebase on main for the CI to start.

@github-actions
Copy link

github-actions bot commented Jun 14, 2023

@dongsupark
Copy link
Member

Rebased this PR on main, pushed to https://github.com/flatcar/scripts/tree/krishjainx/add-clevis-krish.
Pushed required changes in bootengine to https://github.com/flatcar/bootengine/tree/krishjainx/add-clevis-krish.

Running Jenkins CI http://jenkins.infra.kinvolk.io:8080/job/container/job/packages_all_arches/2064/cldsv/.

@dongsupark
Copy link
Member

CI failed when building cryptsetup.

!!! Fetched file: cryptsetup-2.6.1.tar.xz VERIFY FAILED!
!!! Reason: Insufficient data for checksum verification
!!! Got:      
!!! Expected: BLAKE2B BLAKE2S MD5 RMD160 SHA1 SHA256 SHA3_256 SHA3_512 SHA512 WHIRLPOOL

You would probably want to regenerate sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/Manifest.

@dongsupark
Copy link
Member

Even after regenerating Manifest of cryptsetup, it does not build, because cryptsetup 2.6 started to require asciidoctor in the SDK for generating man pages.
The Gentoo ebuild does not provide a way to disable asciidoc.
This PR seems to require much more work as expected.
I will stop looking into it.

@krishjainx
Copy link
Contributor Author

I have updated this PR, tested it with a local build, and rebased it on main (no merge conflicts). The updated Gentoo ebuild also enables cryptsetup 2.6 to work without asciidoctor in the SDK container. It seems to be functioning properly now. Thank you, @dongsupark

Copy link
Member

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

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

Thanks for updating the PR.

Why does this PR have the last commit Merge branch 'flatcar:main' into add-clevis-krish?
Could you please rebase or clean up commits to avoid having the merge commit?

See below:

@krishjainx
Copy link
Contributor Author

krishjainx commented Jul 17, 2023 via email

Krish Jain and others added 14 commits July 17, 2023 14:35
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
@dongsupark
Copy link
Member

@dongsupark
Copy link
Member

Good news: amd64 build passed, and managed to run CI tests.

However, there are 2 issues.
First, arm64 build was triggered, and failed to build clevis due to missing keywords.

Second, almost all amd64 tests failed with the following messages.

harness.go:582: Found systemd unit failed to start (clevis-luks-askpass.path - Forward Password Requests to Clevis Directory Watch.) on machine 97d60bce-de3e-4b35-a424-b14e929139ad console

@krishjainx
Copy link
Contributor Author

Note: Our CI tests are run by kola tests of https://github.com/flatcar/mantle/tree/flatcar-master/kola, and their clusters are configured in https://github.com/flatcar/mantle/blob/flatcar-master/platform/machine/qemu/cluster.go. So in theory it is possible to add new options for tpm2 there, looking into this now!

@krishjainx
Copy link
Contributor Author

#1560 was merged and replaces this PR. Good work everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants