Bug#993539: [Pkg-zsh-devel] Bug#993539: "functions/Misc.zwc" isn't compiled from the bundled source files

2021-09-04 Thread Axel Beckert
Hi Leo,

Leo Gama wrote:
> Oh, I see it now. Maybe I even read this comment, but before understanding
> what was going on, so haven't got my attention.

No problem. :-)

> For the fix, is it possible to edit the 'configure' file that sets the
> 'runhelpdir' variable before compilation?

No need for that, I think. The configure script has an option to set
the runhelpdir variable on the commandline:

  --enable-runhelpdir=DIR the directory in which to install run-help files

Will try that first and see if we can fix the issue that way. Would be
much preferred to patching.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#993539: [Pkg-zsh-devel] Bug#993539: "functions/Misc.zwc" isn't compiled from the bundled source files

2021-09-04 Thread Leo Gama
[image: image.gif][image: image.gif]Hi, Axel.

Thanks for the prompt response.

Hrm, yes, but this is caused by this sed call in debian/rules:


  # Doesn't this need to go before we zcompile stuff into .zwc files? --
Axel
sed -i -e 's,^local HELPDIR=.*,local
HELPDIR=$${HELPDIR:-/usr/share/zsh/help},;
s,:-more,:-/usr/bin/pager,;' \
debian/zsh-common/usr/share/zsh/functions/Misc/run-help
sed -i -e '1!b;s:^#!.*[ /]zsh:#!/bin/zsh:;s#/usr/local/bin#/usr/bin#;'
\
`find debian/zsh-common/usr/share/zsh/functions -type f`

Oh, I see it now. Maybe I even read this comment, but before understanding
what was going on, so haven't got my attention.

For the fix, is it possible to edit the 'configure' file that sets the
'runhelpdir' variable before compilation? The path is not hardcoded in the
'run-help' source file. Something in the lines of:

sed -i -e "s,/'\$${VERSION}'/,/," configure


or even

sed -i -e 's,/[^/]\+/\(functions\|help\),/\1,' configure



Best,
Leonardo Gama

Em qui., 2 de set. de 2021 às 23:54, Axel Beckert  escreveu:

> Control: retitle -1 zsh: Modifying HELPDIR comes too late, doesn't catch
> .zwc files
> Control: tag -1 + confirmed
>
> Hi Leo,
>
> Leo Gama wrote:
> > Subject: "functions/Misc.zwc" isn't compiled from the bundled source
> files
>
> Sorry, but that's clearly not true: Since zsh_5.8.orig.tar.xz does not
> contain any .zwc file, all .zwc files in the binary packages can't be
> anything else than compiled from the bundled source at package build
> time.
>
> > If I try to call "run-help" at a ZSH prompt, it reports:
> > > $ run-help
> > > There is no list of special help topics available at this time.
>
> Can confirm that, though.
>
> > And trying to use it to see the help text for any built-in command just
> > opens a man page for zsh...
> >
> > Turns out that the default HISTDIR (which is wrong) in the file that
> > contains the bytecode compiled version of "run-help" is different from
> the
> > default in the source code "run-help" file:
> > > $ grep 'HELPDIR:-/' /usr/share/zsh/functions/Misc/run-help
> > > local HELPDIR=${HELPDIR:-/usr/share/zsh/help}
> > > $ strings /usr/share/zsh/functions/Misc.zwc | grep 'HELPDIR:-/'
> > > HELPDIR:-/usr/share/zsh/5.8/help
> > > HELPDIR:-/usr/share/zsh/5.8/help
>
> Hrm, yes, but this is caused by this sed call in debian/rules:
>
>   # Doesn't this need to go before we zcompile stuff into .zwc files? --
> Axel
> sed -i -e 's,^local HELPDIR=.*,local
> HELPDIR=$${HELPDIR:-/usr/share/zsh/help},; s,:-more,:-/usr/bin/pager,;' \
> debian/zsh-common/usr/share/zsh/functions/Misc/run-help
> sed -i -e '1!b;s:^#!.*[
> /]zsh:#!/bin/zsh:;s#/usr/local/bin#/usr/bin#;' \
> `find debian/zsh-common/usr/share/zsh/functions -type f`
>
> Actually your issue is already mentioned in form of the question in
> the comment in front of that rule. Or in other words: Your bug report
> just answered that question with "yes". :-)
>
> Retitling the bug report accordingly.
>
> Regards, Axel
> --
>  ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
> : :' :  |  Debian Developer, ftp.ch.debian.org Admin
> `. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
>   `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
>


Bug#993539: [Pkg-zsh-devel] Bug#993539: "functions/Misc.zwc" isn't compiled from the bundled source files

2021-09-02 Thread Axel Beckert
Control: retitle -1 zsh: Modifying HELPDIR comes too late, doesn't catch .zwc 
files
Control: tag -1 + confirmed

Hi Leo,

Leo Gama wrote:
> Subject: "functions/Misc.zwc" isn't compiled from the bundled source files

Sorry, but that's clearly not true: Since zsh_5.8.orig.tar.xz does not
contain any .zwc file, all .zwc files in the binary packages can't be
anything else than compiled from the bundled source at package build
time.

> If I try to call "run-help" at a ZSH prompt, it reports:
> > $ run-help
> > There is no list of special help topics available at this time.

Can confirm that, though.

> And trying to use it to see the help text for any built-in command just
> opens a man page for zsh...
> 
> Turns out that the default HISTDIR (which is wrong) in the file that
> contains the bytecode compiled version of "run-help" is different from the
> default in the source code "run-help" file:
> > $ grep 'HELPDIR:-/' /usr/share/zsh/functions/Misc/run-help
> > local HELPDIR=${HELPDIR:-/usr/share/zsh/help}
> > $ strings /usr/share/zsh/functions/Misc.zwc | grep 'HELPDIR:-/'
> > HELPDIR:-/usr/share/zsh/5.8/help
> > HELPDIR:-/usr/share/zsh/5.8/help

Hrm, yes, but this is caused by this sed call in debian/rules:

  # Doesn't this need to go before we zcompile stuff into .zwc files? -- Axel
sed -i -e 's,^local HELPDIR=.*,local 
HELPDIR=$${HELPDIR:-/usr/share/zsh/help},; s,:-more,:-/usr/bin/pager,;' \
debian/zsh-common/usr/share/zsh/functions/Misc/run-help
sed -i -e '1!b;s:^#!.*[ /]zsh:#!/bin/zsh:;s#/usr/local/bin#/usr/bin#;' \
`find debian/zsh-common/usr/share/zsh/functions -type f`

Actually your issue is already mentioned in form of the question in
the comment in front of that rule. Or in other words: Your bug report
just answered that question with "yes". :-)

Retitling the bug report accordingly.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE