Bug 221394 - graphics/evince: does not open CBR files
Summary: graphics/evince: does not open CBR files
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
Depends on:
Reported: 2017-08-10 16:31 UTC by Victor Sudakov
Modified: 2020-11-20 15:10 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)

svn-diff-evince-unrar (775 bytes, patch)
2018-02-24 10:16 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-evince-unrar_v2 (653 bytes, patch)
2018-02-24 10:18 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2017-08-10 16:31:33 UTC
graphics/evince evince-3.18.2_3 does not open comics in CBR format after "pkg upgrade"

The error message is

Unable to open document “file:///home/sudakov/Tangled.cbr”.
File type RAR archive (application/vnd.rar) is not supported
Comment 1 Victor Sudakov 2017-08-10 16:32:51 UTC
Upgrade to evince 3.22 may solve the problem.
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-02-20 18:49:29 UTC
In the meantime 3.26.0. Does the problem still exist?
Comment 3 Victor Sudakov 2018-02-23 18:06:10 UTC
(In reply to w.schwarzenfeld from comment #2)
Looks like it's fixed now.
Comment 4 Victor Sudakov 2018-02-23 18:11:03 UTC
Nope, evince still does not open them. .cb? files were associated with a different app so it seemed to work, but no, sorry.
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-02-23 18:39:18 UTC
Don't know if this relevant, but found this:


Providing more detail Bastien Nocera explains: “…we switched from using external tools for decompression [in Evince] to using lib archive […] for CBZ, CB7 and the infamous CBT, but used a copy/paste version of unarr to support RAR files, as
libarchive support lacks some needed features.”
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-02-23 19:16:16 UTC
The comicbooks reader graphics/comical, graphics/cbviewer, graphics/qcomicbook have unrar as dependency.
Comment 7 Victor Sudakov 2018-02-24 01:12:28 UTC
(In reply to w.schwarzenfeld from comment #6)
I currently use graphics/py-mcomix (supports RAR) but it's a pity you cannot just "pkg install gnome3" and view CBR files with the standard document viewer.
Comment 8 Walter Schwarzenfeld freebsd_triage 2018-02-24 10:16:59 UTC
Created attachment 190950 [details]

And this was it. Try this patch, only quick tested but should work.
Comment 9 Walter Schwarzenfeld freebsd_triage 2018-02-24 10:18:29 UTC
Created attachment 190951 [details]

Was a wrong line in it.
Comment 10 Ting-Wei Lan 2018-02-25 05:23:32 UTC
(In reply to w.schwarzenfeld from comment #5)
unarr is not unrar. Evince has an internal copy of unarr library under 'cut-n-paste' directory, so we should not have to add a dependency to enable it. However, I don't have any CBR files and I cannot check whether it really works.

Running 'git grep unrar' in a git checkout of evince shows nothing useful, so I assume evince never uses unrar. Even if it does, it looks bad to have a free program (evince) to unconditionally depend on a non-free program (unrar).
Comment 11 Walter Schwarzenfeld freebsd_triage 2018-02-25 06:14:06 UTC
Sorry, I was "believing" the reporter. And tested first with the "unrar-dependency".
So I had to see, evince opens cbr files on my system (without unrar) without any
Comment 12 Walter Schwarzenfeld freebsd_triage 2018-02-25 06:17:03 UTC
Could it be it is a problem with an other installed archiver program (which interfetes)?
Comment 13 Victor Sudakov 2018-02-25 09:20:47 UTC
(In reply to Ting-Wei Lan from comment #10)
> Even if it does, it looks bad to have a free program (evince) to unconditionally depend on a non-free program (unrar).

I'm afraid you are mistaken, unrar is free and it's in the ports collection. 

The rar archiver is not free, but you don't need rar to unpack rar archives.
Comment 14 Ting-Wei Lan 2018-02-25 12:55:18 UTC
(In reply to vas from comment #13)
I know the source code of unrar is publicly available, but its license makes it neither free software nor open source software. I believe it is why evince replaced the code using unrar with code using libarchive library. It was later improved by using the unarchiver-based unarr library because RAR support in libarchive is incomplete.
Comment 15 Silva 2020-03-11 13:47:54 UTC
Comment 16 george 2020-09-16 22:18:29 UTC
Comment 17 george 2020-09-20 16:21:57 UTC
Comment 18 george 2020-10-14 14:38:11 UTC
Comment 19 Cam4 2020-11-20 15:09:24 UTC
Comment 20 Cam4 2020-11-20 15:10:23 UTC