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

WARNING: Running the setup command as meson [options] instead of meson setup [options] is ambiguous and deprecated. #103

Open
luzpaz opened this issue Aug 16, 2023 · 3 comments

Comments

@luzpaz
Copy link
Collaborator

luzpaz commented Aug 16, 2023

@furgo16
Copy link
Collaborator

furgo16 commented Feb 6, 2025

This comes from the stub-chown part here:

stub-chown:
plugin: meson
source: $CRAFT_PROJECT_DIR/snap/local/stub-chown
source-type: local
build-packages:
- meson
meson-parameters:
- --prefix=/usr

LD_PRELOAD: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libstubchown.so

I do not understand why it's needed, or if it's still needed. It looks like a stub to bring a modified version of the kernel's chown command. I did not find any references of other snaps doing this.

#include <sys/types.h>
#include <stdio.h>
int chown(const char *pathname,
uid_t owner,
gid_t group)
{
fprintf(stderr, "stub-chown: Stubbed out attempt to chown '%s'\n", pathname);
return 0;
}

@furgo16
Copy link
Collaborator

furgo16 commented Feb 6, 2025

The actual warning comes from how snapcraft's meson plugin invokes meson. It would look like it's calling meson instead of meson setup.

This is how the snap sets up meson's build file. There's not much we can do about that warning here:

project('stub-chown', 'c')
src = 'stub-chown.c'
shared_library('stubchown', src, install : true)

I'm not sure if this would work, but perhaps modifying the meson-parameters in the snapcraft.yaml file?

-   meson-parameters: 
-     - --prefix=/usr 
+   meson-parameters: 
+     - setup --prefix=/usr 

But first we'd need to understand if/why the stub-chown part is needed. We might be able to remove it altogether and reduce the complexity of the snap.

luzpaz added a commit that referenced this issue Feb 10, 2025
luzpaz added a commit that referenced this issue Feb 10, 2025
@furgo16
Copy link
Collaborator

furgo16 commented Feb 26, 2025

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

No branches or pull requests

2 participants