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

Fix installation of Gramine DCAP support on Ubuntu #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dimakuv
Copy link
Contributor

@dimakuv dimakuv commented Sep 27, 2024

Description of the changes

Commit 7620ef0 "Add support for SLES 15 SP4" introduced a bug in Dockerfile.common.compile.template. Instead of enabling Gramine DCAP support when the distro name starts with "ubuntu", the commit changed it to exactly equal to "ubuntu". This resulted in Gramine DCAP support always being disabled because template_path(Distro) returned strings like "ubuntu:22.04".

Fixes #213

How to test this PR?

Try any Ubuntu distro.


This change is Reviewable

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @dimakuv)


templates/Dockerfile.common.compile.template line 33 at r1 (raw file):

       --buildtype={{buildtype}} \
       -Ddirect=enabled -Dsgx=enabled \
       {% if template_path(Distro).startswith('ubuntu') %}-Ddcap=enabled{% endif %} \

If it's ubuntu:VER then it should be .startswith('ubuntu:') to match exactly what we want.

Commit 7620ef0 "Add support for SLES 15 SP4" introduced a bug in
`Dockerfile.common.compile.template`. Instead of enabling Gramine DCAP
support when the distro name starts with "ubuntu", the commit changed
it to exactly equal to "ubuntu". This resulted in Gramine DCAP support
always being disabled because `template_path(Distro)` returned strings
like "ubuntu:22.04".

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
@dimakuv dimakuv force-pushed the dimakuv/fix-compile-template-dcap branch from 46170dc to 7fc918a Compare September 27, 2024 10:45
Copy link
Contributor Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @mkow)


templates/Dockerfile.common.compile.template line 33 at r1 (raw file):

Previously, mkow (Michał Kowalczyk) wrote…

If it's ubuntu:VER then it should be .startswith('ubuntu:') to match exactly what we want.

Done.

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (1 more required)

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.

Gramine runtime does not build dcap on debian
2 participants