summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/rules3
-rw-r--r--debian/zsh-static.install1
-rw-r--r--debian/zsh-static.lintian-overrides2
-rw-r--r--debian/zsh.install1
-rw-r--r--debian/zsh.lintian-overrides2
-rwxr-xr-xdebian/zsh426
6 files changed, 34 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index f368f9ebe..dd520c74a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -200,7 +200,8 @@ binary-arch-static: build-static
dh_install -pzsh-static
dh_strip -pzsh-static
- mv debian/zsh-static/bin/zsh debian/zsh-static/bin/zsh5-static
+ mv debian/zsh-static/bin/zsh debian/zsh-static/bin/zsh5-static
+ mv debian/zsh-static/bin/zsh4 debian/zsh-static/bin/zsh4-static
dh_installchangelogs -pzsh-static
diff --git a/debian/zsh-static.install b/debian/zsh-static.install
index 51a712325..174565504 100644
--- a/debian/zsh-static.install
+++ b/debian/zsh-static.install
@@ -1 +1,2 @@
obj-static/Src/zsh bin
+debian/zsh4 bin
diff --git a/debian/zsh-static.lintian-overrides b/debian/zsh-static.lintian-overrides
index 91d63bf29..79cc988e3 100644
--- a/debian/zsh-static.lintian-overrides
+++ b/debian/zsh-static.lintian-overrides
@@ -3,3 +3,5 @@ zsh-static: embedded-library bin/zsh5-static: ncurses
zsh-static: package-contains-broken-symlink usr/share/man/man1/zsh5-static.1.gz zsh.1.gz
# False positive
zsh-static: spelling-error-in-binary bin/zsh5-static tEH the
+# Just a migration wrapper which is not meant to be used
+zsh-static: binary-without-manpage bin/zsh4-static
diff --git a/debian/zsh.install b/debian/zsh.install
new file mode 100644
index 000000000..a6113c5c5
--- /dev/null
+++ b/debian/zsh.install
@@ -0,0 +1 @@
+debian/zsh4 bin
diff --git a/debian/zsh.lintian-overrides b/debian/zsh.lintian-overrides
index 5cbb27ba2..19ade3445 100644
--- a/debian/zsh.lintian-overrides
+++ b/debian/zsh.lintian-overrides
@@ -2,3 +2,5 @@
zsh: hardening-no-fortify-functions usr/lib*/zsh/*/zsh/zleparameter.so
# False positive
zsh: spelling-error-in-binary usr/lib/*/zsh/*/zsh/zle.so tEH the
+# Just a migration wrapper which is not meant to be used
+zsh: binary-without-manpage bin/zsh4
diff --git a/debian/zsh4 b/debian/zsh4
new file mode 100755
index 000000000..8cf619bff
--- /dev/null
+++ b/debian/zsh4
@@ -0,0 +1,26 @@
+#!/bin/zsh -f
+
+# This wrapper's sole purpose is to ease the migration of zsh's binary
+# location from /bin/zsh4 to /bin/zsh5 between Debian Wheezy and Jessie.
+#
+# See https://bugs.debian.org/707760 for reasoning, details and
+# discussion.
+
+if [[ $0 == *zsh4* ]]; then
+ static=''
+ if [[ $0 == *static* ]]; then
+ static=-static
+ fi
+
+ echo ""
+ echo " ####"
+ echo " #### $0 is deprecated, please switch to /bin/zsh${static} (or /usr/bin/zsh)"
+ if [[ "$1" == "-l" ]]; then
+ echo ' #### Use "chsh -s '"/bin/zsh${static}"'" to change your login shell'
+ fi
+ echo " #### This command ($0) will disappear eventually!"
+ echo " ####"
+ echo ""
+fi 1>&2
+
+exec "/bin/zsh${static}" "$@"