Bug 357057

Summary: Ark requires rar and unrar for opening/extracting RAR archives (same for e.g. zip)
Product: [Applications] ark Reporter: Wolfgang Bauer <wbauer1>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED FIXED    
Severity: normal CC: alien, rakuco, tago73
Priority: NOR    
Version: 15.12.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://bugzilla.opensuse.org/show_bug.cgi?id=959996
Latest Commit: Version Fixed In: 15.12.1

Description Wolfgang Bauer 2015-12-22 17:15:26 UTC
Since 15.12.0, ark now requires both rar and unrar being installed. If one is missing (rar in particular is not installed by default in openSUSE, it is actually not even included in the distribution), Ark just displays an error dialog:
Ark was not able to open xxx.rar. Failed to load a suitable plugin.

Make sure any executables needed to handle the archive type are installed.

Reproducible: Always

Steps to Reproduce:
1. Uninstall rar if it is installed, make sure unrar is installed
2. Try to open a RAR archive with Ark

Actual Results:  
Error message "Failed to load a suitable plugin"

Expected Results:  
RAR archive's content should be displayed, as unrar is installed. This was sufficient in earlier versions.

See also this openSUSE bug report:
https://bugzilla.opensuse.org/show_bug.cgi?id=959996
Comment 1 Elvis Angelaccio 2015-12-22 22:54:55 UTC
Confirming, thanks for reporting. This is a regression introduced by: https://phabricator.kde.org/rARK2d000a073b95fe1116eb349dbf3de6865d4f5cb6

We should fallback to "read-only" mode if Ark realizes that e.g. rar is not installed but unrar is. Btw this bug is not rar-specific, so I'm changing the title.
Comment 2 Eric Hameleers 2015-12-23 11:51:32 UTC
Please note: Slackware does not ship rar *nor* unrar and will not likely ever change that.

Is it possible to add a compile option so that "unrar" is not required and the RAR support of libarchive >= 3.02 (https://github.com/libarchive/libarchive/wiki/ReleaseNotes#libarchive-302) can be used instead?
Comment 3 Elvis Angelaccio 2015-12-23 15:19:35 UTC
(In reply to Eric Hameleers from comment #2)
> Please note: Slackware does not ship rar *nor* unrar and will not likely
> ever change that.
> 
> Is it possible to add a compile option so that "unrar" is not required and
> the RAR support of libarchive >= 3.02
> (https://github.com/libarchive/libarchive/wiki/ReleaseNotes#libarchive-302)
> can be used instead?
We could add such an option, but unfortunately RAR support in libarchive is not yet good enough (e.g. encrypted rar archives are not supported).

I'm actually working on a plugin for The Unarchiver [1]. They support a lot of archive formats and, more importantly, they claim to have full RAR support. Their cli frontends ( lsar and unar) are already shipped by the main Linux distributions, and Slackware could do the same (license is LGPL 2.1).

[1]: http://unarchiver.c3.cx/commandline
Comment 4 Elvis Angelaccio 2015-12-23 16:37:35 UTC
Git commit 087e5aab49c60ac5930742fe892fa930048e2f43 by Elvis Angelaccio.
Committed on 23/12/2015 at 16:35.
Pushed by elvisangelaccio into branch 'Applications/15.12'.

Fallback to read-only mode if there are no read-write executables

Commit 2d000a0 introduced executables check when loading a plugin. However the
current behavior is too restrictive: if one wants only to open a rar or a
zip archive, there is no need to require also the rar or zip program to be
installed. Plus, some distributions (e.g. Archlinux) ship only unrar in their
official repositories.

With this commit, Ark is able to understand that e.g. unrar is installed but
rar is not. In this case, Ark can and should fallback to read-only mode,
to disable the Add/Delete actions in the toolbar.
FIXED-IN: 15.12.1

CC: rthomsen6@gmail.com

M  +3    -0    kerfuffle/archive_kerfuffle.cpp

http://commits.kde.org/ark/087e5aab49c60ac5930742fe892fa930048e2f43
Comment 5 Elvis Angelaccio 2015-12-23 18:51:02 UTC
*** Bug 357104 has been marked as a duplicate of this bug. ***
Comment 6 Wolfgang Bauer 2015-12-23 20:36:17 UTC
I can confirm that the fix works.

Thanks a lot!
Comment 7 tago 2015-12-24 09:07:54 UTC
Thanks a lot... :)