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

Fixes for GNU/Hurd #614

Merged
merged 6 commits into from
Dec 31, 2023
Merged

Fixes for GNU/Hurd #614

merged 6 commits into from
Dec 31, 2023

Conversation

ametzler
Copy link

Hello,

we have been patching p11-kit on Debian for GNU/Hurd and kfreebsd compatibility for a long time. Find attached the latest iteration of the (small) patchset. kfreebsd-compatibilty is untested nowadays since we have dropped the port on Debian. - Please tell me if I should drop the respective code ("kfreebsd*-gnu |")

cu Andreas

@coveralls
Copy link

coveralls commented Dec 17, 2023

Coverage Status

coverage: 69.447% (-0.002%) from 69.449%
when pulling fc4298f on ametzler:tmp-2023-hurd
into 3f6233d on p11-glue:master.

@ueno
Copy link
Member

ueno commented Dec 18, 2023

Thank you; I see no problem in merging this. One nit: the second commit has an ill-formatted log message "use_libbsd-overlay on GNU/hurd and kfreebsd."; maybe the first "_" should be replaced with a space?

Btw, is Meson available and supposed to work on GNU/Hurd?

@ametzler
Copy link
Author

ueno wrote

Thank you; I see no problem in merging this. One nit: the second commit has an ill-formatted log message "use_libbsd-overlay on GNU/hurd and kfreebsd."; maybe the first "_" should be replaced with a space?

I have force-pushed this change.

Btw, is Meson available and supposed to work on GNU/Hurd?

Yes, it should work. I played a little bit but this seems to need somebody familiar with meson. I did not get beyond

if ['gnu', 'gnu/kfreebsd'].contains(host_system)
  libbsd_overlay = dependency('libbsd-overlay')
endif

and adding this to dependencies: of some targets. Which is not enough. This test

  foreach h : headers
    if cc.has_header(h)
      conf.set('HAVE_' + h.underscorify().to_upper(), 1)
    endif
  endforeach

would also need to use libbsd-overlay's CFLAGS to find its ucred.h

@ueno
Copy link
Member

ueno commented Dec 19, 2023

Afaik has_header also takes dependencies so you can write something like:

  foreach h : headers
    if cc.has_header(h, dependencies: libbsd_overlay)
      conf.set('HAVE_' + h.underscorify().to_upper(), 1)
    endif
  endforeach

Andreas Metzler added 2 commits December 27, 2023 07:52
__libc_enable_secure is not set as 1 when executing something as sgid
and the differet gid is still part of the user's own groups. See also:
- http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00051.html
- http://lists.gnu.org/archive/html/bug-hurd/2015-07/msg00000.html

Originally contributed to Debian by Pino Toscano <[email protected]>

Signed-off-by: Andreas Metzler <[email protected]>
@ametzler ametzler marked this pull request as ready for review December 27, 2023 06:57
@ametzler
Copy link
Author

Afaik has_header also takes dependencies so you can write something like:

  foreach h : headers
    if cc.has_header(h, dependencies: libbsd_overlay)
      conf.set('HAVE_' + h.underscorify().to_upper(), 1)
    endif
  endforeach

Thanks, I have used this and pushed an updated version that also changes the meson build.

meson.build Outdated Show resolved Hide resolved
Copy link
Member

@ueno ueno left a comment

Choose a reason for hiding this comment

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

Thank you!

meson.build Outdated Show resolved Hide resolved
@ueno ueno merged commit 81715a2 into p11-glue:master Dec 31, 2023
14 checks passed
@ZoltanFridrich ZoltanFridrich added this to the 0.25.4 milestone Jul 1, 2024
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