Bug 710609

Summary: Encoding of files in zip files from Windows is broken
Product: [openSUSE] openSUSE 11.4 Reporter: Michal Svec <msvec>
Component: BasesystemAssignee: Philipp Thomas <pth>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: anixx, dvaleev, lazy.kent, lnussel, meissner, msvec, pavel, pth
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: .
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Deadline: 2011-10-04   
Attachments: Testing zip file

Description Michal Svec 2011-08-05 08:38:15 UTC
Created attachment 444343 [details]
Testing zip file

Bug 540598 - "Encoding of cyrillic filenames in zip archive, created under
Windows, is incorrect" got reintroduced, on 11.4 it's broken again.

I tried both with a file from the original bug report:
https://bugzilla.novell.com/attachment.cgi?id=319015

As well as with a brand new created file (see attached).

The extracted files have broken encoding and therefore can't be even opened
by many applications.
Comment 1 Kyrill Detinov 2011-08-05 09:20:14 UTC
You must install librcc0 package.

Somebody removed direct dependency on librcc:
https://build.opensuse.org/package/rdiff?commit=17&linkrev=base&package=unzip&project=openSUSE%3A11.4

Then it works:
% LANG=cs_CZ.utf8 unzip -l attachment.zip
Archive:  attachment.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
   170300  08-04-2011 23:10   Tisk2/Do Steinhaus am Semmering, Rakousko.pdf
    79564  08-04-2011 22:55   Tisk2/Historická železnice Semmering.pdf
    71689  08-04-2011 22:58   Tisk2/Klášter Neuberg.pdf
    72385  08-04-2011 22:53   Tisk2/Lanovka na Hirschenkogel.pdf
    69772  08-04-2011 23:00   Tisk2/Pohádkový les.pdf
    73802  08-04-2011 23:19   Tisk2/Přírodní park Hohe Wand.pdf
   140962  08-04-2011 23:26   Tisk2/Turisticka cesta planetami Obloha na zemi.pdf
   187492  08-04-2011 23:03   Tisk2/Z Sankt Georgen ob Judenburg, Rakousko domů.pdf
   139896  08-04-2011 23:17   Tisk2/Z Steinhaus am Semmering do Hohe Wand.pdf
---------                     -------
  1005862                     9 files
Comment 2 Michal Svec 2011-08-05 09:48:45 UTC
(In reply to comment #1)
> You must install librcc0 package.
> 
> Somebody removed direct dependency on librcc:
> https://build.opensuse.org/package/rdiff?commit=17&linkrev=base&package=unzip&project=openSUSE%3A11.4

That obviously broke it again (the library isn't even installed by default).
Ludwig, can you please revert your change?

> Then it works:
> % LANG=cs_CZ.utf8 unzip -l attachment.zip

It still does not work for me:

bash$ rpm -q librcc0
librcc0-0.2.9-5.1.x86_64

bash$ LANG=cs_CZ.UTF-8 unzip -l Tisk2.zip
Archive:  Tisk2.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
    79564  08-04-2011 22:55   Tisk2/Historick?? ??eleznice Semmering.pdf
    71689  08-04-2011 22:58   Tisk2/Kl????ter Neuberg.pdf
[...]
Comment 3 Kyrill Detinov 2011-08-05 10:10:35 UTC
I see system unzip doesn't work for me too.
There is another open bug:
https://bugzilla.novell.com/show_bug.cgi?id=620483

I use unzip from home:Lazy_Kent repo. 
https://build.opensuse.org/package/show?package=unzip&project=home%3ALazy_Kent
Comment 4 Philipp Thomas 2011-08-05 12:10:22 UTC
Michal, for the time being try Archiving/zip as Archiving builds for 11.4. I've just checked in unzip with the patch Kyrill already applies. For an update we'd need an OK from maintenance.
Comment 5 Michal Svec 2011-08-05 13:35:56 UTC
The unzip package from Archiving/11.4 repo seems to work fine.

That is, it works fine provided that the librcc0 library is installed.
We should either put back the requirement to the spec, or _at least_
make librcc0 a part of the default package selection, that should make
sure unzip is not broken in most of the installs.
Comment 6 Philipp Thomas 2011-08-05 14:44:08 UTC
It shouldn't be in the default selection, but packageand should be a solution. But here you guys must help me to determine what packages are common in your locale and thus would trigger the install of librcc.
Comment 7 Michal Svec 2011-08-05 15:53:18 UTC
LibZYPP can do language dependencies, just use those (it's either
a dependency in the spec file or a language-based selection, can't
recall exactly now).

Though I still believe we should put it to the default selection,
having some users receive broken zip files just because sender used
a different locale sounds ... broken.
Comment 8 Philipp Thomas 2011-08-05 16:19:37 UTC
OK, so which languages should trigger librcc0? BTW, putting a hard requires into the package does pull in too much.
Comment 9 Michal Svec 2011-08-05 16:25:04 UTC
(In reply to comment #8)
> OK, so which languages should trigger librcc0?

I would say all which are broken :) I have no clue how to find out,
I would expect everything not using latin1 would be broken.

> BTW, putting a hard requires into the package does pull in too much.

Do you mean in terms of the default selection? For me it just dragged
in another 2 packages, that's it. Or what exactly do you mean?
Comment 10 Kyrill Detinov 2011-08-05 16:25:28 UTC
Philipp, librcc0 supports languages (from /etc/rcc.xml):
ru, uk, be, bg, cs, et, hr, hu, lt, lv, pl, sk, sl, de, fr, es, it, sv.
Comment 11 Marcus Meissner 2011-08-08 13:27:20 UTC
which languages require it. de works fine as-is I think, even without librcc0.

aklso the "suggests: librcc0" shpould pull it in , but perahps it needs to be Recommends: librcc0


Please NEEDINFO maintenance@opensuse.org again once you have decided on a course
Comment 12 Ludwig Nussel 2011-08-22 08:47:00 UTC
Fri Jan 28 13:50:13 UTC 2011 - lnussel@suse.de

- use dlopen for librcc0. A direct requires causes lots of other
  packages to get installed such as aspell which bloats a minimal
  install.
Comment 13 Ludwig Nussel 2011-08-22 08:59:20 UTC
you could probably use packageand(unzip:aspell) as trigger or put librcc0 in the default pattern as it doesn't really hurt there.
Comment 14 Philipp Thomas 2011-08-23 12:38:49 UTC
OK, librcc0 with the packageand submitted for factory.
Comment 15 Philipp Thomas 2011-08-23 17:26:32 UTC
Reopen to possibly do an update for 11.4.
Comment 16 Philipp Thomas 2011-08-23 17:27:54 UTC
reopen.
Comment 17 Philipp Thomas 2011-08-23 17:28:37 UTC
Maintenance team, would this warrant an update?
Comment 18 Michal Svec 2011-08-23 17:49:26 UTC
(In reply to comment #14)
> OK, librcc0 with the packageand submitted for factory.

Shouldn't it have Recommends:librcc0 as well?
Or how do those two relate to each other? Can't find any docu :-/
Comment 19 Philipp Thomas 2011-08-23 18:06:32 UTC
No recommends because then librcc is always pulled in. Unzip has a 

suggests: librcc0

which must suffice and it should, given that librcc0 is pulled in if unzip and aspell are going to be installed.
Comment 20 Michal Svec 2011-08-23 18:09:53 UTC
(In reply to comment #19)
> No recommends because then librcc is always pulled in. Unzip has a
> suggests: librcc0

That's Requires, not Recommends AFAIK.

> which must suffice and it should, given that librcc0 is pulled in if unzip
> and aspell are going to be installed.

I guess that should work (not sure why aspell in particular, but anyways).
Comment 21 Philipp Thomas 2011-08-23 18:24:16 UTC
Zypper seems to treat recommends like requires. Aspell because that's what likely gets installed on a non english speaking system?
Comment 22 Kyrill Detinov 2011-08-23 18:41:47 UTC
What about Provides: locale(ru;uk;be; ... ;cs) for librcc0?
Comment 24 Marcus Meissner 2011-09-01 15:52:20 UTC
what is the way you want to go for fixing this?
Comment 25 Philipp Thomas 2011-09-01 17:21:30 UTC
As Ludwig suggested in comment 12 and as I've done for Factory, issuing a librcc0 that has packageand(unzip:aspell) and thus gets pulled in on fresh installs without having a hard requires.
Comment 26 Swamp Workflow Management 2011-09-06 14:33:05 UTC
The SWAMPID for this issue is 43058.
This issue was rated as low.
Please submit fixed packages until 2011-10-04.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/43058
Comment 27 Christian Dengler 2011-09-20 15:57:56 UTC
Be so kind and submit the fixed sources. Patchinfo is already available.
Comment 28 Philipp Thomas 2011-09-20 17:23:29 UTC
Submitted as SR 83956.
Comment 29 Swamp Workflow Management 2011-09-28 14:47:07 UTC
Update released for: librcc-devel, librcc0, librcc0-debuginfo, librcc0-debugsource, rcc-runtime, rcc-runtime-debuginfo
Products:
openSUSE 11.4 (debug, i586, x86_64)
Comment 30 Bernhard Wiedemann 2012-05-11 10:00:10 UTC
This is an autogenerated message for OBS integration:
This bug (710609) was mentioned in
https://build.opensuse.org/request/show/120682 Factory / librcc0