evince cbz support is broken on evince-2.30.3-0ubuntu1

Bug #599169 reported by Juanjo Marín
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
evince (Ubuntu)
Fix Released
Low
Jamie Strandboge
Lucid
Fix Released
Low
Jamie Strandboge
Maverick
Fix Released
Low
Jamie Strandboge

Bug Description

Binary package hint: evince

Hi. After the recent evince upgrade to evince-2.30.3-0ubuntu1 the cbz support is broken:

Unable to open document. File type Zip archive (application/zip) is not supported

I compiled evince_2.30.3.orig.tar.gz from https://launchpad.net/ubuntu/+source/evince/2.30.3-0ubuntu1 and the problem disappears. I don't know how to apply evince_2.30.3-0ubuntu1.diff.gz

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: evince 2.30.3-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic i686
Architecture: i386
Date: Mon Jun 28 01:01:07 2010
ExecutablePath: /usr/bin/evince
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: evince
XsessionErrors:
 (polkit-gnome-authentication-agent-1:1830): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (gnome-terminal:2186): Gtk-CRITICAL **: gtk_accel_map_unlock_path: assertion `entry != NULL && entry->lock_count > 0' failed
 (gnome-terminal:2206): Gtk-CRITICAL **: gtk_accel_map_unlock_path: assertion `entry != NULL && entry->lock_count > 0' failed
 (gnome-panel:1837): EggSMClient-CRITICAL **: egg_sm_client_set_mode: assertion `global_client == NULL || global_client_mode == EGG_SM_CLIENT_MODE_DISABLED' failed

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :
Revision history for this message
Pedro Villavicencio (pedro) wrote :

I'm getting the same behavior here confirming. Didier may you have a look to it? thanks.

Changed in evince (Ubuntu):
assignee: nobody → Didier Roche (didrocks)
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

As the upstream change was from Juanjo, he told me he will have a try there, so, just waiting for now

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

Hi, I'm taking a look but I don't yet why this doesn't work on Ubuntu. AFAIK, it's something related with the mime type management. I'll keep working on this.

BWT, this package shows a warning during its instalation:

Selecting previously deselected package evince.
(Reading database ... 592180 files and directories currently installed.)
Unpacking evince (from .../evince_2.30.3-0ubuntu1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.es_ES.utf8.cache...
Processing triggers for desktop-file-utils ...
Processing triggers for gconf2 ...
WARNING: Failed to parse default value `[????????? ???????;gnome-appearance-properties.desktop,????????? ???????????? ???????????;gnome-default-applications.desktop,?????????? ??????????;system-config-printer.desktop] ' for schema (/schemas/apps/control-center/cc_actions_list)
Processing triggers for python-support ...
Setting up evince (2.30.3-0ubuntu1) ...

Any idea about the meaning of this warning message?

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

This is a known issue on maverick, nothing related to that package.

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

Do you mean lucid, don't you ? Maverick is on the way :)

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

hum no, this is on maverick (yeah, it's in development), if you get that on lucid, please, open a bug report :)

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote : Re: [Bug 599169] Re: evince cbz support is broken on evince-2.30.3-0ubuntu1

On mer., 2010-06-30 at 07:40 +0000, Didier Roche wrote:
> hum no, this is on maverick (yeah, it's in development), if you get that
> on lucid, please, open a bug report :)
>

No need in fact, seb128 just told me that I can happen in some case on
lucid as well.
(and it's fixed now in maverick).

In any case, that doesn't impact your package installation and this
particular regression there.

Revision history for this message
Afterlifesol (afterlifesol) wrote :

I'm also getting this bug.
Using 2.30.3
on Ubuntu 10.04

Evey CBZ I try to open says "File type Zip archive (application/zip) is not supported" (Close)

Most CBZs worked fine before the last update (Unless they have [] in filename)
now they all are bad.

CBR still work fine.

Also from the notes:
- Fix opening cbz files with [] in archive (Juanjo Marín)
Thanks for fixing this issue, now if just the rest of the bugs would get out of our/your way.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Can you please provide a non working CBZ file so that I can check upstream without the ubuntu patch?

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :
Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

This is what I've got so far. Evince calls zipnote to get some info. This is a typical calling:

   /usr/bin/zipnote '/home/jjmarin/Desktop/jjmarin.cbz'

However, there is a permission problem:

   Unable to read file: Failed to execute child process "/usr/bin/zipnote" (Permission denied)

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

adding /usr/bin/zipnote ixr on /etc/apparmor.d/abstractions/evince

and

sudo apparmor_parser -r -W -T /etc/apparmor.d/usr.bin.evince

fixes the problem ! ... At least !!!!

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Jamie, can you have a look at Juanjo's comment on #13? It seems to fix an issue with .cbz file on evince by activating some switch in apparmor.
As you modified the apparmor profile, I would prefer having your input there, thanks :)

Revision history for this message
Sokak (tatarasokak) wrote :

Yay! Adding on apparmor profile the line as in comment #12, it all started to work again flawlessly for cbz files.

Both opening and thumbnailing them.

Im on ubuntu 10.04 amd64 kernel 2.6.32-23-generic, evince 2.30.3-0ubuntu1 shipped thru default repos.

That sadly hasnt fixed cbt and cb7 thumbnailing/viewing, but what was vital was to have my cbz thumbs back ^^

I had no errors while installing evince (i uninstalled it during my various attempts to have back my cbz thumbnails, and reinstalled it, and no warnings/errors at all.)

Im new to ubuntu, where i can find more info on the method that was used to realize how apparmor was causing this bug?

Revision history for this message
slumbergod (slumbergod) wrote :

Thanks Juanjo, your instructions in #13 fixed the cbz issue for me! I am happy to be able to read comics again in evince.

Anyone else trying it, don't forget the trailing comma after ixr
/usr/bin/zipnote ixr,

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

#15
Sokak,

For enabling cbt files, add

 /bin/tar ixr,

 /etc/apparmor.d/abstractions/evince

and

sudo apparmor_parser -r -W -T /etc/apparmor.d/usr.bin.evince

These bugs are because Ubuntu doesn't allow evince to execute 3rd apps for security reasons, only the ones explicitally authorized by apparmor. However, Ubuntu misses some apps like zipnote and tar.

Some more info about apparmor in https://wiki.ubuntu.com/AppArmor

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

#15

about cb7 files, right now Ubuntu only opens these files with 7zr (it comes with the 7zip package). In order to open with the 7zip-full package, you need to add

  /usr/bin/7z ixr,
  /usr/lib/p7zip/7z ixr,
  /usr/bin/7za ixr,
  /usr/lib/p7zip/7za ixr,

in /etc/apparmor.d/abstractions/evince (well, only 7za is enough) as in the previous comments.

By no, I don't know why thumbnaling cb7 files fails, I will take a look when I have more time

Revision history for this message
Sokak (tatarasokak) wrote :

Juanjo, thank you very much for your hints!

Im stuffing these lines right now, and indeed i will never be enough thankful to you :)

At first, i was scared to peep into launchpad, it just looked too techy to me, but i had just to lurk a bit to see what good and hard work is going on here, and that once you learn to get your hands dirt in the shell, it itsnt too bad :D (next one wll be to learn how to compile, but im going in sort of the right direction)

I think i will open a little blog to link all those helpful hints i discovered here: looks like google cant manage to pop out such solutions without flooding with garbage and double links on the result pages :/

Also i am italian, and sometimes i find difficult to have a bingo without googling a few to narrow down the search...

Ill try to learn more and help other people too, Cheers :)

Revision history for this message
Sam L. (somethinginteres) wrote :

I just want to check: is this something a fix will be (can be) released for? Or is the manual fix the only solution?

Thanks.

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

#20

Sam,

This changes can be released to be applied automatically.

tags: added: apparmor
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

re cbz> I can confirm this. Note that evince in Lucid release worked fine with the attached cbz file, but evince in lucid-updates changed to add zipnote support and the apparmor profile was not adjusted. There is a test script in qa-regression-testing (QRT) for evince that would have caught this.

re p7zip-full> confirmed. Note that this only hits when p7zip-full is installed and p7zip is not installed.

re cbt> confirmed. I've created a cbt file and added it to QRT

@Didier, I have committed this in to the bzr branch for evince (r80). Feel free to push to maverick and SRU for lucid.

Changed in evince (Ubuntu):
status: Triaged → Fix Committed
Changed in evince (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Didier Roche (didrocks)
Changed in evince (Ubuntu Maverick):
assignee: Didier Roche (didrocks) → Jamie Strandboge (jdstrand)
Changed in evince (Ubuntu Maverick):
status: Fix Committed → Fix Released
Changed in evince (Ubuntu Lucid):
assignee: Didier Roche (didrocks) → Jamie Strandboge (jdstrand)
milestone: none → ubuntu-10.04.1
status: Triaged → In Progress
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

== SRU ==
1. after upgrading to 2.30.3-0ubuntu1 from lucid release, cbz files are broken because evince changed the way it opens the files and apparmor is blocking access to the zipnote binary. Also, cbt files are blocked by the apparmor profile (needs access to tar) and people using p7zip-full without p7zip installed cannot open cb7 files.

2. the bug has been addressed in the development release (2.30.3-0ubuntu3) by adjusting the apparmor profile to have:
  /usr/bin/7za ixr,
  /usr/lib/p7zip/7za ixr,
  /usr/bin/zipnote ixr,
  /bin/tar ixr,

3. patch is attached

4. TEST CASE:
- try to open the attached cbz file
- try to open a cb7 file with p7zip-full installed and p7zip uninstalled
- try to open a cbt file

Example comicbook files can be found in the data directory of the qa-regression-testing bzr branch (data/*.cb*).

5. The regression potential is considered very low since the profile simply adds access to the binaries required to open the files. The profile uses 'i' for 'inherit', so these binaries cannot be used to bypass existing apparmor protections.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Uploaded 2.30.3-0ubuntu1.1 to lucid-proposed.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted evince into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in evince (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

After installing 2.30.3-0ubuntu1.1 from lucid-proposed, all the test cases now work. I also used test-evince.py from QRT and the new package introduced no regressions.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Variate (varunrajan09) wrote :

Installed evince from lucid-proposed and that solved the .cbz problem. Thanks.

Also, is there any way to open .cbr in evince? I normally extract .cbr files and re-compress them to a new .cbz file.

Revision history for this message
Juanjo Marín (juanj-marin-deactivatedaccount) wrote :

#27

Variate, Evince can open cbr files but it needs the unrar or unrar-free package for opening cbr files

unrar is a no-charge proprietary (freeware) program by RARLABS
unrar-free is free (as freedom) software by the Gna! project for decompressing rar files, however, it doesn't manage the lastest versions of the rar format, so it can't open all the rar files.

Your practice of re-compressing cbr into cbz files is not so bad, because cbz is a much more open format than cbr.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package evince - 2.30.3-0ubuntu1.1

---------------
evince (2.30.3-0ubuntu1.1) lucid-proposed; urgency=low

  * debian/apparmor-profile.abstraction:
    - allow ixr for tar, to allow opening of cbt files
    - allow ixr for 7za, to allow opening of cbz files when using p7zip-full
    - allow ixr for zipnote, to allow opening of cbz files with newer evince
      (LP: #599169)
 -- Jamie Strandboge <email address hidden> Tue, 06 Jul 2010 12:09:09 -0500

Changed in evince (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Andrea Falco (fox91fox) wrote :

I have the same problem with evince 3.10.3-0ubuntu10.1 on ubuntu 14.04.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.