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

next: lsns: issues with NSFS detection #1318

Closed
t-8ch opened this issue May 24, 2021 · 3 comments
Closed

next: lsns: issues with NSFS detection #1318

t-8ch opened this issue May 24, 2021 · 3 comments

Comments

@t-8ch
Copy link
Member

t-8ch commented May 24, 2021

  1. Meson does not set HAVE_LINUX_NSFS_H
  2. Not all symbols from linux/nsfs.h are guarded with HAVE_LINUX_NSFS_H:
cc -Ilsns.p -I. -I.. -Iinclude -I../include -Ilibblkid -I../libblkid -I../libblkid/src -Ilibsmartcols -I../libsmartcols -I../libsmartcols/src -Ilibmount -I../libmount -I../libmount/src -Ilibfdisk -I../libfdisk -I../libfdisk/src -I../libuuid/src -Isys-utils -I../sys-utils -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -D_GNU_SOURCE -include config.h -fPIE -MD -MQ lsns.p/sys-utils_lsns.c.o -MF lsns.p/sys-utils_lsns.c.o.d -o lsns.p/sys-utils_lsns.c.o -c ../sys-utils/lsns.c
../sys-utils/lsns.c: In function ‘add_namespace_for_nsfd’:
../sys-utils/lsns.c:710:32: error: ‘NS_GET_NSTYPE’ undeclared (first use in this function)
  710 |         clone_type = ioctl(fd, NS_GET_NSTYPE);
      |                                ^~~~~~~~~~~~~
../sys-utils/lsns.c:710:32: note: each undeclared identifier is reported only once for each function it appears in
../sys-utils/lsns.c:717:30: error: ‘NS_GET_USERNS’ undeclared (first use in this function); did you mean ‘F_GET_SEALS’?
  717 |         fd_owner = ioctl(fd, NS_GET_USERNS);
      |                              ^~~~~~~~~~~~~
      |                              F_GET_SEALS
../sys-utils/lsns.c:725:31: error: ‘NS_GET_PARENT’ undeclared (first use in this function); did you mean ‘LSNS_TREE_PARENT’?
  725 |         fd_parent = ioctl(fd, NS_GET_PARENT);
      |                               ^~~~~~~~~~~~~
      |                               LSNS_TREE_PARENT
../sys-utils/lsns.c:734:19: error: ‘NS_GET_OWNER_UID’ undeclared (first use in this function)
  734 |         ioctl(fd, NS_GET_OWNER_UID, &ns->uid_fallback);
      |                   ^~~~~~~~~~~~~~~~
../sys-utils/lsns.c: In function ‘interpolate_missing_namespaces’:
../sys-utils/lsns.c:764:33: error: ‘NS_GET_PARENT’ undeclared (first use in this function); did you mean ‘LSNS_TREE_PARENT’?
  764 |                 [RELA_PARENT] = NS_GET_PARENT,
      |                                 ^~~~~~~~~~~~~
      |                                 LSNS_TREE_PARENT
../sys-utils/lsns.c:765:32: error: ‘NS_GET_USERNS’ undeclared (first use in this function); did you mean ‘F_GET_SEALS’?
  765 |                 [RELA_OWNER] = NS_GET_USERNS
      |                                ^~~~~~~~~~~~~
      |                                F_GET_SEALS
karelzak added a commit that referenced this issue May 26, 2021
Fixes: #1318
Signed-off-by: Karel Zak <kzak@redhat.com>
@karelzak
Copy link
Collaborator

Fixed. I have also added ./tools/compare-buildsys.sh to compare config.h from both build-systems. It's obvious that our meson configuration will require a lot of love in the next releases ;-)

@t-8ch
Copy link
Member Author

t-8ch commented May 26, 2021

Thanks.
One point for that would be to validate that the version listed in meson.build is synchronized with autotools.
(Currently it's out of date)

@karelzak
Copy link
Collaborator

Yes, and also list of header files could be shared and maybe more things, meson also does not care about version-info for shared libs, etc.

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