* [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
@ 2020-03-26 14:20 Roman Perepelitsa
2020-03-28 0:23 ` Ray Andrews
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Roman Perepelitsa @ 2020-03-26 14:20 UTC (permalink / raw)
To: Zsh Users
It is my pleasure to announce zsh-bin: statically-linked, hermetic,
relocatable zsh distribution.
Project home: https://github.com/romkatv/zsh-bin.
If you'd like to use zsh 5.8 on a machine where it's not provided by
the official package manager, give zsh-bin a try. This project
consists of 3 parts: build script, prebuilt zsh for popular platforms,
and install script.
1. Standalone `build` script.
sh -c "$(curl -fsSL
https://raw.githubusercontent.com/romkatv/zsh-bin/master/build)"
Running this on x86_64 Linux will produce zsh-5.8-linux-x86_64.tar.gz
in the current directory. This 3MB archive contains statically-linked,
hermetic, relocatable zsh 5.8. Installation of zsh from the archive
doesn't require libc, ncurses, pcre, terminfo database or root access.
As long as the target machine has a compatible CPU and kernel, it'll
work.
To install zsh from the archive to ~/.zsh-bin, copy it to the home
directory on the target machine and run:
tar -C ~ -xzf ~/zsh-5.8-linux-x86_64.tar.gz
mv ~/zsh-5.8-linux-x86_64 ~/.zsh-bin
~/.zsh-bin/share/zsh/5.8/scripts/relocate
Add ~/.zsh-bin/bin to PATH and enjoy zsh 5.8. To uninstall, remove ~/.zsh-bin.
This distributions of zsh should behave not worse than any native
distribution (and even better than some). It's compiled with iconv,
ncursesw and pcre support. It contains an embedded terminfo database
and help files. `man zsh` works, too.
2. Prebuilt zsh-5.8-${KERNEL}-${ARCH}.tar.gz.
Prebuilt archives are available for a dozen of the most popular
platforms: https://github.com/romkatv/zsh-bin/releases.
Linux 32/64-bit Intel/ARM (works on Android, too)
FreeBSD 64-bit Intel
macOS 64-bit Intel
Cygwin 32/64-bit Intel
MSYS/MINGW 32/64-bit Intel
3. Standalone `install` script.
While you can use the manual installation method described above,
there is also a script that makes it a bit easier and safer.
sh -c "$(curl -fsSL
https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
This will download appropriate zsh-5.8-${KERNEL}-${ARCH}.tar.gz from
https://github.com/romkatv/zsh-bin/releases and install zsh from it to
~/.zsh-bin. The same script can also be used to install from a custom
URL or from file. Run `install -h` for the list of all options.
Roman.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-03-26 14:20 [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh Roman Perepelitsa
@ 2020-03-28 0:23 ` Ray Andrews
2020-03-28 10:37 ` Sebastian Gniazdowski
2020-04-05 15:46 ` Ray Andrews
2 siblings, 0 replies; 15+ messages in thread
From: Ray Andrews @ 2020-03-28 0:23 UTC (permalink / raw)
To: zsh-users
On 2020-03-26 7:20 a.m., Roman Perepelitsa wrote:
Roman:
Haven't upgraded for a while cuz I always forget how to do it and
something is always lost, like ncursesw.
> It is my pleasure to announce zsh-bin: statically-linked, hermetic,
> relocatable zsh distribution.
Would you elaborate on this a bit? What is 'hermetic'? Does
relocatable mean that I can just move the
target directory to anything/anywhere and so long as 'zsh' if found, all
else will work?
Which of the three methods below would be recommended? The third looks
best?
I'm running Debian 'amd64' so which image? I'm thinking:
zsh-5.8-linux-x86_64.tar.gz
<https://github.com/romkatv/zsh-bin/releases/download/v3.0.0/zsh-5.8-linux-x86_64.tar.gz>
or will:
> sh -c "$(curl -fsSL
> https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
Handle it all? And do I understand that the whole thing will be in one
subdirectory?
That's very nice, I hate the way things leave parts of themselves all
over the place.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-03-26 14:20 [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh Roman Perepelitsa
2020-03-28 0:23 ` Ray Andrews
@ 2020-03-28 10:37 ` Sebastian Gniazdowski
2020-03-28 14:02 ` Roman Perepelitsa
2020-04-05 15:46 ` Ray Andrews
2 siblings, 1 reply; 15+ messages in thread
From: Sebastian Gniazdowski @ 2020-03-28 10:37 UTC (permalink / raw)
To: Roman Perepelitsa; +Cc: Zsh Users
On Thu, 26 Mar 2020 at 15:22, Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
>
> It is my pleasure to announce zsh-bin: statically-linked, hermetic,
> relocatable zsh distribution.
>
> Project home: https://github.com/romkatv/zsh-bin.
>
> If you'd like to use zsh 5.8 on a machine where it's not provided by
> the official package manager, give zsh-bin a try. This project
> consists of 3 parts: build script, prebuilt zsh for popular platforms,
> and install script.
>
> 1. Standalone `build` script.
>
> sh -c "$(curl -fsSL
> https://raw.githubusercontent.com/romkatv/zsh-bin/master/build)"
I've ran the script and the resulting zsh seems to not support dynamic
loading at all. I.e.: external modules like zdharma/zredis cannot be
loaded. Could this be changed? I.e.: general support for dynamic
loading of modules enabled?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-03-28 10:37 ` Sebastian Gniazdowski
@ 2020-03-28 14:02 ` Roman Perepelitsa
2020-03-28 16:06 ` Ray Andrews
0 siblings, 1 reply; 15+ messages in thread
From: Roman Perepelitsa @ 2020-03-28 14:02 UTC (permalink / raw)
To: Sebastian Gniazdowski; +Cc: Zsh Users
On Sat, Mar 28, 2020 at 1:24 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
> What is 'hermetic'?
It means Zsh from zsh-bin doesn't require any files from outside of
its installation directory to function. Perhaps "self-contained" would
be a better word.
> Does relocatable mean that I can just move the target directory
> to anything/anywhere and so long as 'zsh' if found, all else will
> work?
Relocatable means you can install Zsh from zsh-bin into any directory.
This isn't the case for other distributions. Usually, after Zsh is
compiled, it can work only when placed in a specific directory.
You can find more details in https://github.com/romkatv/zsh-bin/#how-it-works.
> Which of the three methods below would be recommended?
Installation with the install script is the easiest by far. It's also
safer thanks to signature verification and extra care to avoid
clobbering an existing installation.
Manual installation is for those who like to tinker. It also serves as
an explanation of what `install` does.
The option to build your own archive is for those who like to tinker
even more. Note that you can also use the install script to install
Zsh from an archive you've built yourself.
> I'm running Debian 'amd64' so which image?
> I'm thinking: zsh-5.8-linux-x86_64.tar.gz
That's right. The manual installation instructions show the basic
algorithm for deriving the name of the archive from the OS kernel name
and CPU architecture.
kernel=$(uname -s | tr '[A-Z]' '[a-z]')
arch=$(uname -m | tr '[A-Z]' '[a-z]')
name="zsh-5.8-${kernel}-${arch}"
See https://github.com/romkatv/zsh-bin#manual-installation. The
install script is a bit smarter than this.
Since the name of your OS kernel is Linux and CPU architecture is
x86_64, zsh-5.8-linux-x86_64.tar.gz will work.
> And do I understand that the whole thing will be in one subdirectory?
Yes. You can simply remove this directory to "uninstall".
On Sat, Mar 28, 2020 at 11:37 AM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> I've ran the script and the resulting zsh seems to not support dynamic
> loading at all.
Indeed. I've added this limitation to the documentation:
Zsh from zsh-bin cannot load user-defined compiled modules. There
no way to guarantee that user-defined modules have been linked
with the same libc as `zsh`, so it's unsafe to load them. This
limitation likely cannot be removed.
Roman.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-03-28 14:02 ` Roman Perepelitsa
@ 2020-03-28 16:06 ` Ray Andrews
2020-03-28 16:16 ` Roman Perepelitsa
0 siblings, 1 reply; 15+ messages in thread
From: Ray Andrews @ 2020-03-28 16:06 UTC (permalink / raw)
To: zsh-users
On 2020-03-28 7:02 a.m., Roman Perepelitsa wrote:
> It means Zsh from zsh-bin doesn't require any files from outside of
> its installation directory to function. Perhaps "self-contained" would
> be a better word.
That has to be good. Self-contained and modular, no threads running
here and there.
> Zsh from zsh-bin cannot load user-defined compiled modules. There
> no way to guarantee that user-defined modules have been linked
> with the same libc as `zsh`, so it's unsafe to load them. This
> limitation likely cannot be removed.
What are the consequences of this for an ordinary user?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-03-28 16:06 ` Ray Andrews
@ 2020-03-28 16:16 ` Roman Perepelitsa
2020-03-28 16:27 ` Ray Andrews
0 siblings, 1 reply; 15+ messages in thread
From: Roman Perepelitsa @ 2020-03-28 16:16 UTC (permalink / raw)
To: Ray Andrews; +Cc: Zsh Users
On Sat, Mar 28, 2020 at 5:07 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2020-03-28 7:02 a.m., Roman Perepelitsa wrote:
> > Zsh from zsh-bin cannot load user-defined compiled modules. There
> > no way to guarantee that user-defined modules have been linked
> > with the same libc as `zsh`, so it's unsafe to load them. This
> > limitation likely cannot be removed.
>
> What are the consequences of this for an ordinary user?
If an ordinary user compiles a zsh module (*.so file) on their
machine, modifies module_path special parameter and attempts to load
the module with zmodload, they'll get an error.
The inability of zsh-bin to load user-defined modules will likely have
little to no practical consequences. Very few users use custom
compiled zsh modules in the first place. Those who do, virtually
always compile modules on the same machine where they use them. If
they can compile modules on a local machine, they likely have no use
for zsh-bin.
If you are unsure whether you are using custom zsh modules (directly
or indirectly), you aren't.
Roman.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-03-26 14:20 [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh Roman Perepelitsa
2020-03-28 0:23 ` Ray Andrews
2020-03-28 10:37 ` Sebastian Gniazdowski
@ 2020-04-05 15:46 ` Ray Andrews
2020-04-05 15:55 ` Roman Perepelitsa
2 siblings, 1 reply; 15+ messages in thread
From: Ray Andrews @ 2020-04-05 15:46 UTC (permalink / raw)
To: zsh-users
On 2020-03-26 7:20 a.m., Roman Perepelitsa wrote:
Roman:
> sh -c "$(curl -fsSL
> https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
That was so fast I thought nothing had happened :-)
One problem: After moving the entire directory out of the default
location to where I want it to be and setting link 'zsh' as appropriate:
0 /bin 3 $ zsh
/root/.zshrc:64: colors: function definition file not found
/root/.zshrc:65: select-word-style: function definition file not found
/aWorking/Zsh/Boot/zstyle:62: compinit: function definition file
not found
I tried setting 'module_path' but no luck. The needed stuff is now
found in:
"/aWorking/Zsh/Zsh-5.8/share/zsh/5.8/functions"
How do I make these things findable?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-04-05 15:46 ` Ray Andrews
@ 2020-04-05 15:55 ` Roman Perepelitsa
2020-04-05 16:38 ` Ray Andrews
0 siblings, 1 reply; 15+ messages in thread
From: Roman Perepelitsa @ 2020-04-05 15:55 UTC (permalink / raw)
To: Ray Andrews; +Cc: Zsh Users
On Sun, Apr 5, 2020 at 5:47 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2020-03-26 7:20 a.m., Roman Perepelitsa wrote:
>
> Roman:
>
> > sh -c "$(curl -fsSL
> > https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
> That was so fast I thought nothing had happened :-)
>
> One problem: After moving the entire directory out of the default
> location to where I want it to be and setting link 'zsh' as appropriate:
You need to either install it to the correct location right away or
call `relocate` after moving the directory.
Install to the right directory right away:
wget https://raw.githubusercontent.com/romkatv/zsh-bin/master/install
sh ./install -d /foo/bar
PATH="/foo/bar/bin:$PATH"
zsh
Install to the default location and then move:
wget https://raw.githubusercontent.com/romkatv/zsh-bin/master/install
sh ./install
mv ~/.zsh-bin /foo/bar
/foo/bar/share/zsh/5.8/scripts/relocate
PATH="/foo/bar/bin:$PATH"
zsh
It's in the docs by the way. Check them out.
Roman.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-04-05 15:55 ` Roman Perepelitsa
@ 2020-04-05 16:38 ` Ray Andrews
2020-04-05 16:45 ` Roman Perepelitsa
0 siblings, 1 reply; 15+ messages in thread
From: Ray Andrews @ 2020-04-05 16:38 UTC (permalink / raw)
To: zsh-users
On 2020-04-05 8:55 a.m., Roman Perepelitsa wrote:
> Install to the right directory right away:
> wget https://raw.githubusercontent.com/romkatv/zsh-bin/master/install
> sh ./install -d /foo/bar
Works fine. What an improvement on the standard method I hafta say.
This should be the new normal and many thanks. BTW, I had solved the
previous problem simply by adding an 'fpath' statement to .zshrc and
presuming that nothing else would have been needed, that's pretty basic
and robust. One thing still seems to be missing and that's 'man'. I
deleted my old man files and now "$man zsh" finds nothing. I see the
new ones there tho, so how to get them firing up? (It would be nice is
man pages identified their version so you know you've been upgraded.)
If the man pages can be found in the install path that's very nice, but
of course I can move them over to the standard location too as required.
Thanks Roman, that's one hell of an improvement for a regular plebe like me.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-04-05 16:38 ` Ray Andrews
@ 2020-04-05 16:45 ` Roman Perepelitsa
2020-04-05 18:47 ` Ray Andrews
0 siblings, 1 reply; 15+ messages in thread
From: Roman Perepelitsa @ 2020-04-05 16:45 UTC (permalink / raw)
To: Ray Andrews; +Cc: Zsh Users
On Sun, Apr 5, 2020 at 6:39 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
> One thing still seems to be missing and that's 'man'.
Have you used the installation instructions I've posted? `man zsh`
works for me when I use them. And run-help works, too.
autoload -Uz run-help
unalias run-help
run-help typeset
This opens help for `typeset`.
If this doesn't work for you, could you post instructions how to reproduce?
Roman.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-04-05 16:45 ` Roman Perepelitsa
@ 2020-04-05 18:47 ` Ray Andrews
2020-04-05 18:57 ` Roman Perepelitsa
0 siblings, 1 reply; 15+ messages in thread
From: Ray Andrews @ 2020-04-05 18:47 UTC (permalink / raw)
To: zsh-users
On 2020-04-05 9:45 a.m., Roman Perepelitsa wrote:
> On Sun, Apr 5, 2020 at 6:39 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>> One thing still seems to be missing and that's 'man'.
> Have you used the installation instructions I've posted? `man zsh`
> works for me when I use them. And run-help works, too.
Yes, reinstalled as indicated:
$ wget https://raw.githubusercontent.com/romkatv/zsh-bin/master/install
$ ./install -d /aWorking/Zsh/Zsh-5.8
'man' was working but it was the old files, which I then deleted.
>
> autoload -Uz run-help
> unalias run-help
> run-help typeset
>
> This opens help for `typeset`.
That works, however:
$man zsh
does not work. However if I cd into the new '.../Zsh-5.8/man/man1'
directory and:
$ man ./zsh.1
... it finds it fine. But I must specify the directory. I'm not really
surprised since 'man'
naturally wants to find things in the normal place. I've just copied
the files to /usr/share/man/man1 and
everything is fine, so this is no issue really, but if I could have both
'man' and 'run-help' using the same
files in the same directory that would be nice, tho hardly important. I
still have my habits from
the days of 10MB hard drives of wanting to remove surplus files is all.
It's all so compact now Roman, IMHO this is so much easier and more
understandable.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-04-05 18:47 ` Ray Andrews
@ 2020-04-05 18:57 ` Roman Perepelitsa
2020-04-05 19:15 ` Ray Andrews
0 siblings, 1 reply; 15+ messages in thread
From: Roman Perepelitsa @ 2020-04-05 18:57 UTC (permalink / raw)
To: Ray Andrews; +Cc: Zsh Users
On Sun, Apr 5, 2020 at 8:48 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
> $ wget https://raw.githubusercontent.com/romkatv/zsh-bin/master/install
> $ ./install -d /aWorking/Zsh/Zsh-5.8
>
> 'man' was working but it was the old files, which I then deleted.
This is missing a few steps. How did you get to `man` after `./install`?
> It's all so compact now Roman, IMHO this is so much easier and more
> understandable.
Thanks!
I'd really like to get to the bottom of the issue with `man`. It works
for me on a dozen systems I've tried it on. Do these commands result
in non-working `man zsh` for you?
mkdir /tmp/zsh
cd /tmp/zsh
wget https://raw.githubusercontent.com/romkatv/zsh-bin/master/install
sh ./install -d /tmp/zsh/zsh
PATH="/tmp/zsh/zsh/bin:$PATH"
zsh
If so, could you provide some details about your system so that I can
reproduce it?
Roman.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-04-05 18:57 ` Roman Perepelitsa
@ 2020-04-05 19:15 ` Ray Andrews
2020-04-05 19:19 ` Roman Perepelitsa
0 siblings, 1 reply; 15+ messages in thread
From: Ray Andrews @ 2020-04-05 19:15 UTC (permalink / raw)
To: zsh-users
On 2020-04-05 11:57 a.m., Roman Perepelitsa wrote:
>
> This is missing a few steps. How did you get to `man` after `./install`?
'Get to'? I just type the command:
$ man zsh
> I'd really like to get to the bottom of the issue with `man`.
I pride myself that if anyone can break something, I can ;-)
> It works
> for me on a dozen systems I've tried it on. Do these commands result
> in non-working `man zsh` for you?
>
> mkdir /tmp/zsh
> cd /tmp/zsh
> wget https://raw.githubusercontent.com/romkatv/zsh-bin/master/install
> sh ./install -d /tmp/zsh/zsh
> PATH="/tmp/zsh/zsh/bin:$PATH"
Ah ... I didn't change my path. I link to 'zsh' via a link in '/bin'
for simplicity's sake.
I'm pressed for time and will try the above a bit latter. Bet that's
it. Mind, nice to be able to leave
the path simple, so perhaps that can be considered. Does 'man' search
the path?
Back latter.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh
2020-04-05 19:15 ` Ray Andrews
@ 2020-04-05 19:19 ` Roman Perepelitsa
0 siblings, 0 replies; 15+ messages in thread
From: Roman Perepelitsa @ 2020-04-05 19:19 UTC (permalink / raw)
To: Ray Andrews; +Cc: Zsh Users
On Sun, Apr 5, 2020 at 9:16 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2020-04-05 11:57 a.m., Roman Perepelitsa wrote:
> >
> > This is missing a few steps. How did you get to `man` after `./install`?
>
> 'Get to'? I just type the command:
>
> $ man zsh
`man zsh` will work from `zsh` if you install it following the instructions.
> Does 'man' search the path?
Yes.
Roman.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-04-05 19:20 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 14:20 [ANN] zsh-bin: statically-linked, hermetic, relocatable zsh Roman Perepelitsa
2020-03-28 0:23 ` Ray Andrews
2020-03-28 10:37 ` Sebastian Gniazdowski
2020-03-28 14:02 ` Roman Perepelitsa
2020-03-28 16:06 ` Ray Andrews
2020-03-28 16:16 ` Roman Perepelitsa
2020-03-28 16:27 ` Ray Andrews
2020-04-05 15:46 ` Ray Andrews
2020-04-05 15:55 ` Roman Perepelitsa
2020-04-05 16:38 ` Ray Andrews
2020-04-05 16:45 ` Roman Perepelitsa
2020-04-05 18:47 ` Ray Andrews
2020-04-05 18:57 ` Roman Perepelitsa
2020-04-05 19:15 ` Ray Andrews
2020-04-05 19:19 ` Roman Perepelitsa
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).