bash 5.2.32-1
This commit is contained in:
parent
059db111e0
commit
40281a471c
87
bash/PKGBUILD
Normal file
87
bash/PKGBUILD
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
||||||
|
# and remove these comments. For more information, see 'man PKGBUILD'.
|
||||||
|
# NOTE: Please fill out the license field for your package! If it is unknown,
|
||||||
|
# then please put 'unknown'.
|
||||||
|
|
||||||
|
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||||
|
pkgname=bash
|
||||||
|
pkgver=5.2.32
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="The GNU Bourne Again shell"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://www.gnu.org/software/bash/"
|
||||||
|
license=('GPL-3.0-or-later')
|
||||||
|
groups=('base')
|
||||||
|
depends=('glibc' 'readline' 'ncurses')
|
||||||
|
backup=(etc/{bashrc,profile,shells}
|
||||||
|
etc/profile.d/{bash_completion,dircolors,extrapaths,i18n,readline,umask}.sh
|
||||||
|
etc/skel/.bash{rc,_profile,_logout})
|
||||||
|
source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz
|
||||||
|
bash_completion.sh
|
||||||
|
bashrc
|
||||||
|
dircolors.sh
|
||||||
|
extrapaths.sh
|
||||||
|
i18n.sh
|
||||||
|
profile
|
||||||
|
readline.sh
|
||||||
|
shells
|
||||||
|
skel_bash_logout
|
||||||
|
skel_bash_profile
|
||||||
|
skel_bashrc
|
||||||
|
umask.sh)
|
||||||
|
sha256sums=(d3ef80d2b67d8cbbe4d3265c63a72c46f9b278ead6e0e06d61801b58f23f50b5
|
||||||
|
c3358ba9f1ad54255a6960236b092e32c5077f658385a9d11dd46ca73f18ad2b
|
||||||
|
456936d471ac420a3dc10dfeee631c80579cee432802a29113c53f7e39d679bc
|
||||||
|
1c8ce873176834ecf414926bd3b4f7ae42df4065c10d9c503bc6f38894253c29
|
||||||
|
33d9fe6dcff46760cd8a1f900cbc8b25b648261bee66af0caccdcaa1043d2623
|
||||||
|
04ddf9afa78ff75ad3f4e05fe4c86f4795a7aaeabb5f1f85f2d820b76b4b88e8
|
||||||
|
3488e7c0b739193c0c4a2dafa660ff74fd0fcd53aa5b09773afe77216fd828a6
|
||||||
|
515a7a055ca3a3903c53c1b1a313eb3b5fa6bfbb70017472e5ca413d3f3b391b
|
||||||
|
1db1de0b837e46cac525afad0b39b41e730114294b209a023f2e7100a3efd2f7
|
||||||
|
0d3e7affb46fd79310d2d0b8ab63cdfbf1b6fbf58fbb6cae786db5a8d62f9bfd
|
||||||
|
b96ceb11cf69051af9876f0a8f80a100a88208d95ff4244a9eb30f076b40c436
|
||||||
|
5b7693b9fe722063f4b2a6aece9ed71055edb3540b69d35038d27a8b17ee640f
|
||||||
|
6ffa96e2dca75701c2e36ae1566c3b3b7e53464960be9e4b75ba730526a200b3)
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd ${pkgname}-${pkgver}
|
||||||
|
|
||||||
|
${CONFIGURE} \
|
||||||
|
--without-bash-malloc \
|
||||||
|
--with-installed-readline \
|
||||||
|
bash_cv_strtold_broken=no \
|
||||||
|
--docdir=/usr/share/doc/${pkgname}-${pkgver}
|
||||||
|
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd ${pkgname}-${pkgver}
|
||||||
|
|
||||||
|
make DESTDIR=${pkgdir} install
|
||||||
|
|
||||||
|
ln -s bash ${pkgdir}/usr/bin/sh
|
||||||
|
|
||||||
|
install --directory --mode=0755 --owner=root --group=root ${pkgdir}/etc/profile.d
|
||||||
|
|
||||||
|
|
||||||
|
install --directory --mode=0755 --owner=root --group=root ${pkgdir}/etc/bash_completion.d
|
||||||
|
|
||||||
|
for file in {bash_completion,dircolors,extrapaths,readline,umask,i18n}.sh
|
||||||
|
do
|
||||||
|
install -vm644 ${srcdir}/${file} ${pkgdir}/etc/profile.d/${file}
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
install -vDm644 ${srcdir}/bashrc ${pkgdir}/etc/bashrc
|
||||||
|
install -vDm644 ${srcdir}/profile ${pkgdir}/etc/profile
|
||||||
|
install -vDm644 ${srcdir}/shells ${pkgdir}/etc/shells
|
||||||
|
|
||||||
|
install -dv -m 0750 ${pkgdir}/root
|
||||||
|
for file_skel in skel_bash{rc,_profile,_logout}
|
||||||
|
do
|
||||||
|
install -vDm644 ${srcdir}/${file_skel} ${pkgdir}/etc/skel/.${file_skel#*_}
|
||||||
|
done
|
||||||
|
|
||||||
|
dircolors -p > ${pkgdir}/etc/dircolors
|
||||||
|
}
|
34
bash/bash_completion.sh
Normal file
34
bash/bash_completion.sh
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Begin /etc/profile.d/bash_completion.sh
|
||||||
|
# Import bash completion scripts
|
||||||
|
|
||||||
|
# If the bash-completion package is installed, use its configuration instead
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
|
||||||
|
# Check for interactive bash and that we haven't already been sourced.
|
||||||
|
if [ -n "${BASH_VERSION-}" -a -n "${PS1-}" -a -z "${BASH_COMPLETION_VERSINFO-}" ]; then
|
||||||
|
|
||||||
|
# Check for recent enough version of bash.
|
||||||
|
if [ ${BASH_VERSINFO[0]} -gt 4 ] || \
|
||||||
|
[ ${BASH_VERSINFO[0]} -eq 4 -a ${BASH_VERSINFO[1]} -ge 1 ]; then
|
||||||
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \
|
||||||
|
. "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
|
||||||
|
if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
# Source completion code.
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# bash-completions are not installed, use only bash completion directory
|
||||||
|
if shopt -q progcomp; then
|
||||||
|
for script in /etc/bash_completion.d/* ; do
|
||||||
|
if [ -r $script ] ; then
|
||||||
|
. $script
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# End /etc/profile.d/bash_completion.sh
|
33
bash/bashrc
Normal file
33
bash/bashrc
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# Begin /etc/bashrc
|
||||||
|
|
||||||
|
# System wide aliases and functions.
|
||||||
|
|
||||||
|
# System wide environment variables and startup programs should go into
|
||||||
|
# /etc/profile. Personal environment variables and startup programs
|
||||||
|
# should go into ~/.bash_profile. Personal aliases and functions should
|
||||||
|
# go into ~/.bashrc
|
||||||
|
|
||||||
|
# Provides colored /bin/ls and /bin/grep commands. Used in conjunction
|
||||||
|
# with code in /etc/profile.
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias ll='ls -F -b -T 0 --group-directories-first --color=auto --format=long --time-style="+%F %T" --human-readable'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
|
||||||
|
# Provides prompt for non-login shells, specifically shells started
|
||||||
|
# in the X environment. [Review the LFS archive thread titled
|
||||||
|
# PS1 Environment Variable for a great case study behind this script
|
||||||
|
# addendum.]
|
||||||
|
|
||||||
|
NORMAL="\[\e[0m\]"
|
||||||
|
RED="\[\e[1;31m\]"
|
||||||
|
GREEN="\[\e[1;32m\]"
|
||||||
|
if [[ $EUID == 0 ]] ; then
|
||||||
|
PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
|
||||||
|
else
|
||||||
|
PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset RED GREEN NORMAL
|
||||||
|
|
||||||
|
# End /etc/bashrc
|
12
bash/dircolors.sh
Normal file
12
bash/dircolors.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
|
||||||
|
if [ -f "/etc/dircolors" ] ; then
|
||||||
|
eval $(dircolors -b /etc/dircolors)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.dircolors" ] ; then
|
||||||
|
eval $(dircolors -b $HOME/.dircolors)
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias ll='ls -F -b -T 0 --group-directories-first --color=auto --format=long --time-style="+%F %T" --human-readable'
|
||||||
|
alias grep='grep --color=auto'
|
17
bash/extrapaths.sh
Normal file
17
bash/extrapaths.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
if [ -d /usr/local/lib64/pkgconfig ] ; then
|
||||||
|
pathappend /usr/local/lib64/pkgconfig PKG_CONFIG_PATH
|
||||||
|
fi
|
||||||
|
if [ -d /usr/local/bin ]; then
|
||||||
|
pathprepend /usr/local/bin
|
||||||
|
fi
|
||||||
|
if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
|
||||||
|
pathprepend /usr/local/sbin
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d /usr/local/share ]; then
|
||||||
|
pathprepend /usr/local/share XDG_DATA_DIRS
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set some defaults before other applications add to these paths.
|
||||||
|
pathappend /usr/share/man MANPATH
|
||||||
|
pathappend /usr/share/info INFOPATH
|
17
bash/i18n.sh
Normal file
17
bash/i18n.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Set up i18n variables
|
||||||
|
for i in $(locale); do
|
||||||
|
unset ${i%=*}
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$TERM" = linux ]]; then
|
||||||
|
export LANG=C.UTF-8
|
||||||
|
else
|
||||||
|
source /etc/locale.conf
|
||||||
|
|
||||||
|
for i in $(locale); do
|
||||||
|
key=${i%=*}
|
||||||
|
if [[ -v $key ]]; then
|
||||||
|
export $key
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
82
bash/profile
Normal file
82
bash/profile
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
# Begin /etc/profile
|
||||||
|
|
||||||
|
# System wide environment variables and startup programs.
|
||||||
|
|
||||||
|
# System wide aliases and functions should go in /etc/bashrc. Personal
|
||||||
|
# environment variables and startup programs should go into
|
||||||
|
# ~/.bash_profile. Personal aliases and functions should go into
|
||||||
|
# ~/.bashrc.
|
||||||
|
|
||||||
|
# Functions to help us manage paths. Second argument is the name of the
|
||||||
|
# path variable to be modified (default: PATH)
|
||||||
|
pathremove () {
|
||||||
|
local IFS=':'
|
||||||
|
local NEWPATH
|
||||||
|
local DIR
|
||||||
|
local PATHVARIABLE=${2:-PATH}
|
||||||
|
for DIR in ${!PATHVARIABLE} ; do
|
||||||
|
if [ "$DIR" != "$1" ] ; then
|
||||||
|
NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
export $PATHVARIABLE="$NEWPATH"
|
||||||
|
}
|
||||||
|
|
||||||
|
pathprepend () {
|
||||||
|
pathremove $1 $2
|
||||||
|
local PATHVARIABLE=${2:-PATH}
|
||||||
|
export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
|
||||||
|
}
|
||||||
|
|
||||||
|
pathappend () {
|
||||||
|
pathremove $1 $2
|
||||||
|
local PATHVARIABLE=${2:-PATH}
|
||||||
|
export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
export -f pathremove pathprepend pathappend
|
||||||
|
|
||||||
|
# Set the initial path
|
||||||
|
export PATH=/usr/bin
|
||||||
|
|
||||||
|
# Attempt to provide backward compatibility with LFS earlier than 11
|
||||||
|
if [ ! -L /bin ]; then
|
||||||
|
pathappend /bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $EUID -eq 0 ] ; then
|
||||||
|
pathappend /usr/sbin
|
||||||
|
if [ ! -L /sbin ]; then
|
||||||
|
pathappend /sbin
|
||||||
|
fi
|
||||||
|
unset HISTFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set up some environment variables.
|
||||||
|
export HISTSIZE=1000
|
||||||
|
export HISTIGNORE="&:[bf]g:exit"
|
||||||
|
|
||||||
|
# Set some defaults for graphical systems
|
||||||
|
export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
|
||||||
|
export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
|
||||||
|
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}
|
||||||
|
|
||||||
|
# Set up a red prompt for root and a green one for users.
|
||||||
|
NORMAL="\[\e[0m\]"
|
||||||
|
RED="\[\e[1;31m\]"
|
||||||
|
GREEN="\[\e[1;32m\]"
|
||||||
|
if [[ $EUID == 0 ]] ; then
|
||||||
|
PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
|
||||||
|
else
|
||||||
|
PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for script in /etc/profile.d/*.sh ; do
|
||||||
|
if [ -r $script ] ; then
|
||||||
|
. $script
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
unset script RED GREEN NORMAL
|
||||||
|
|
||||||
|
# End /etc/profile
|
5
bash/readline.sh
Normal file
5
bash/readline.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Set up the INPUTRC environment variable.
|
||||||
|
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
|
||||||
|
INPUTRC=/etc/inputrc
|
||||||
|
fi
|
||||||
|
export INPUTRC
|
5
bash/readline.sh.1
Normal file
5
bash/readline.sh.1
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Set up the INPUTRC environment variable.
|
||||||
|
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
|
||||||
|
INPUTRC=/etc/inputrc
|
||||||
|
fi
|
||||||
|
export INPUTRC
|
6
bash/shells
Normal file
6
bash/shells
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Begin /etc/shells
|
||||||
|
|
||||||
|
/bin/sh
|
||||||
|
/bin/bash
|
||||||
|
|
||||||
|
# End /etc/shells
|
5
bash/skel_bash_logout
Normal file
5
bash/skel_bash_logout
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Begin ~/.bash_logout
|
||||||
|
|
||||||
|
# Personal items to perform on logout.
|
||||||
|
|
||||||
|
# End ~/.bash_logout
|
22
bash/skel_bash_profile
Normal file
22
bash/skel_bash_profile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Begin ~/.bash_profile
|
||||||
|
|
||||||
|
# Personal environment variables and startup programs.
|
||||||
|
|
||||||
|
# Personal aliases and functions should go in ~/.bashrc. System wide
|
||||||
|
# environment variables and startup programs are in /etc/profile.
|
||||||
|
# System wide aliases and functions are in /etc/bashrc.
|
||||||
|
|
||||||
|
if [ -f "$HOME/.bashrc" ] ; then
|
||||||
|
source $HOME/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$HOME/bin" ] ; then
|
||||||
|
pathprepend $HOME/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Having . in the PATH is dangerous
|
||||||
|
#if [ $EUID -gt 99 ]; then
|
||||||
|
# pathappend .
|
||||||
|
#fi
|
||||||
|
|
||||||
|
# End ~/.bash_profile
|
17
bash/skel_bashrc
Normal file
17
bash/skel_bashrc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Begin ~/.bashrc
|
||||||
|
|
||||||
|
# Personal aliases and functions.
|
||||||
|
|
||||||
|
# Personal environment variables and startup programs should go in
|
||||||
|
# ~/.bash_profile. System wide environment variables and startup
|
||||||
|
# programs are in /etc/profile. System wide aliases and functions are
|
||||||
|
# in /etc/bashrc.
|
||||||
|
|
||||||
|
if [ -f "/etc/bashrc" ] ; then
|
||||||
|
source /etc/bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set up user specific i18n variables
|
||||||
|
#export LANG=<ll>_<CC>.<charmap><@modifiers>
|
||||||
|
|
||||||
|
# End ~/.bashrc
|
6
bash/umask.sh
Normal file
6
bash/umask.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# By default, the umask should be set.
|
||||||
|
if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ] ; then
|
||||||
|
umask 002
|
||||||
|
else
|
||||||
|
umask 022
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user