diff options
author | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-12-07 22:00:03 +0000 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-12-07 22:04:19 +0000 |
commit | 434fad09b1248f961fa089b405276a4011e8cbc0 (patch) | |
tree | 6b397528771e8f1a894dc1ef62c8787b22933365 | |
parent | d5062a9afb8b740cb2cba859e70c9b44e19e6755 (diff) | |
download | aports-434fad09b1248f961fa089b405276a4011e8cbc0.tar.bz2 aports-434fad09b1248f961fa089b405276a4011e8cbc0.tar.xz |
community/fzf: fix buzybox find incompattibility
fzf uses `-fstype` for find commands, but buzybox find does not support
that. Remove those as they just exclude things like `/proc/`, which
mainly causes issues when running `fzf` from `/`.
Fixes #11022
-rw-r--r-- | community/fzf/APKBUILD | 11 | ||||
-rw-r--r-- | community/fzf/find-buzybox-compat.patch | 52 |
2 files changed, 59 insertions, 4 deletions
diff --git a/community/fzf/APKBUILD b/community/fzf/APKBUILD index 7cfcad1fa8..6966c8e6a6 100644 --- a/community/fzf/APKBUILD +++ b/community/fzf/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Kevin Daudt <kdaudt@alpinelinux.org> pkgname=fzf pkgver=0.19.0 -pkgrel=0 +pkgrel=1 pkgdesc="A command-line fuzzy finder" url="https://github.com/junegunn/fzf" arch="all" @@ -19,7 +19,9 @@ subpackages=" " source="$pkgname-$pkgver.tar.gz::https://github.com/junegunn/fzf/archive/$pkgver.tar.gz glide.yaml - glide.lock" + glide.lock + find-buzybox-compat.patch + " builddir="$srcdir/src/github.com/junegunn/$pkgname" prepare() { @@ -28,7 +30,7 @@ prepare() { mkdir -p "$(dirname "$builddir")" mv "$srcdir"/$pkgname-$pkgver "$builddir"/ - cp "$srcdir"/glide.yaml "$srcdir"/glide.lock . + cp "$srcdir"/glide.yaml "$srcdir"/glide.lock "$builddir" glide install --skip-test default_prepare @@ -122,4 +124,5 @@ cleanup_srcdir() { sha512sums="1064b77510dcde10cb23184d4acfea07805380b6de7f234c816ab56061104d8eee5414eaf03f07d0fad716d00aa7d44f22b78b76534dddbb54f2fb9408559895 fzf-0.19.0.tar.gz dc14dea17ea585344e16eeffdc244693d97f4519676d20ec43434f6eff460d61be833399469ccb44c25c9fed296d52d424208c4a4cae5a3beecba14593cecd49 glide.yaml -5d1c0801d79a0425e1ec02c818bf440f2201841f356f32350fac06bf3ed7a7d03c0718cbeadc07143701895152f7ee19919e6e527be9e17c0df430f93d0282c9 glide.lock" +5d1c0801d79a0425e1ec02c818bf440f2201841f356f32350fac06bf3ed7a7d03c0718cbeadc07143701895152f7ee19919e6e527be9e17c0df430f93d0282c9 glide.lock +8e905eaaa915373162e418416026c20138442cfc740b55b33d63653078a19d8aec6d7c99c12916c44443eab188a56a9b3466763c508de7d6579bd996b0af5d67 find-buzybox-compat.patch" diff --git a/community/fzf/find-buzybox-compat.patch b/community/fzf/find-buzybox-compat.patch new file mode 100644 index 0000000000..9ccc999c14 --- /dev/null +++ b/community/fzf/find-buzybox-compat.patch @@ -0,0 +1,52 @@ +diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash +index 2ecf685..a553f12 100644 +--- a/shell/key-bindings.bash ++++ b/shell/key-bindings.bash +@@ -1,7 +1,7 @@ + # Key bindings + # ------------ + __fzf_select__() { +- local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ ++ local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' \\) -prune \ + -o -type f -print \ + -o -type d -print \ + -o -type l -print 2> /dev/null | cut -b3-"}" +diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish +index 035ba55..42fb55b 100644 +--- a/shell/key-bindings.fish ++++ b/shell/key-bindings.fish +@@ -11,7 +11,7 @@ function fzf_key_bindings + # "-path \$dir'*/\\.*'" matches hidden files/folders inside $dir but not + # $dir itself, even if hidden. + set -q FZF_CTRL_T_COMMAND; or set -l FZF_CTRL_T_COMMAND " +- command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \ ++ command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' \\) -prune \ + -o -type f -print \ + -o -type d -print \ + -o -type l -print 2> /dev/null | sed 's@^\./@@'" +diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh +index a77d136..70f0e41 100644 +--- a/shell/key-bindings.zsh ++++ b/shell/key-bindings.zsh +@@ -4,7 +4,7 @@ if [[ $- == *i* ]]; then + + # CTRL-T - Paste the selected file path(s) into the command line + __fsel() { +- local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ ++ local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' \\) -prune \ + -o -type f -print \ + -o -type d -print \ + -o -type l -print 2> /dev/null | cut -b3-"}" +diff --git a/src/constants.go b/src/constants.go +index e32c092..b356f06 100644 +--- a/src/constants.go ++++ b/src/constants.go +@@ -59,7 +59,7 @@ var defaultCommand string + + func init() { + if !util.IsWindows() { +- defaultCommand = `set -o pipefail; command find -L . -mindepth 1 \( -path '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \) -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-` ++ defaultCommand = `set -o pipefail; command find -L . -mindepth 1 \( -path '*/\.*' \) -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-` + } else if os.Getenv("TERM") == "cygwin" { + defaultCommand = `sh -c "command find -L . -mindepth 1 -path '*/\.*' -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-"` + } else { |