diff options
author | Mateusz Galazyn | 2021-01-13 19:14:35 +0100 |
---|---|---|
committer | Mateusz Galazyn | 2021-01-13 19:14:35 +0100 |
commit | b84c155ffa86d5ddbf88290b3b15dbcb636ac1d1 (patch) | |
tree | dfe6f5a9ece0f89048402cb04353932464612e9a | |
parent | 9f877a4b06ab9cc5e244e00b0065644df7c1cce7 (diff) | |
download | aur-b84c155ffa86d5ddbf88290b3b15dbcb636ac1d1.tar.gz |
Fix for incorrect /usr/lib/zim rights after zimfw install, fix for force update of login_init.zsh and init.zsh
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | zimfw.zsh.patch | 39 |
4 files changed, 51 insertions, 5 deletions
@@ -1,13 +1,13 @@ pkgbase = zsh-zim-git pkgdesc = ZIM - Zsh IMproved pkgver = r547.3e06f0a - pkgrel = 2 + pkgrel = 3 url = https://github.com/zimfw/zimfw install = zim.install arch = any license = MIT makedepends = git - makedepends = rsync + makedepends = patch depends = zsh optdepends = otf-powerline-symbols-git: for eriner prompt options = !strip @@ -17,10 +17,12 @@ pkgbase = zsh-zim-git source = git://github.com/zimfw/zimfw.git source = git://github.com/zimfw/install.git source = zim.install + source = zimfw.zsh.patch source = zshrc md5sums = SKIP md5sums = SKIP md5sums = 6e5ffd11ddfc72d74afb105829821f28 + md5sums = 6f7a60ed9a41e5b8cb8974f2e366e71a md5sums = 7874908906dbcb5f85bb1ba1d9ab5c00 pkgname = zsh-zim-git diff --git a/Dockerfile b/Dockerfile index 7b3433001386..cf0541aadd70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM registry.hub.docker.com/library/archlinux:latest -RUN pacman -Sy zsh git rsync sudo fakeroot --noconfirm +RUN pacman -Sy zsh git rsync sudo fakeroot patch vim --noconfirm RUN useradd -ms /usr/bin/zsh work && \ usermod -aG wheel work RUN echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers @@ -1,6 +1,6 @@ # Contributor: Mateusz Galazyn <carbolymer at gmail.com> -pkgrel=2 +pkgrel=3 pkgver=r547.3e06f0a pkgname=zsh-zim-git pkgdesc="ZIM - Zsh IMproved" @@ -8,15 +8,17 @@ url="https://github.com/zimfw/zimfw" arch=('any') license=('MIT') depends=('zsh') -makedepends=('git' 'rsync') +makedepends=('git' 'patch') optdepends=('otf-powerline-symbols-git: for eriner prompt') source=('git://github.com/zimfw/zimfw.git' 'git://github.com/zimfw/install.git' 'zim.install' + 'zimfw.zsh.patch' 'zshrc') md5sums=('SKIP' 'SKIP' '6e5ffd11ddfc72d74afb105829821f28' + '6f7a60ed9a41e5b8cb8974f2e366e71a' '7874908906dbcb5f85bb1ba1d9ab5c00') options=('!strip') install='zim.install' @@ -62,9 +64,12 @@ package() { echo "Patching build paths occurrence in: ${entry}" sed -i "s/${pkgdir//\//\\/}//g" "${ZIM_HOME}/${entry}" done + cp zimfw.zsh.patch "${ZIM_HOME}/" + ( cd "${ZIM_HOME}" && patch < zimfw.zsh.patch && rm zimfw.zsh.patch ) find ${ZIM_HOME} -iname "*.old" -type f -exec rm -f \{\} \; # files will be recompiled during installation, when zsh will be executed as root find ${ZIM_HOME} -iname "*.zwc" -type f -exec rm -f \{\} \; + chmod -R u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null } diff --git a/zimfw.zsh.patch b/zimfw.zsh.patch new file mode 100644 index 000000000000..1807aa0a1436 --- /dev/null +++ b/zimfw.zsh.patch @@ -0,0 +1,39 @@ +--- zimfw.zsh 2021-01-11 22:16:26.000000000 +0100 ++++ zimfw.zsh 2021-01-13 18:59:16.889418467 +0100 +@@ -52,16 +52,13 @@ + + _zimfw_build_init() { + local -r ztarget=${ZIM_HOME}/init.zsh +- # Force update of init.zsh if it's older than .zimrc +- if [[ ${ztarget} -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then +- command mv -f ${ztarget}{,.old} || return 1 +- fi + _zimfw_mv =( + print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }" + if (( ${#_zfpaths} )) print -R 'fpath=('${_zfpaths:A}' ${fpath})' + if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions} + print -R ${(F)_zcmds} + ) ${ztarget} ++ chmod u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null + } + + _zimfw_build_login_init() { +@@ -69,10 +66,6 @@ + local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A}) + local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)") + local -r ztarget=${ZIM_HOME}/login_init.zsh +- # Force update of login_init.zsh if it's older than .zimrc +- if [[ ${ztarget} -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then +- command mv -f ${ztarget}{,.old} || return 1 +- fi + _zimfw_mv =( + print -Rn "() { + setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB +@@ -99,6 +92,7 @@ + } \"\${@}\" + " + ) ${ztarget} ++ chmod u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null + } + + _zimfw_build() { |