[Pkg-zsh-commits] [zsh] 01/01: Add zsh4(-static) wrapper scripts to ease switch to zsh5 (Closes: #707760)

Axel Beckert abe at deuxchevaux.org
Fri Oct 10 00:10:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch debian
in repository zsh.

commit 438969ffb81fd46b514d42a77b74890a7b4f778f
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Fri Oct 10 01:55:14 2014 +0200

    Add zsh4(-static) wrapper scripts to ease switch to zsh5 (Closes: #707760)
    
    Also add lintian overrides for the not-meant-to-be-used wrapper not
    having a man-page.
---
 debian/rules                        |  3 ++-
 debian/zsh-static.install           |  1 +
 debian/zsh-static.lintian-overrides |  2 ++
 debian/zsh.install                  |  1 +
 debian/zsh.lintian-overrides        |  2 ++
 debian/zsh4                         | 26 ++++++++++++++++++++++++++
 6 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index f368f9e..dd520c7 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 51a7123..1745655 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 91d63bf..79cc988 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 0000000..a6113c5
--- /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 5cbb27b..19ade34 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 0000000..8cf619b
--- /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}" "$@"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/zsh.git



More information about the Pkg-zsh-commits mailing list