Details
- Reviewers
Girtablulu JoshStrobl - Group Reviewers
Triage Team - Maniphest Tasks
- T8750: snaps appear to be broken when using zsh
- Commits
- R3329:c609aba3edf7: add zprofile to fix snap packages when using sddm
- Run some commands on Budgie and Plasma
- Test git and wd plugins with ohmyzsh on Budgie and Plasma
- Make sure existing user zprofiles will be respected
Diff Detail
- Repository
- R3329 zsh
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
can you add stack Dep?
| package.yml | ||
|---|---|---|
| 32 | can you make it stateless? | |
Having a little bit of trouble making it stateless:
Added this to zsh:
--enable-etcdir=/usr/share/defaults/etc/zsh \ --enable-zprofile=/usr/share/defaults/etc/zsh/zprofile \ install -Dm00644 $pkgfiles/zprofile $installdir/usr/share/defaults/etc/zsh/zprofile
But menu items are missing now. I even added this to the fix-zsh-for-solus.patch for sddm
|| zdir=/usr/share/defaults/etc/zsh
Ideas? Not sure if its zsh not loading zprofile or something else plasma needs patching.
Adding additional information in case I made an obvious mistake.
sddm patch was:
From dceea3f8b880c4eaefdb9647fe7755ac5a658ee5 Mon Sep 17 00:00:00 2001 From: Troy Harvey <harveydev@protonmail.com> Date: Thu, 20 Feb 2020 22:26:39 +1100 Subject: [PATCH] Fix zsh for solus --- data/scripts/Xsession | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/scripts/Xsession b/data/scripts/Xsession index c7fa214..658c3a9 100755 --- a/data/scripts/Xsession +++ b/data/scripts/Xsession @@ -21,7 +21,7 @@ case $SHELL in ;; */zsh) [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@" - [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc + [ -d /etc/zsh ] || [ -d /usr/share/zsh ] || [ -d /usr/share/defaults/etc/zsh ] && zdir=/etc/zsh || zdir=/etc || zdir=/usr/share/zsh || zdir=/usr/share/defaults/etc/zsh zhome=${ZDOTDIR:-$HOME} # zshenv is always sourced automatically. [ -f $zdir/zprofile ] && . $zdir/zprofile -- 2.25.1
zsh package set file locations according to zsh documentation:
--enable-etcdir=/usr/share/defaults/etc/zsh \ --enable-zprofile=/usr/share/defaults/etc/zsh/zprofile \ install -Dm00644 $pkgfiles/zprofile $installdir/usr/share/defaults/etc/zsh/zprofile
- Setting --enable-etcdir without zsh sub dir in case it was looking at /usr/share/defaults/etc/zsh/zsh
- Installing zprofile to /usr/share/defaults/etc/
- Applying stateless patches from clearlinux.
Nothing seems to work. snap packages will run from the terminal but will not appear in app menu if I try and make zsh stateless. I'm out of ideas.
@Harvey Every time I open a new session with zsh now it spits out:
/usr/share/defaults/etc/profile.d/50-prompt.sh:20: command not found: shopt
It has to do with the emulate sh -c 'source /etc/profile' you added in zprofile. This is due to the fact our 50-prompt.sh has shopt -s checkwinsize, where shopt isn't a thing in zsh but rather it is setopt. See https://dev.getsol.us/source/bash/browse/master/files/profile/50-prompt.sh$19
We need to update 50-prompt.sh to actually check if shopt exists (so bash), otherwise use setopt, or find a different solution.
I never got the error in my testing, But I just logged in via TTY just then and noticed it. Now I can reproduce I'll start testing possible solutions.
Cheers.