Closed Bug 1642885 Opened 2 months ago Closed 2 months ago

detect libc on BSD like on macosX

Categories

(Chat Core :: Security: OTR, defect)

defect

Tracking

(thunderbird78 fixed)

RESOLVED FIXED
Instantbird 79
Tracking Status
thunderbird78 --- fixed

People

(Reporter: gaston, Assigned: clokep)

Details

Attachments

(1 file)

small oneliner to fix libc detection at runtime (seen errors in js console):

Index: comm/chat/modules/CLib.jsm
--- comm/chat/modules/CLib.jsm.orig
+++ comm/chat/modules/CLib.jsm
@@ -28,6 +28,7 @@ switch (OS) {
     fname_t = wchar_t.ptr;
     break;
   case "darwin":
+  case "openbsd":
     libcAbi = ctypes.default_abi;
     libcPath = ctypes.libraryName("c");
     break;

filing to see if there's interest in fixing this..

FreeBSD probably wants the same ?

This looks fine to me, KaiE -- do you agree?

Flags: needinfo?(kaie)
Component: General → Security: OTR

Why not move libc under default case instead of enumerating every OS? I don't use Thunderbird.

See https://github.com/arlolra/ctypes-otr/commit/1917f769d656 for the old behavior.

(In reply to Jan Beich from comment #3)

See https://github.com/arlolra/ctypes-otr/commit/1917f769d656 for the old behavior.

It's not clear what you want to demonstrate with this patch, which apparently refers to a revision that is two years older than the snapshot that we used as the base for porting over to TB.
If it's relevant, please explain.

Flags: needinfo?(kaie)

(In reply to Landry Breuil (:gaston) from comment #1)

FreeBSD probably wants the same ?

Here is code that checks for multiple variations of BSD. Should we map all those strings to the same as Darwin?
https://searchfox.org/comm-central/rev/771b2328aa3096e6c907f477d7ebd862c8bf0841/mozilla/build/gyp_includes/common.gypi#85

Flags: needinfo?(landry)

Can someone make a patch with all the strings? Then I can r+ and commit.

Attached patch Patch v1Splinter Review

This adds the additional BSD systems, I debated adding a comment of where to look for this, but figured it wasn't worth it.

I tested this on macOS and it still worked without a problem, but don't have a(nother) BSD system to test on.

Assignee: nobody → clokep
Status: NEW → ASSIGNED
Attachment #9154147 - Flags: review?(kaie)
Comment on attachment 9154147 [details] [diff] [review]
Patch v1

That will work for us - thanks!
Flags: needinfo?(landry)
Attachment #9154147 - Flags: feedback+

(In reply to Kai Engert (:KaiE:) from comment #4)

(In reply to Jan Beich from comment #3)

See https://github.com/arlolra/ctypes-otr/commit/1917f769d656 for the old behavior.

It's not clear what you want to demonstrate with this patch, which apparently refers to a revision that is two years older than the snapshot that we used as the base for porting over to TB.
If it's relevant, please explain.

i think jan meant to say 'before this commit, the default/fallback was working ootb on the BSDs'

Attachment #9154147 - Flags: review?(kaie) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/f7b582eabc68
Detect libc for OTR on BSD. r=kaie

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 79
Comment on attachment 9154147 [details] [diff] [review]
Patch v1

this should get into tb 78 for wider compatibility
Attachment #9154147 - Flags: approval-comm-beta?
Comment on attachment 9154147 [details] [diff] [review]
Patch v1

Approved for beta
Attachment #9154147 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.