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

Update James SHA-1 #932

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Update James SHA-1 #932

merged 3 commits into from
Mar 8, 2024

Conversation

Arsnael
Copy link
Member

@Arsnael Arsnael commented Feb 22, 2024

No description provided.

@Arsnael Arsnael self-assigned this Feb 22, 2024
@Arsnael
Copy link
Member Author

Arsnael commented Feb 22, 2024

[ERROR] Failed to execute goal io.github.git-commit-id:git-commit-id-maven-plugin:7.0.0:revision (get-the-git-infos) on project testing-base: Git command exited with invalid status [128]: directory: `/home/jenkins/build/workspace/Tmail_build_PR-932/.git/modules`, command: `git describe --always --dirty=-dirty --match=* --abbrev=7`, stdout: ``, stderr: `fatal: this operation must be run in a work tree` -> [Help 1]

There is an issue with apache/james-project@88e1ae8

It seems latests versions of the plugin have some conflicts with git worktrees and submodules.

I saw in the commit log history that @vttranlina already did an attempt a year ago to upgrade to version 6 before doing a revert for a similar reason.

However, the issue linked by Tung, that I found as well, has been merged into version 7.0 (used in the plugin update): git-commit-id/git-commit-id-maven-plugin#639

However can see here git-commit-id/git-commit-id-maven-plugin#642 (comment) that maybe our case has not been handled (the .git in james-project is not a folder but a file).

I think might need to ask James community if we can revert this plugin upgrade for now? And will open an issue as well on that plugin repo to see if we can get support :)

@Arsnael
Copy link
Member Author

Arsnael commented Feb 22, 2024

And will open an issue as well on that plugin repo to see if we can get support :)

=> git-commit-id/git-commit-id-maven-plugin#701

@Arsnael Arsnael force-pushed the james-sub-upgrade-2 branch from 65bc328 to 8c9837b Compare March 5, 2024 03:26
@Arsnael
Copy link
Member Author

Arsnael commented Mar 5, 2024

Waiting for this to be merged: apache/james-project#2085

tested locally, it seems to work perfectly :)

@vttranlina
Copy link
Member

Maybe need to cherry-pick commit 8609830
For sure, should wait for ci result after git plugin pr

@Arsnael Arsnael force-pushed the james-sub-upgrade-2 branch from 8c9837b to 3be53f2 Compare March 6, 2024 02:10
@Arsnael
Copy link
Member Author

Arsnael commented Mar 6, 2024

Rebased after the merge on apache for git commit id plugin upgrade

@Arsnael
Copy link
Member Author

Arsnael commented Mar 6, 2024

https://james-jenkins.lin-saas.com/job/Tmail%20build/job/PR-932/3/testReport/

Related with bouncycastle upgrade.... Not sure what's causing this yet

@Arsnael
Copy link
Member Author

Arsnael commented Mar 6, 2024

I'm unsure to really understand what's going on...

Tests are failing with : java.io.EOFException: Unexpected end of ZIP input stream

If I change in the Encrypter class PGPCompressedData.ZIP for the PGPCompressedDataGenerator to an other compression like ZLIB or BZIP2 then it works.

I tried to look at if maybe something seems wrong, look around in forums, but not uch. Or maybe there is an issue with zip compression when encrypting in bouncycastle 1.77? I found this bcgit/bc-java#1577 that looks similar but no answers to it.

Also by looking around the net, I tried with just setting .setWithIntegrityPacket(false) in the encryptor generation method and it works. If i understand correctly, the integrity packet contains a hash of the encrypted data, which is then signed with the sender private key, allowing the recipient to verify data has not been tampered with or corrupted.

As technically we encrypt the data with the private key that the user uploaded to tmail, do we need that though? Might be a bad idea, but exploring options here...

Anybody has other ideas? @chibenwa maybe, I think you have a better expertise on that :)

@Arsnael
Copy link
Member Author

Arsnael commented Mar 7, 2024

Applying here @quantranhong1999 suggestion: forcing back to version 1.70 for tmail part of the build, where we know it works. Could open an issue to try to tackle that back later.

@chibenwa would you be ok with this?

@chibenwa
Copy link
Member

chibenwa commented Mar 7, 2024

@chibenwa would you be ok with this?

Very sad but OK with me.

Though bouncy-castle would be more stable TBH.

@Arsnael
Copy link
Member Author

Arsnael commented Mar 7, 2024

Though bouncy-castle would be more stable TBH.

Or maybe we do not do something right somewhere... but I've been banging my head a long time on this, it should not be a blocker for now as well I think

@Arsnael
Copy link
Member Author

Arsnael commented Mar 8, 2024

#959

Arsnael added 3 commits March 8, 2024 09:31
Version 1.77 seems to create weird issues during encryption with zip compression when decrypting it
@Arsnael Arsnael force-pushed the james-sub-upgrade-2 branch from 9198092 to 92cd14f Compare March 8, 2024 02:33
@Arsnael Arsnael merged commit 9dd239f into linagora:master Mar 8, 2024
5 checks passed
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