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

Support older linux headers #253

Merged
merged 3 commits into from
Feb 11, 2024

Conversation

rborn-tx
Copy link
Contributor

@rborn-tx rborn-tx commented Feb 9, 2024

This aims to tackle #252, i.e. allowing the build when macros MOUNT_ATTR_IDMAP and LOOP_CONFIGURE along with related structures are not available in the user API of the Linux kernel.

This is to allow building the software on machines not having the
MOUNT_ATTR_IDMAP macro in header "linux/mount.h". When that macro is not
available, the dependency on struct mount_attr is also eliminated (which
is good since both the macro and the struct were added to the kernel
uapi virtually at the same time).

With the changes in this commit, errors would be thrown at runtime when
mounting the erofs image, but only if the idmap feature is used; this
resembles the behavior when the "new mount API" is not detected.

Signed-off-by: Rogerio Guerra Borin <rogerio.borin@toradex.com>
This is to allow building the software on machines not having the macro
LOOP_CONFIGURE or the struct loop_config in header "linux/loop.h" (both
of which added to the kernel uapi at the same time); the code snippet
providing them was taken from package util-linux, source file
"include/loopdev.h".

Signed-off-by: Rogerio Guerra Borin <rogerio.borin@toradex.com>
@cgwalters
Copy link
Contributor

This looks sane, but...do you mind trying out adding a suitably old build environment in the CI configuration too? Otherwise we're somewhat likely to break this again. You're effectively aiming to define e.g. "Ubuntu Focal" as a baseline. Should be pretty trivial to pull that as a container image and build there right?

@rborn-tx
Copy link
Contributor Author

rborn-tx commented Feb 9, 2024

...do you mind trying out adding a suitably old build environment in the CI configuration too? Otherwise we're somewhat likely to break this again. You're effectively aiming to define e.g. "Ubuntu Focal" as a baseline. Should be pretty trivial to pull that as a container image and build there right?

Sure! I'll do that. Thanks for the feedback.

This is to ensure the software continues to build on (somewhat old)
"Ubuntu Focal"-based distros. At the moment, package "libfsverity-dev"
is not available on that distro, so make its installation optional.

Signed-off-by: Rogerio Guerra Borin <rogerio.borin@toradex.com>
Copy link
Contributor

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@cgwalters cgwalters merged commit 47f6949 into containers:main Feb 11, 2024
10 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.

None yet

2 participants