summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmaël Bouya2016-03-14 02:39:19 +0100
committerIsmaël Bouya2016-03-14 02:49:17 +0100
commit7925e5eee3e81544175b7f7d288c96d11c6bc9aa (patch)
treec291e3f0b1406c95f7f72826057158b27f7eaea6
parentff8c1c853c1b200a481e8026898da2a5f0c450d7 (diff)
downloadaur-7925e5eee3e81544175b7f7d288c96d11c6bc9aa.tar.gz
Patch urwid_ui to escale shell args
-rw-r--r--.SRCINFO8
-rw-r--r--001_fix_shell_escape.patch31
-rw-r--r--PKGBUILD10
3 files changed, 43 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 750bf5107068..5d872cdd945e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon Mar 14 01:38:20 UTC 2016
+# Mon Mar 14 01:49:00 UTC 2016
pkgbase = terminal_velocity-git
- pkgdesc = A fast note-taking app for the UNIX terminal
+ pkgdesc = A fast note-taking app for the UNIX terminal (patched)
pkgver = 0.96.5667177
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/seanh/terminal_velocity
arch = any
license = GPL
@@ -11,7 +11,9 @@ pkgbase = terminal_velocity-git
depends = python2-urwid
depends = python2-chardet
source = git://github.com/seanh/terminal_velocity.git
+ source = 001_fix_shell_escape.patch
sha1sums = SKIP
+ sha1sums = 7b04f0f28a4801931f7a0e499f5131d5a5c3653c
pkgname = terminal_velocity-git
diff --git a/001_fix_shell_escape.patch b/001_fix_shell_escape.patch
new file mode 100644
index 000000000000..c3c28c3e8cf9
--- /dev/null
+++ b/001_fix_shell_escape.patch
@@ -0,0 +1,31 @@
+--- a/urwid_ui.py 2016-03-14 02:28:17.425313918 +0100
++++ b/urwid_ui.py 2016-03-14 02:29:22.807844809 +0100
+@@ -5,6 +5,7 @@
+ """
+ import subprocess
+ import shlex
++import pipes
+ import logging
+ logger = logging.getLogger(__name__)
+
+@@ -323,16 +324,16 @@
+
+ elif key in ["enter"]:
+ if self.selected_note:
+- system(self.editor + ' ' + self.selected_note.abspath, self.loop)
++ system(self.editor + ' ' + pipes.quote(self.selected_note.abspath), self.loop)
+ else:
+ if self.search_box.edit_text:
+ try:
+ note = self.notebook.add_new(self.search_box.edit_text)
+- system(self.editor + ' ' + note.abspath, self.loop)
++ system(self.editor + ' ' + pipes.quote(note.abspath), self.loop)
+ except notebook.NoteAlreadyExistsError:
+ # Try to open the existing note instead.
+- system(self.editor + ' ' + self.search_box.edit_text +
+- self.notebook.extension,
++ system(self.editor + ' ' + pipes.quote(self.search_box.edit_text +
++ self.notebook.extension),
+ self.loop)
+ except notebook.InvalidNoteTitleError:
+ # TODO: Display error message to user.
diff --git a/PKGBUILD b/PKGBUILD
index a5c5965d41fb..ce7be8df2db0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,8 @@
_pkgname=terminal_velocity
pkgname=terminal_velocity-git
pkgver=0.96.5667177
-pkgrel=1
-pkgdesc="A fast note-taking app for the UNIX terminal"
+pkgrel=2
+pkgdesc="A fast note-taking app for the UNIX terminal (patched)"
arch=('any')
url="https://github.com/seanh/terminal_velocity"
license=('GPL')
@@ -12,8 +12,10 @@ depends=("python2-urwid" "python2-chardet")
makedepends=('git')
source=(
'git://github.com/seanh/terminal_velocity.git'
+ '001_fix_shell_escape.patch'
)
-sha1sums=('SKIP')
+sha1sums=('SKIP'
+ '7b04f0f28a4801931f7a0e499f5131d5a5c3653c')
pkgver() {
cd "$srcdir/$_pkgname"
@@ -21,6 +23,8 @@ pkgver() {
}
build() {
+ cd "$srcdir/$_pkgname/$_pkgname"
+ patch -p1 < ../../001_fix_shell_escape.patch
cd "$srcdir/$_pkgname"
python2 setup.py build
}