Skip to content

Enable HWP conversion on MacOS M1 again#541

Merged
apyrgio merged 2 commits intofreedomofpress:mainfrom
OctopusET:enable-hwp-for-m1
Sep 6, 2023
Merged

Enable HWP conversion on MacOS M1 again#541
apyrgio merged 2 commits intofreedomofpress:mainfrom
OctopusET:enable-hwp-for-m1

Conversation

@OctopusET
Copy link
Copy Markdown
Contributor

@OctopusET OctopusET commented Sep 1, 2023

## This PR is not working 'yet'

What they do

This PR reverts the patch that disables HWP / HWPX conversion on MacOS M1.
It does not fix conversion on Qubes OS (#494)

Background

Previously, HWP / HWPX conversion didn't work on MacOS M1 system. #498
Because libreoffice wasn't built with Java support on alpine (aarch64).

Gratefully, the Alpine team has enabled Java support on the aarch64 system.
https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded

Problem

This commit is included in 7.5.5.2-r2, libreoffice package should be 7.5.5.2-r2 or higher to fix this issue.

However 3.18 doesn't have 7.5.5.2-r2 package. (https://pkgs.alpinelinux.org/package/v3.18/community/aarch64/libreoffice)
And Dangerzone image uses the alpine:latest image which is 3.18 as of this writing.

Solution:

  1. Wait until the update is available in the Alpine stable
  2. Change Docker image alpine:latest to alpine:edge (Currently PR is using this solution!)
  3. Install libreoffice package from edge repository. (I tried it, but test failed)

Big thanks to @ebandal for the H2ORestart and research on the Java support issue.

Fixes #498

@OctopusET OctopusET changed the title Re-enable HWP conversion fails on MacOS M1 Re-enable HWP conversion on MacOS M1 Sep 2, 2023
@OctopusET OctopusET changed the title Re-enable HWP conversion on MacOS M1 Enable HWP conversion on MacOS M1 again Sep 2, 2023
@apyrgio apyrgio self-requested a review September 5, 2023 14:06
@apyrgio
Copy link
Copy Markdown
Contributor

apyrgio commented Sep 5, 2023

Looks great. The only thing I'd like to change is to move us to alpine:edge, instead of alpine:20230901, since we'll try to have out a 0.5.0 release by end of September / early October, and we need the latest security patches. Once Alpine Linux 3.19 / 3.18.4 gets released, we'll make sure to move back to latest. We can discuss more on #540 about this, if you want.

If you're ok with this suggestion, I can squash the commits, change the label, add a changelog section and merge this PR.

@OctopusET
Copy link
Copy Markdown
Contributor Author

OctopusET commented Sep 5, 2023

I agree with using edge tag.
I just used alpine:20230901 for easy reproducible testing result. I can't find reason using date tag with edge image for this case.

@OctopusET
Copy link
Copy Markdown
Contributor Author

I'm okay with suggestions.
Please edit/squash this PR, thanks!

@OctopusET
Copy link
Copy Markdown
Contributor Author

Looks like the last Windows test failed because the update check API failed due to Github being down. https://www.githubstatus.com/incidents/smdz34v7j8q0

The Alpine Linux team has enabled Java support for LibreOffice on ARM
architecture:

    https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded

This commit is included in 7.5.5.2-r2, so the installed LibreOffice
package should be 7.5.5.2-r2 or higher to fix this issue.

However 3.18 doesn't have the 7.5.5.2-r2 package:

    https://pkgs.alpinelinux.org/package/v3.18/community/aarch64/libreoffice

The Dangerzone image uses the alpine:latest image which is 3.18 as of
writing this.

For this reason, we switch to the edge repo of Alpine Linux, which
includes this fix.

Refs #498
Refs #540
Refs #542
This PR reverts the patch that disables HWP / HWPX conversion on MacOS
M1. It does not fix conversion on Qubes OS (#494)

Previously, HWP / HWPX conversion didn't work on MacOS M1 systems (#498)
because libreoffice wasn't built with Java support on Alpine Linux for
ARM (aarch64).

Gratefully, the Alpine team has enabled Java support on the aarch64
system [1], so we can enable it again for ARM architectures.

Fixes #498

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded
@apyrgio apyrgio merged commit 214ce97 into freedomofpress:main Sep 6, 2023
@apyrgio
Copy link
Copy Markdown
Contributor

apyrgio commented Sep 6, 2023

Thanks a lot for the great work @OctopusET. I squashed the commits and produced two new ones with you as an author. I forgot to add a changelog section, but we'll do so in subsequent commits. Finally, I tested this branch on a MacOS M1 machine, and it works great.

@OctopusET OctopusET deleted the enable-hwp-for-m1 branch September 6, 2023 16:21
OctopusET added a commit to OctopusET/dangerzone that referenced this pull request Dec 8, 2023
This PR reverts the patch that disables HWP / HWPX conversion on MacOS M1.
It does not fix conversion on Qubes OS. freedomofpress#494

Previously, HWP / HWPX conversion didn't work on MacOS (Apple silicon CPU). freedomofpress#498
because libreoffice wasn't built with Java support on Alpine Linux for ARM (aarch64).

Gratefully, the Alpine team has enabled Java support on the aarch64
system [1], so we can enable it again for ARM architectures.
And this patch is included in Alpine 3.19

This commit was included in freedomofpress#541 and reverted on freedomofpress#562 due to a stability issue.

Fixes freedomofpress#498

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded
apyrgio pushed a commit to OctopusET/dangerzone that referenced this pull request Dec 13, 2023
This PR reverts the patch that disables HWP / HWPX conversion on MacOS M1.
It does not fix conversion on Qubes OS (freedomofpress#494).

Previously, HWP / HWPX conversion didn't work on MacOS (Apple silicon CPU) (freedomofpress#498)
because libreoffice wasn't built with Java support on Alpine Linux for ARM (aarch64).

Gratefully, the Alpine team has enabled Java support on the aarch64
system [1], so we can enable it again for ARM architectures.
And this patch is included in Alpine 3.19

This commit was included in freedomofpress#541 and reverted on freedomofpress#562 due to a stability issue.

Fixes freedomofpress#498

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded
apyrgio pushed a commit to OctopusET/dangerzone that referenced this pull request Dec 13, 2023
This PR reverts the patch that disables HWP / HWPX conversion on MacOS M1.
It does not fix conversion on Qubes OS (freedomofpress#494).

Previously, HWP / HWPX conversion didn't work on MacOS (Apple silicon CPU) (freedomofpress#498)
because libreoffice wasn't built with Java support on Alpine Linux for ARM (aarch64).

Gratefully, the Alpine team has enabled Java support on the aarch64
system [1], so we can enable it again for ARM architectures.
And this patch is included in Alpine 3.19

This commit was included in freedomofpress#541 and reverted on freedomofpress#562 due to a stability issue.

Fixes freedomofpress#498

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded
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.

HWP conversion fails on MacOS M1

2 participants