shtrom / Lurch4Adium

OMEMO Xtra for Adium (packaging the lurch and carbons libpurple plugins)
GNU General Public License v3.0
40 stars 1 forks source link

Updated build? #10

Closed sfjes closed 6 years ago

sfjes commented 6 years ago

Any chance of getting an updated release build of Lurch4Adium? There's been updates to both carbons and lurch, the former of which fixes bugs that break carbons with the Conversations client, and the latter of which has received security updates.

I tried building it myself but it looks like I'll have to do an OS upgrade before Apple will let me have xcode.

Letterus commented 6 years ago

I have done a manual build from master at 2018-04-09. You can try if it works for you. I will not provide support though.

Lurch4Adium.AdiumLibpurplePlugin.zip

sfjes commented 6 years ago

Thanks. Sounds like that'd have the lurch security updates, but wouldn't have the carbons fix, which was committed on 2018-04-28. Is that right?

Letterus commented 6 years ago

Probably? Where is that fix? Last commit to master is 11 months old.

sfjes commented 6 years ago

https://github.com/gkdr/carbons

Letterus commented 6 years ago

Ok, thats a libpurple plugin only. That needs to be integrated into an Adium plugin I think. And as far as I understand that's only carbons, OMEMO removed. So I think, what is needed is: A pull request for this repo that integrates the carbon fixes. After that pull request is integrated I could do a new build.

shtrom commented 6 years ago

Ah, yep, gkdr has merged my fix; we don't need those custom submodules. Let me give it a go.

Letterus commented 6 years ago

Thank you. URLs of the submodules are without "libpurple-" at gkdr's repos. ;-)

shtrom commented 6 years ago

:man_facepalming: Thank you

shtrom commented 6 years ago

Ok, this branch builds. I can't test immediately (probably Monday or so), but please give it a go, and let me know.

Letterus commented 6 years ago

Thanks for integrating! Build fails for my setup:

src/libomemo_crypto.c:73:48: error: use of undeclared identifier
      'GCRY_CIPHER_MODE_GCM'; did you mean 'GCRY_CIPHER_MODE_ECB'?
  ret_val = gcry_cipher_open(&cipher_hd, algo, GCRY_CIPHER_MODE_GCM, GCR...
                                               ^~~~~~~~~~~~~~~~~~~~
                                               GCRY_CIPHER_MODE_ECB
…/Lurch4Adium/Frameworks/adium/Frameworks/libgcrypt.framework/Headers/gcrypt.h:860:5: note: 
      'GCRY_CIPHER_MODE_ECB' declared here
    GCRY_CIPHER_MODE_ECB    = 1,  /* Electronic codebook. */
    ^
src/libomemo_crypto.c:109:13: warning: implicit declaration of function
      'gcry_cipher_gettag' is invalid in C99 [-Wimplicit-function-declaration]
  ret_val = gcry_cipher_gettag(cipher_hd, tag_p, tag_len);
            ^
src/libomemo_crypto.c:162:48: error: use of undeclared identifier
      'GCRY_CIPHER_MODE_GCM'; did you mean 'GCRY_CIPHER_MODE_ECB'?
  ret_val = gcry_cipher_open(&cipher_hd, algo, GCRY_CIPHER_MODE_GCM, GCR...
                                               ^~~~~~~~~~~~~~~~~~~~
                                               GCRY_CIPHER_MODE_ECB
…/Lurch4Adium/Frameworks/adium/Frameworks/libgcrypt.framework/Headers/gcrypt.h:860:5: note: 
      'GCRY_CIPHER_MODE_ECB' declared here
    GCRY_CIPHER_MODE_ECB    = 1,  /* Electronic codebook. */
    ^
src/libomemo_crypto.c:192:13: warning: implicit declaration of function
      'gcry_cipher_checktag' is invalid in C99 [-Wimplicit-function-declaration]
  ret_val = gcry_cipher_checktag(cipher_hd, tag_p, tag_len);
            ^
6 warnings and 2 errors generated.
make[2]: *** [build/libomemo_crypto.o] Error 1
make[1]: *** [lib/libomemo/build/libomemo-conversations.a] Error 2
make: *** [vendor/lurch/build/lurch.a] Error 2
shtrom commented 6 years ago

Did you try the tip of the branch? I added a dodgy patch for the Adium source that re-integrates libgcrypt 1.6.2 that I had somewhere in another Adium source tree; no idea why it was there and not here, though.

shtrom commented 6 years ago

Otherwise, you can give a spin to this one (0.0.3-pre.1): Lurch4Adium.AdiumLibpurplePlugin.zip

shtrom commented 6 years ago

@sfjes actually, can you try this build above? I haven't seen issues with Conversations and Carbons even with the previous build, so I'm curious to see if it fixes your issue.

Also, I'm curious to hear more details about what the issue was.

sfjes commented 6 years ago

I was able to build using the branch. However with both that build and the zip you sent, I'm unable to get carbons or lurch working. /carbons on and /lurch help just send that as a chat message, despite "Lurch4Adium (0.0.3-pre.1)" appearing in Xtras Manager under Plugins after a restart.

I've actually had some friends who've had what seemed the same problem using the 0.0.1 release, which is strange since 0.0.1 works for me (even now if I roll back). We were not able to figure out why it didn't work on their machines, so they still use unencrypted messaging.

This is the issue with carbons: https://github.com/gkdr/carbons/issues/20

Conversations changed its message format starting in the recent 2.1.1 release (now up to 2.1.4) as documented in the link below, which triggered the problem with carbons. https://github.com/siacs/Conversations/issues/2986

Thanks for your work on Lurch4Adium!

Letterus commented 6 years ago

Yep, same issue here. Branch built. Switching branches did not work though, but a fresh clone did it. Result is same @sfjes: In companion with ChatSecure OMEMO does not work anymore, /carbons on command does not work anymore. (It does with my build above.)

shtrom commented 6 years ago

@sfjes So, the problem is when you are sending an OMEMO-encrypted message from another client (Conversations 2.1.4), your Adium doesn't actually get the carbon, or says that it's OMEMO-encrypted? Ok, I seem to have been able to reproduce the issue. Sadly, with 0.0.3-pre1, too...

@Letterus what did you change in your build for it to work? i.e., which revisions of carbons and lurch did you use? And I assume this was on top of L4A's master at the time?

I changed a bunch of things in the build and submodules, which Git doesn't immediately register, so it is indeed easier to restart from a new clone.

Also, which version of Adium and OS X are you using? I built the zip on/for 10.13, 0.0.2 was built on/for 10.12.

Can you see what the debug logs of Adium say? There should be mentions of the plugins being loaded, at least.

shtrom commented 6 years ago

Yeah, OK, 0.0.3-pre.1 does nothing. It loads, but it doesn't seem to register the plugins properly at all...

sfjes commented 6 years ago

@shtrom Yes, that's the issue.

I also had to wipe and re-git clone to get it to build. Carbons 0.15 is the revision that has the OMEMO-encrypted message carbon fix. I'm using OS X 10.12.

shtrom commented 6 years ago

This would explain things


2018-05-07 15:13:54.288 Adium[95235:13499831] Error loading /Users/omehani/Library/Application Support/Adium 2.0/PlugIns/Lurch4Adium.AdiumLibpurplePlugin/Contents/MacOS/Lurch4Adium:  dlopen(/Users/omehani/Library/Application Support/Adium 2.0/PlugIns/Lurch4Adium.AdiumLibpurplePlugin/Contents/MacOS/Lurch4Adium, 265): Library not loaded: @executable_path/../Frameworks/libpurple.framework/Versions/2.10.7r5340f4a9bd6a/libpurple
  Referenced from: /Users/omehani/Library/Application Support/Adium 2.0/PlugIns/Lurch4Adium.AdiumLibpurplePlugin/Contents/MacOS/Lurch4Adium
  Reason: image not found
2018-05-07 15:13:54.288 Adium[95235:13499831] Failed to obtain principal class from plugin "Lurch4Adium.AdiumLibpurplePlugin" ("/Users/omehani/Library/Application Support/Adium 2.0/PlugIns/Lurch4Adium.AdiumLibpurplePlugin")! infoDictionary: {
    AIMinimumAdiumVersionRequirement = "1.5";
    BuildMachineOSBuild = 17D47;
    CFBundleDevelopmentRegion = en;
    CFBundleExecutable = Lurch4Adium;
    CFBundleIdentifier = "net.ssji.narf.Lurch4Adium";
    CFBundleInfoDictionaryVersion = "6.0";
    CFBundleName = Lurch4Adium;
    CFBundleNumericVersion = 0;
    CFBundlePackageType = BNDL;
    CFBundleShortVersionString = "0.0.3-pre.1";
    CFBundleSignature = AdIM;
    CFBundleSupportedPlatforms =     (
        MacOSX
    );
    CFBundleVersion = "0.0.3-pre.1";
    DTCompiler = "com.apple.compilers.llvm.clang.1_0";
    DTPlatformBuild = 9C40b;
    DTPlatformVersion = GM;
    DTSDKBuild = 17C76;
    DTSDKName = "macosx10.13";
    DTXcode = 0920;
    DTXcodeBuild = 9C40b;
    NSHumanReadableCopyright = "Copyright \U00a9 2017, 2018 Olivier Mehani. GPLv3+";
    NSPrincipalClass = Lurch4Adium;
}
2018-05-07 15:13:54.289 Adium[95235:13499831] Failed to initialize Plugin "Lurch4Adium.AdiumLibpurplePlugin" ("/Users/omehani/Library/Application Support/Adium 2.0/PlugIns/Lurch4Adium.AdiumLibpurplePlugin")!
2018-05-07 15:14:04.410 Adium[95235:13499876] [Accounts] Failed to update account with identifier B59ACA71-5112-40F7-9B5D-04BF02411467, error: Error Domain=ABAddressBookErrorDomain Code=1002 "(null)"```
shtrom commented 6 years ago

Ok, the issue seems to come from the mangling of the library paths in https://github.com//shtrom/Lurch4Adium/blob/update-submodules/Lurch4Adium.xcodeproj/project.pbxproj which are too specific to what was in the HG clone of Adium that we were using before.

shtrom commented 6 years ago

Ok, how about this one? Carbons and Lurch seem to register properly, but I have a weird bug where all carbons go in a window with myself. @sfjes @Letterus could you test and confirm? Lurch4Adium-0.0.3-pre.2.AdiumLibpurplePlugin.zip

sfjes commented 6 years ago

@shtrom New build seems to work! Both the provided binary and a local build of the branch. OMEMO works and Adium now displays OMEMO-encrypted carbons sent by Conversations 2.1.4. Nice!! Thanks!

Letterus commented 6 years ago

Works for me as well.

shtrom commented 6 years ago

Do you get the carbons properly in the right conversation window, rather than in a separate one with yourself? (I saw that behaviour with Conversations 1.2.4 as the latest client).

@arahlin would you mind testing this one, too. It's the latest carbons, and you should get OMEMO for free!

sfjes commented 6 years ago

Carbons appear in the expected Adium conversation windows for me, even if a conversation with that person wasn't open yet.

shtrom commented 6 years ago

Ok, more insight in the bug I'm seeing: it only happens when receiving Carbons with OMEMO. Normal, plaintext carbons get to the right window.

@sfjes could you confirm this, or are you receiving all carbons of your own messages in the right window, both when using OMEMO and not?

sfjes commented 6 years ago

I tested both with and without OMEMO and carbons seem to work correctly in both directions between Conversations 1.2.4 and Adium with the 0.0.3-pre.2 build (using a local build of it, but didn't notice any issues with the provided zip either). Carbons arrive in the expected conversation partner window, even if that window was not yet opened.

shtrom commented 6 years ago

On Thu 10 May 2018 at 22:29:01 -0700, sfjes wrote:

I tested both with and without OMEMO and carbons seem to work correctly in both directions between Conversations 1.2.4 and Adium with the 0.0.3-pre.2 build (using a local build of it, but didn't notice any issues with the provided zip either). Carbons arrive in the expected conversation partner, even if that window was not yet opened.

Which version of Adium are you using?

-- Olivier Mehani shtrom@ssji.net PGP fingerprint: 4435 CF6A 7C8D DD9B E2DE F5F9 F012 A6E2 98C6 6655 Confidentiality cannot be guaranteed on emails sent or received unencrypted.

shtrom commented 6 years ago

I tried with a fresh profile on Adium 1.5.10.4, and still get OMEMO-encrypted carbons I sent from other devices in a separate chat window still.

There's still a latent bug, there, but I can't work out whether it's my system or my server.

@sfjes could I get you to try on a fresh Adium profile. If we can confirm this still doesn't happen for you, I'll merge and cut a new release.

sfjes commented 6 years ago

Adium 1.5.10.4. Restarted Adium holding Option for the startup options, created a new User (profile), did account setup for my XMPP account, /carbons on and made sure /lurch blacklist remove was set. Sent OMEMO-encrypted messages from Conversation 2.1.4, received them in the correct partner window in Adium.

Tested both while having the partner window open already, while having it open but being active in a different tab, and while having that partner window closed. Also tested without OMEMO. Could not reproduce the issue. I've never seen a conversation window opened with myself.

shtrom commented 6 years ago

Ok, v0.0.3 is out https://github.com/shtrom/Lurch4Adium/releases/tag/v0.0.3

Thanks for your help testing, guys!

RobFog commented 5 years ago

I saw "update MACOSX_DEPLOYMENT_TARGET to 10.13 (High Sierra)" in the release announcement. Does that mean 10.13 is required?

If so, is there are working version for 10.11?

shtrom commented 5 years ago

Give it a go, but I fear it will break. Previous releases would still work.

I think I had to bump because I couldn't build for older targets anymore, so it's unlikely to go back, but you can probably try to build it yourself, there should be nothing specific in the code that depends on 10.13.

RobFog commented 5 years ago

Thanks a lot for the answer. 🙂 I'll have a look.