[Pkg-zsh-devel] Bug#632514: zsh: architecture-dependent files in /usr/share
Axel Beckert
abe at debian.org
Sun Jul 3 01:30:46 UTC 2011
Package: zsh
Version: 4.3.12-1
Severity: serious
Since the bug fix for http://bugs.debian.org/430472 zsh ships so called
"zsh word code" (.zwc) files in the binary package and installs them
under /usr/share.
Unfortunately this kind of byte code is not identical on all
architectures. It seems to differ between big endian and little endian
architectures. An example:
sparc: abb2a53ddac4e191e7a0aef3f7c7c01d /usr/share/zsh/functions/VCS_Info/Backends.zwc
powerpc: abb2a53ddac4e191e7a0aef3f7c7c01d /usr/share/zsh/functions/VCS_Info/Backends.zwc
mips: abb2a53ddac4e191e7a0aef3f7c7c01d /usr/share/zsh/functions/VCS_Info/Backends.zwc
i386: 02d39ad457fd9eb51d8070be584d0e4b /usr/share/zsh/functions/VCS_Info/Backends.zwc
amd64: 02d39ad457fd9eb51d8070be584d0e4b /usr/share/zsh/functions/VCS_Info/Backends.zwc
armel: 02d39ad457fd9eb51d8070be584d0e4b /usr/share/zsh/functions/VCS_Info/Backends.zwc
kf-i386: 02d39ad457fd9eb51d8070be584d0e4b /usr/share/zsh/functions/VCS_Info/Backends.zwc
kf-amd64: 02d39ad457fd9eb51d8070be584d0e4b /usr/share/zsh/functions/VCS_Info/Backends.zwc
Looking at the difference between the two file variants with vbindiff
shows that the difference indeed seems to be in byte ordering:
i386: 0000 0000: 07 06 05 04 01 04 78 00 34 2E 33 2E 31 32 00 00 ......x. 4.3.12..
sparc: 0000 0000: 04 05 06 07 01 04 78 00 34 2E 33 2E 31 32 00 00 ......x. 4.3.12..
^^^^^^^^^^^
I'm not yet sure what's the best way to fix this. Many ideas come to my
mind:
a) Putting them in /usr/lib and make zsh search there
b) Putting them in /usr/lib and make symlinks to them in /usr/share
c) Generating them in postinst again, putting them in /var/lib and make
zsh search there
d) Generating them in postinst again, putting them in /var/lib and make
symlinks to them in /usr/share
e) Make two arch-independent packages, one called zsh-zwc-le and only to
be built on little endian architectures and one called zsh-zwc-be and
only to be built on big endian architectures. (This hack is probably
only policy-conforming if the files are installed in different
directories afterwards, i.e. if zsh-zwc-le and zsh-zwc-be could be
installed in parallel.)
f) Let upstream make the .zwc file format endianess-independent.
Solution e) would be the most disk space saving one and solution b) the
least intrusive one. So I currently prefer one of these two solutions,
although a) is also appealing. But I have not yet an idea how intrusive
solution a) would be.
I'm also not yet sure if this is an issue for upstream, too.
Lintian argued: I: zsh: arch-dep-package-has-big-usr-share 9122kB 84%
Out of these 9 MB, approximately 5 MB come from those .zwc files(*). So
solution e) is not so far-fetched as it may have seemed initially.
(*) Determined using "dpkg -L zsh | fgrep .zwc | xargs ls -l | awk
'{printf $5"+"}; END {print "0"}' | bc -l"
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (990, 'unstable'), (600, 'testing'), (400, 'stable'), (110, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash
Versions of packages zsh depends on:
ii libc6 2.13-8 Embedded GNU C Library: Shared lib
ii libcap2 1:2.21-1 support for getting/setting POSIX.
ii libncursesw5 5.9-1 shared libraries for terminal hand
Versions of packages zsh recommends:
ii libc6 2.13-8 Embedded GNU C Library: Shared lib
ii libpcre3 8.12-3 Perl 5 Compatible Regular Expressi
Versions of packages zsh suggests:
ii zsh-doc 4.3.12-1 zsh documentation - info/HTML form
-- no debconf information
More information about the Pkg-zsh-devel
mailing list