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

gadget/install: support for no{exec,dev,suid} mount flags #14737

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

Meulengracht
Copy link
Member

Prerequisite for changing mount flags during install mode for ubuntu-save

@@ -62,16 +62,35 @@ func makeFilesystem(params mkfsParams) error {
return udevTrigger(params.Device)
}

type mntfsParams struct {
Copy link
Member Author

Choose a reason for hiding this comment

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

Normally i'd go for Options instead of Params - but there is precedence for using Params in this file, and I'd rather see consistency.

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.03%. Comparing base (96ea7b0) to head (a928639).
Report is 81 commits behind head on master.

Files with missing lines Patch % Lines
gadget/install/install.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14737      +/-   ##
==========================================
+ Coverage   78.95%   79.03%   +0.08%     
==========================================
  Files        1084     1087       +3     
  Lines      146638   147678    +1040     
==========================================
+ Hits       115773   116718     +945     
- Misses      23667    23730      +63     
- Partials     7198     7230      +32     
Flag Coverage Δ
unittests 79.03% <82.35%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

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

LGTM

Looks good!

Copy link
Contributor

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -400,7 +400,7 @@ func Run(model gadget.Model, gadgetRoot string, kernelSnapInfo *KernelSnapInfo,
if options.Mount && vs.Label != "" && vs.HasFilesystem() {
// fs is taken from gadget, as on disk one might be displayed as
// crypto_LUKS, which is not useful for formatting.
if err := mountFilesystem(fsDevice, vs.LinuxFilesystem(), getMntPointForPart(vs)); err != nil {
if err := mountFilesystem(fsDevice, vs.LinuxFilesystem(), getMntPointForPart(vs), mntfsParams{}); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

how come snap-bootstrap ended up with its own version of mount?

Copy link
Member Author

Choose a reason for hiding this comment

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

even weirder, why do we use systemd-mount in snap-bootstrap and not here

Copy link
Member

@alfonsosanchezbeato alfonsosanchezbeato left a comment

Choose a reason for hiding this comment

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

LGTM

@Meulengracht Meulengracht merged commit eb3064d into canonical:master Nov 19, 2024
50 of 56 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