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

rar package unavailable on ARM #27

Closed
schklom opened this issue Jan 5, 2023 · 2 comments
Closed

rar package unavailable on ARM #27

schklom opened this issue Jan 5, 2023 · 2 comments
Assignees
Labels
Enhancement New feature or request

Comments

@schklom
Copy link

schklom commented Jan 5, 2023

The rar package is not available for ARM processors on Ubuntu (source https://packages.ubuntu.com/search?keywords=rar&searchon=names&suite=all&section=all). In fact, it is only available for AMD64.
Would you switch to a different and more available RAR archiver, such as 7zip or p7zip?

@zelon88
Copy link
Owner

zelon88 commented Jan 10, 2023

Hello,

Thanks for supporting HRConvert2 with your suggestion.

Unless something has changed recently, I don't think that 7zip or P7zip can create rar archives due to license restrictions with the .rar file format. It is my understanding that, technically, the only legal way to create a RAR archive is with a Rar/WinRAR product license.

I don't have a test bed for this, but I would recommend playing around with https://github.com/ilteoood/rar-on-arm. If you can get that running, you could try replacing the...

if (in_array($extension, $arrayraro)) $returnData = shell_exec('rar a -ep1 -r '.$newPathname.' '.$safedir2);

...line of convertCore.php with something like...

if (in_array($extension, $arrayraro)) $returnData = shell_exec('docker run ilteoood/rar-on-arm a -ep1 -r '.$newPathname.' '.$safedir2);

Feel free to let me know if you need additional guidance.

@zelon88 zelon88 self-assigned this Jan 10, 2023
@zelon88 zelon88 added the Enhancement New feature or request label Jan 10, 2023
@zelon88 zelon88 closed this as completed Feb 22, 2023
@bit-man
Copy link
Contributor

bit-man commented Jan 3, 2024

Just for anyone looking for amd64 image (and probably other architectures) take a look at how was solved during image creation with no php code modification. Also there's an available image for release 3.1 (linux/amd64 and linux/arm64)

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants