Package Details: zsh-zim-git r643.ee93f79-1

Git Clone URL: https://aur.archlinux.org/zsh-zim-git.git (read-only, click to copy)
Package Base: zsh-zim-git
Description: ZIM - Zsh IMproved
Upstream URL: https://github.com/zimfw/zimfw
Keywords: improved plugin theme vim zim zsh
Licenses: MIT
Submitter: ishitatsuyuki
Maintainer: carbolymer (Rhinoceros)
Last Packager: carbolymer
Votes: 18
Popularity: 0.000000
First Submitted: 2015-12-28 02:13 (UTC)
Last Updated: 2023-03-30 13:36 (UTC)

Dependencies (4)

Required by (1)

Sources (5)

Pinned Comments

carbolymer commented on 2021-01-11 21:41 (UTC) (edited on 2021-01-22 07:46 (UTC) by carbolymer)

Ugh, it was a PITA to create this package. Please note that errors are silenced, so if you have any issues with zim, remove &>/dev/null from your /etc/zshrc - https://aur.archlinux.org/cgit/aur.git/tree/zshrc?h=zsh-zim-git&id=5a378e94d516c57d39629de545b78b0f020d86a4

I had to do it this way: $ZIM_HOME is only writable by root and zim constantly tries to update & recompile itself (=write to $ZIM_HOME), which results in permission errors when starting zsh as a normal user.

If you want to add/remove a module:

  1. Add a respective zmodule in /etc/zsh/zimrc
  2. Run as root: zimfw install && zsh

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 .. 10 Next › Last »

carbolymer commented on 2022-01-16 19:15 (UTC)

Thanks @Rhinoceros for the information. I haven't had much time recently, I'll get back to the issue in a few days.

Rhinoceros commented on 2022-01-15 22:33 (UTC)

FWIW I previously installed r601.90de91a-1 perfectly fine, and the latest r606.bd765df-1 now fails to build.

It looks like upstream made some changes to the compilation process in the latest version 1.7.0. From the changelog, I'm not sure if some existing files also need to be removed.

Rhinoceros commented on 2022-01-12 04:42 (UTC)

It looks like upstream has changed the structure again, preventing this package from being built. ${srcdir}/install/src/templates now contains only zimrc and zshrc, so line 42–45 of the PKGBUILD fails:

  rcfiles=('zshenv' 'zshrc' 'zlogin' 'zimrc')
  for entry in "${rcfiles[@]}"; do
    cp -L "${srcdir}/install/src/templates/${entry}" $ZIM_TPL_DIR
  done

with zshenv and zlogin now missing. I'm don't understand the installation process enough to know how this changes things, and I can see that zlogin is used later in the PKGBUILD.

Rhinoceros commented on 2021-11-06 23:06 (UTC)

@carbolymer you likely saw it already, but just in case, upstream made some changes that might need this PKGBUILD to be modified.

Rhinoceros commented on 2021-09-30 07:04 (UTC)

Very strange. Originally it built fine on one of my systems, and another had the problem. However, when I tried to rebuild on the original system, it failed the second time. I also realised my minimal example was in zsh, but even testing with a clean bash shell using env -i bash --norc --noprofile, I still get the 1 exit code.

Thanks for the fix and the add.

carbolymer commented on 2021-09-30 06:57 (UTC)

@Rhinoceros, that's weird. I don't have this error, nor your minimal example with chmod and foo give me an error. I'm getting return code 0 even in bash. I've included your alternative chmod for the sake of compatibility.

Rhinoceros commented on 2021-09-29 11:16 (UTC)

Thanks for the fix.

I've run into another problem, which prevents the package from building:

patching file zimfw.zsh
Hunk #2 succeeded at 62 (offset 1 line).
Hunk #3 succeeded at 95 (offset 1 line).
==> ERROR: A failure occurred in package().
    Aborting...

It seems that the final chmod command has a non-zero exit code because of the symlinks at pkg/zsh-zim-git/usr/lib/zim/modules/zsh-syntax-highlighting/highlighters/*/README.md. Apparently chmod -R with symlinks fails!

$ mkdir dir
$ touch dir/foo
$ ln -s foo dir/bar
$ chmod -R u+rX,g+rX,o+rX dir
mode of 'dir' retained as 0755 (rwxr-xr-x)
neither symbolic link 'dir/bar' nor referent has been changed
mode of 'dir/foo' retained as 0644 (rw-r--r--)
$ echo $?
1

Weirdly I don't think this occurred all the time when building the package. Anyway, I managed to fix it by replacing the final chmod line with a command to ignore symlinks:

find "${ZIM_HOME}" ! -type l -execdir chmod u+rX,g+rX,o+rX {} \;

Rhinoceros commented on 2021-09-21 06:33 (UTC)

Upstream changed surrounding lines again. Here is an updated zimfw.zsh.patch.

--- zimfw.zsh   2021-09-21 16:26:34.034179638 +1000
+++ zimfw.zsh   2021-09-21 16:30:58.546504098 +1000
@@ -53,10 +53,6 @@

 _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 \"\${@}\" }"
     print -R "zmodule() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
@@ -65,16 +61,13 @@
     if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions#${~zpre}}
     print -R ${(F)_zcmds#${~zpre}}
   ) ${ztarget}
+  chmod -R u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null
 }

 _zimfw_build_login_init() {
   # Array with unique dirs. ${ZIM_HOME} or any subdirectory should only occur once.
   local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
   local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)") 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
@@ -101,6 +94,7 @@
 } \"\${@}\"
 "
   ) ${ztarget}
+  chmod -R u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null
 }

 _zimfw_build() {

carbolymer commented on 2021-08-10 06:45 (UTC)

@Rhinoceros, thanks for the fix! I've updated the package (I've also removed patch file copying as it's really not needed).

Rhinoceros commented on 2021-07-28 06:49 (UTC)

Oops, my mistake; I got confused. Upstream just modified surrounding lines. Here is an updated zimfw.zsh.patch that works.

--- zimfw.zsh   2021-07-28 16:45:25.000000000 +1000
+++ zimfw.zsh   2021-07-28 16:45:25.000000000 +1000
@@ -52,26 +52,19 @@

 _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 -R u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null
 }

 _zimfw_build_login_init() {
   # Array with unique dirs. ${ZIM_HOME} or any subdirectory should only occur once.
   local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
   local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)") 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
@@ -98,6 +91,7 @@
 } \"\${@}\"
 "
   ) ${ztarget}
+  chmod -R u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null
 }

 _zimfw_build() {