Created attachment 38903 [details] Various build fixes - Include the right headers needed, at the right location (system headers before uerland headers) - Locally define SCM_CREDENTIALS and SO_PASSCRED. This is rather ugly, and I'm not even sure this actually works. Any idea? - OpenBSD's ucred structure doesn't have a pid member. Diff attached fixes the build.
Assigning to myself to review/check this, since I seem to be the department of portability. We may be able to fix some of this by syncing code from telepathy-gabble - could you please try building Gabble 0.10.0 and confirm whether that works on OpenBSD? (For context: Gibber was a prototype GLib network/XMPP library shared by Gabble and Salut. We pushed many of the network bits into GIO instead; the XMPP bits became Wocky, which is currently part of Gabble but will become a separate library when it's more stable. Our long-term plan is to migrate everything into GIO or Wocky as appropriate, then delete what's left of Gibber.) (In reply to comment #0) > - Include the right headers needed, at the right location (system headers > before uerland headers) Hopefully this won't break any other Unixes in the process... I'll need to check autoconf.info before merging this, but in principle it seems OK. > - Locally define SCM_CREDENTIALS and SO_PASSCRED. This is rather ugly, and I'm > not even sure this actually works. Any idea? Sorry, I'm not going to accept patches that #define random system constants; surely there must be a system header that provides these? The equivalent code in Gabble just disables credentials-passing in the library code on non-Linux OSs (!defined(__linux__)), then copes with that omission in src/. As a first step to make this compile on OpenBSD, we should do that. After that, the next step would be to implement credentials-passing for *BSD too. The way forward for that would probably be to make sure it's implemented in GIO (which I believe currently supports it on at least Linux and FreeBSD - does OpenBSD work the same as one of those?), then use the appropriate GIO API on all OSs. Failing that, we could also include code derived from what's in GIO. > - OpenBSD's ucred structure doesn't have a pid member. Including a dummy pid (0 or -1 perhaps) seems safer than the CM's own pid. I don't think Gabble or Salut actually use the pid anyway, so we could just remove it from the Gibber API.
(In reply to comment #1) > We may be able to fix some of this by syncing code from telepathy-gabble Indeed, looking at the NEWS file, I already did this for version 0.3.12. Please confirm whether these changes are actually needed in the current development version from the git repository? git://git.collabora.co.uk/git/telepathy-salut.git
(In reply to comment #1) > Assigning to myself to review/check this, since I seem to be the department of > portability. > > We may be able to fix some of this by syncing code from telepathy-gabble - > could you please try building Gabble 0.10.0 and confirm whether that works on > OpenBSD? We needed some patches for that as well, please see: http://www.openbsd.org/cgi-bin/cvsweb/ports/net/telepathy/telepathy-gabble/patches/ > (For context: Gibber was a prototype GLib network/XMPP library shared by Gabble > and Salut. We pushed many of the network bits into GIO instead; the XMPP bits > became Wocky, which is currently part of Gabble but will become a separate > library when it's more stable. Our long-term plan is to migrate everything into > GIO or Wocky as appropriate, then delete what's left of Gibber.) > > (In reply to comment #0) > > - Include the right headers needed, at the right location (system headers > > before uerland headers) > > Hopefully this won't break any other Unixes in the process... I'll need to > check autoconf.info before merging this, but in principle it seems OK. It shouldn't break any Unixes.. > > - Locally define SCM_CREDENTIALS and SO_PASSCRED. This is rather ugly, and I'm > > not even sure this actually works. Any idea? > > Sorry, I'm not going to accept patches that #define random system constants; > surely there must be a system header that provides these? > > The equivalent code in Gabble just disables credentials-passing in the library > code on non-Linux OSs (!defined(__linux__)), then copes with that omission in > src/. As a first step to make this compile on OpenBSD, we should do that. The revised patch for Gabble has been removed (since it's !__linux__). > After that, the next step would be to implement credentials-passing for *BSD > too. The way forward for that would probably be to make sure it's implemented > in GIO (which I believe currently supports it on at least Linux and FreeBSD - > does OpenBSD work the same as one of those?), then use the appropriate GIO API > on all OSs. Failing that, we could also include code derived from what's in > GIO. OpenBSD's implementation would be more like FreeBSD's in GIO. But OpenBSD itself doesn't support passing around socket credentials. > > - OpenBSD's ucred structure doesn't have a pid member. > > Including a dummy pid (0 or -1 perhaps) seems safer than the CM's own pid. I > don't think Gabble or Salut actually use the pid anyway, so we could just > remove it from the Gibber API. That'd be even better :)
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-salut/issues/20.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.