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

lenses/fstab.aug: Allow comma after the last option #838

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

tupyy
Copy link
Contributor

@tupyy tupyy commented Jul 17, 2024

This PR adds a new lens that allows a comma after the last option:

/dev/mapper/foo-bar / xfs defaults, 0 0

Fixes: #832

Signed-off-by: [email protected]

@rwmjones
Copy link
Contributor

rwmjones commented Jul 17, 2024

Please squash the commits into one (you'll have to force push to your branch).

Also needs a Signed-off-by in the commit message.

Also remove fstab - prefix and either replace it with nothing or with fstab:. See existing commit messages in the project (which are not very consistent, but nothing uses -).

Also add Fixes: line.

@tupyy
Copy link
Contributor Author

tupyy commented Jul 17, 2024

@rwmjones done

@tupyy tupyy changed the title fstab - Allow comma after the last option lenses/fstab.aug: Allow comma after the last option Jul 17, 2024
@rwmjones
Copy link
Contributor

You need to add the Fixes:. Also git commit messages are plain text, so using back ticks is not necessary.

@rwmjones
Copy link
Contributor

Also it should be Signed-off-by, see https://www.kernel.org/doc/html/latest/process/submitting-patches.html

@tupyy
Copy link
Contributor Author

tupyy commented Jul 17, 2024

ptal

@rwmjones
Copy link
Contributor

This looks good now. I also applied it to my local tree and ran the tests and those pass.

This PR adds a new lens that allows a comma after the last option:

/dev/mapper/foo-bar / xfs defaults, 0 0

Fixes: hercules-team#832

Signed-off-by: [email protected]
@georgehansper georgehansper merged commit 5246ef0 into hercules-team:master Jul 18, 2024
rwmjones added a commit to rwmjones/augeas that referenced this pull request Feb 4, 2025
…-team#838)"

A more general fix will follow.

This reverts commit 5246ef0.

Signed-off-by: Richard W.M. Jones <[email protected]>
rwmjones added a commit to rwmjones/augeas that referenced this pull request Feb 4, 2025
Mount allows mount-option fields to be empty (I think it ignores
them), but augeas gave an error.  Allow this to be parsed, preserving
the empty option on write.

Example:
  /dev/mapper/vg00-vartmp /var/tmp xfs rw,,nodev,nosuid,noexec,relatime 0 0

Note this generalises earlier commit 5246ef0 ("lenses/fstab.aug:
Allow comma after the last option (hercules-team#838)") since "," appearing at the
end of the option list is a special case of this.

Fixes: https://issues.redhat.com/browse/RHEL-77279
Fixes: hercules-team#832
Signed-off-by: Richard W.M. Jones <[email protected]>
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.

cannot parse /etc/fstab with trailing "," in the fs_mntops field
3 participants