PlusMinus0 / headless-jd2-docker

Headless JDownloader 2 Docker Container
31 stars 38 forks source link

Update 7zip files to support RAR 5 #8

Closed desimaniac closed 6 years ago

desimaniac commented 7 years ago

Hi. It looks like 7zip that comes with JDownloader has issues extracting RAR 5 archives. My solution has been to download the latest 7zip and move it into the the container and commit the image, but would like a more permanent solution...

Would it be possible to replace the 7zip files (/opt/JDownloader/libs/sevenzipjbinding.jar and /opt/JDownloader/libs/sevenzipjbindingLinux.jar with the latest ones)?

See also: https://board.jdownloader.org/showthread.php?t=71069

PlusMinus0 commented 7 years ago

Could you upload an example file so I can reproduce the issue?

desimaniac commented 7 years ago

Sure. This one (source)

PlusMinus0 commented 7 years ago

Not quite what I had in mind. A single file, not bigger than 5MB. Just a proof of concept. I don’t have Windows and therefore don’t have WinRAR to create my own file.

desimaniac commented 7 years ago

I use mac myself. But have a Windows VM. Let me see if I can get winrar on there.

Edit: I rar'd up a pdf file I had laying around (using RAR 5): here.

PlusMinus0 commented 7 years ago

Okay, got one: https://mega.nz/#!VRdTGQwR!IcCxrQgc3ilcma0b4rGImiHl1R3bLjTgpH1tlZBmLFI

$ dd if=/dev/urandom of=dummy bs=50k count=20
$ rar a -ma5 test.rar dummy 

Will try to fix it. Probably won’t get to it until next week though.

desimaniac commented 7 years ago

I think It can be fixed by just COPYing the 2 files over to the libs folder. I could send up a PR.

Edit: This would be a temporary fix until JDownloader get's updated with the newer 7zip.

PlusMinus0 commented 7 years ago

In principle, yes. But downloading the files with wget should’t be possible and I’m not sure if I want to upload the files into the repository.

desimaniac commented 7 years ago

You can download files via the ADD command.

PlusMinus0 commented 7 years ago

Even from mega? It’s not a direct link, so I doubt it.

desimaniac commented 7 years ago

No, not from mega, but I think we can get it from the source.

Looks like they use Sevenzipjbinding. The latest is: https://sourceforge.net/projects/sevenzipjbind/files/7-Zip-JBinding/9.20-2.00beta/sevenzipjbinding-9.20-2.00beta-Linux-amd64.zip/download

It will require extracting and renaming the files before being copied over.

image

PlusMinus0 commented 7 years ago

I can download it manually and looked into the archive already, but again, it’s not a direct link and surpasses my wget skill :-/

Found a mirror: https://github.com/borisbrodski/sevenzipjbinding but without compiled versions.

As I said, I won’t have enough time this week, but I will fix it.

It seems to be in Maven: http://central.maven.org/maven2/net/sf/sevenzipjbinding/sevenzipjbinding-all-linux/9.20-2.00beta/sevenzipjbinding-all-linux-9.20-2.00beta.jar http://central.maven.org/maven2/net/sf/sevenzipjbinding/sevenzipjbinding/9.20-2.00beta/sevenzipjbinding-9.20-2.00beta.jar

Could you please see, if replacing the files in the container with the aforementioned files work?

desimaniac commented 7 years ago

Nice find. Unfortunately, I think it will need to match the 2 files that we are going to replace. But, yeah, dont worry about it now. In the meanwhile, ill see if I can get lucky with a direct mirror.

xXZaretXx commented 6 years ago

Is there any new info about the Rar5 problem ?

Geilokowski commented 6 years ago

I have the same issue... Any updates?

PlusMinus0 commented 6 years ago

Well, it has supposedly been integrated in a beta of JDownloader 2 since Febuary (https://board.jdownloader.org/showpost.php?s=04d98b61bd2bd088101bba6bf0fc4a50&p=392437&postcount=14). I was hoping it'd be in a final release any time now.

n0valis commented 6 years ago

I am on Debian x86 and would need a 32-bit version. Cannot compile myself.

PlusMinus0 commented 6 years ago

Okay, I am sick and finally got to spend some time on this and this might actually work now. Please confirm.

(Refer to https://github.com/PlusMinus0/headless-jd2-docker/issues/8#issuecomment-332625076 )