summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-shells/zsh/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-shells/zsh/files')
-rw-r--r--app-shells/zsh/files/prompt_gentoo_setup-133
-rw-r--r--app-shells/zsh/files/zprofile-143
-rw-r--r--app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch19
-rw-r--r--app-shells/zsh/files/zsh-5.0.7-pid-ns.patch39
-rw-r--r--app-shells/zsh/files/zsh-init.d-gentoo-r1.diff30
5 files changed, 164 insertions, 0 deletions
diff --git a/app-shells/zsh/files/prompt_gentoo_setup-1 b/app-shells/zsh/files/prompt_gentoo_setup-1
new file mode 100644
index 000000000000..046e2d87f53a
--- /dev/null
+++ b/app-shells/zsh/files/prompt_gentoo_setup-1
@@ -0,0 +1,33 @@
+# gentoo prompt theme
+
+prompt_gentoo_help () {
+ cat <<'EOF'
+This prompt is color-scheme-able. You can invoke it thus:
+
+ prompt gentoo [<promptcolor> [<usercolor> [<rootcolor>]]]
+
+EOF
+}
+
+prompt_gentoo_setup () {
+ local prompt_gentoo_prompt=${1:-'blue'}
+ local prompt_gentoo_user=${2:-'green'}
+ local prompt_gentoo_root=${3:-'red'}
+
+ if [ "$USER" = 'root' ]
+ then
+ local base_prompt="%B%F{$prompt_gentoo_root}%m%k "
+ else
+ local base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k "
+ fi
+ local post_prompt="%b%f%k"
+
+ #setopt noxtrace localoptions
+
+ local path_prompt="%B%F{$prompt_gentoo_prompt}%1~"
+ typeset -g PS1="$base_prompt$path_prompt %# $post_prompt"
+ typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt"
+ typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt"
+}
+
+prompt_gentoo_setup "$@"
diff --git a/app-shells/zsh/files/zprofile-1 b/app-shells/zsh/files/zprofile-1
new file mode 100644
index 000000000000..655c525e6900
--- /dev/null
+++ b/app-shells/zsh/files/zprofile-1
@@ -0,0 +1,43 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/zsh/zprofile
+# $Id$
+
+# Load environment settings from profile.env, which is created by
+# env-update from the files in /etc/env.d
+if [ -e "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env ] ; then
+ . "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env
+fi
+
+# You should override these in your ~/.zprofile (or equivalent) for per-user
+# settings. For system defaults, you can add a new file in /etc/profile.d/.
+export EDITOR=${EDITOR:-/bin/nano}
+export PAGER=${PAGER:-/usr/bin/less}
+
+# 077 would be more secure, but 022 is generally quite realistic
+umask 022
+
+# Set up PATH depending on whether we're root or a normal user.
+# There's no real reason to exclude sbin paths from the normal user,
+# but it can make tab-completion easier when they aren't in the
+# user's PATH to pollute the executable namespace.
+#
+# It is intentional in the following line to use || instead of -o.
+# This way the evaluation can be short-circuited and calling whoami is
+# avoided.
+if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
+ @ZSH_NOPREFIX@PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
+ @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/bin:${ROOTPATH}:/usr/sbin:/usr/bin:/sbin:/bin"
+else
+ @ZSH_NOPREFIX@PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
+ @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/bin:${PATH}:/usr/bin:/bin"
+fi
+export PATH
+unset ROOTPATH
+
+shopts=$-
+setopt nullglob
+for sh in "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.d/*.sh ; do
+ [ -r "$sh" ] && . "$sh"
+done
+unsetopt nullglob
+set -$shopts
+unset sh shopts
diff --git a/app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch b/app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch
new file mode 100644
index 000000000000..5beb7eca64c2
--- /dev/null
+++ b/app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch
@@ -0,0 +1,19 @@
+http://www.zsh.org/mla/workers/2014/msg01191.html
+
+diff --git a/Completion/Base/Utility/_call_program b/Completion/Base/Utility/_call_program
+index b657648..010e094 100644
+--- a/Completion/Base/Utility/_call_program
++++ b/Completion/Base/Utility/_call_program
+@@ -2,8 +2,8 @@
+
+ local tmp err_fd=-1
+
+-if (( ${debug_fd:--1} > 2 ))
+-then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is log file
++if (( ${debug_fd:--1} > 2 )) || [[ ! -t 2 ]]
++then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is trace or redirect
+ else exec {err_fd}>/dev/null
+ fi
+
+
+--
diff --git a/app-shells/zsh/files/zsh-5.0.7-pid-ns.patch b/app-shells/zsh/files/zsh-5.0.7-pid-ns.patch
new file mode 100644
index 000000000000..928ce48b4617
--- /dev/null
+++ b/app-shells/zsh/files/zsh-5.0.7-pid-ns.patch
@@ -0,0 +1,39 @@
+zsh and pid namespaces don't play very well together. Specifically, when zsh is
+launched inside a new pid namespace, it doesn't take ownership of the process
+group, causing things like SIGINT to be sent to the parent process. Upstream
+bug report here: http://www.zsh.org/mla/workers/2014/msg01769.html.
+
+The first chunk of this diff fixes this problem and has already been applied
+upstream:
+http://sourceforge.net/p/zsh/code/ci/0c4cb0cc1b527f4341f1a39a10f4120aa7c7d594/.
+
+The second chunk is a suggested fix for the warning that zsh prints when
+exiting: http://www.zsh.org/mla/workers/2014/msg01779.html.
+
+diff --git a/Src/jobs.c b/Src/jobs.c
+index a668b07..c6e1bce 100644
+--- a/Src/jobs.c
++++ b/Src/jobs.c
+@@ -2734,7 +2734,7 @@ acquire_pgrp(void)
+ long ttpgrp;
+ sigset_t blockset, oldset;
+
+- if ((mypgrp = GETPGRP()) > 0) {
++ if ((mypgrp = GETPGRP()) >= 0) {
+ long lastpgrp = mypgrp;
+ sigemptyset(&blockset);
+ sigaddset(&blockset, SIGTTIN);
+@@ -2779,8 +2779,11 @@ void
+ release_pgrp(void)
+ {
+ if (origpgrp != mypgrp) {
+- attachtty(origpgrp);
+- setpgrp(0, origpgrp);
++ /* in linux pid namespaces, origpgrp may never have been set */
++ if (origpgrp) {
++ attachtty(origpgrp);
++ setpgrp(0, origpgrp);
++ }
+ mypgrp = origpgrp;
+ }
+ }
diff --git a/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff b/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff
new file mode 100644
index 000000000000..9597a733c903
--- /dev/null
+++ b/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff
@@ -0,0 +1,30 @@
+--- zsh-4.3.11/Completion/Unix/Command/_init_d
++++ zsh-4.3.11/Completion/Unix/Command/_init_d
+@@ -1,6 +1,6 @@
+ #compdef -p */(init|rc[0-9S]#).d/*
+
+-local cmds script
++local cmds script opts
+
+ _compskip=all
+
+@@ -83,10 +83,17 @@
+
+ script=$words[1]
+ [[ $script = */* ]] || script="$(_init_d_fullpath "$script")"
++[[ ! -f $script ]] &&
++ { _message "${words[1]:t} is not an init script" && return }
+
+ cmds=( $(_init_d_get_cmds) ) || return
+
+-(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds ||
+- cmds=(start stop)
++(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds
++opts=(start stop restart pause zap status ineed iuse needsme usesme broken)
++
++# If we didn't get $cmds from a zstyle, then read init script for opts.
++# If script doesn't specify opts, then default to the standard opts.
++(( $#cmds )) || cmds=( ${(eQz)${(M)${(f)"$( <$script)"}:#[[:blank:]]#opts=*}#*=} )
++(( $#cmds )) || cmds=($opts)
+
+ _sub_commands $cmds