2006-12-15 18:03:59 +01:00
|
|
|
#
|
2011-02-18 11:51:53 +01:00
|
|
|
# spec file for package bash
|
2006-12-15 18:03:59 +01:00
|
|
|
#
|
2019-01-09 14:08:47 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-15 18:03:59 +01:00
|
|
|
#
|
2008-09-05 19:54:36 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-03-01 15:10:47 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2006-12-15 18:03:59 +01:00
|
|
|
#
|
|
|
|
|
2011-12-20 21:06:27 +01:00
|
|
|
|
2014-09-30 15:48:51 +02:00
|
|
|
%bcond_with import_function
|
2019-01-09 14:08:47 +01:00
|
|
|
%bcond_with sjis
|
2014-09-30 15:48:51 +02:00
|
|
|
|
2006-12-15 18:03:59 +01:00
|
|
|
Name: bash
|
2016-09-16 13:10:58 +02:00
|
|
|
%define bextend %nil
|
2019-01-09 14:08:47 +01:00
|
|
|
Version: 5.0
|
2011-12-19 15:34:58 +01:00
|
|
|
Release: 0
|
2006-12-15 18:03:59 +01:00
|
|
|
Summary: The GNU Bourne-Again Shell
|
2018-02-27 15:38:26 +01:00
|
|
|
License: GPL-3.0-or-later
|
2011-12-19 15:34:58 +01:00
|
|
|
Group: System/Shells
|
2018-03-12 16:23:59 +01:00
|
|
|
Recommends: bash-lang = %version
|
|
|
|
# The package bash-completion is a source of
|
|
|
|
# bugs which will hit at most this package
|
|
|
|
#Recommends: bash-completion
|
|
|
|
Suggests: command-not-found
|
|
|
|
Recommends: bash-doc = %version
|
2007-09-21 15:57:43 +02:00
|
|
|
Url: http://www.gnu.org/software/bash/bash.html
|
2012-03-06 10:54:25 +01:00
|
|
|
# Git: http://git.savannah.gnu.org/cgit/bash.git
|
2018-03-12 16:23:59 +01:00
|
|
|
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{version}%{bextend}.tar.gz
|
|
|
|
Source1: bash-%{version}-patches.tar.bz2
|
2006-12-15 18:03:59 +01:00
|
|
|
Source4: run-tests
|
2007-12-12 22:07:41 +01:00
|
|
|
Source5: dot.bashrc
|
|
|
|
Source6: dot.profile
|
|
|
|
Source7: bash-rpmlintrc
|
2009-12-16 08:57:10 +01:00
|
|
|
Source8: baselibs.conf
|
2011-03-09 12:02:20 +01:00
|
|
|
# Remember unsafe method, compare with
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00070.html
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00071.html
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00073.html
|
|
|
|
Source9: bash-4.2-history-myown.dif.bz2
|
2018-03-12 16:23:59 +01:00
|
|
|
Patch0: bash-%{version}.dif
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch1: bash-2.03-manual.patch
|
2009-03-03 18:12:53 +01:00
|
|
|
Patch2: bash-4.0-security.patch
|
2014-10-22 14:53:54 +02:00
|
|
|
Patch3: bash-4.3-2.4.4.patch
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch4: bash-3.0-evalexp.patch
|
|
|
|
Patch5: bash-3.0-warn-locale.patch
|
2014-10-22 14:53:54 +02:00
|
|
|
Patch7: bash-4.3-decl.patch
|
2015-03-19 12:47:55 +01:00
|
|
|
Patch9: bash-4.3-include-unistd.dif
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch10: bash-3.2-printf.patch
|
2014-10-22 14:53:54 +02:00
|
|
|
Patch11: bash-4.3-loadables.dif
|
2010-03-09 15:35:20 +01:00
|
|
|
Patch12: bash-4.1-completion.dif
|
2011-11-11 16:29:47 +01:00
|
|
|
Patch13: bash-4.2-nscdunmap.dif
|
2014-10-22 14:53:54 +02:00
|
|
|
Patch14: bash-4.3-sigrestart.patch
|
2013-03-15 16:46:33 +01:00
|
|
|
# PATCH-FIX-UPSTREAM bnc#382214 -- disabled due bnc#806628 by -DBNC382214=0
|
2009-03-03 18:12:53 +01:00
|
|
|
Patch16: bash-4.0-setlocale.dif
|
2013-07-12 14:38:33 +02:00
|
|
|
# PATCH-EXTEND-SUSE bnc#828877 -- xterm resizing does not pass to all sub clients
|
2014-10-22 14:53:54 +02:00
|
|
|
Patch18: bash-4.3-winch.dif
|
2010-02-18 12:17:29 +01:00
|
|
|
Patch40: bash-4.1-bash.bashrc.dif
|
2019-01-09 14:08:47 +01:00
|
|
|
# PATCH-FIX-SUSE For bsc#1065158 add support for broken Japanese locale Shift JIS
|
|
|
|
Patch42: bash-4.3-SJIS.patch
|
2010-09-09 14:46:02 +02:00
|
|
|
Patch46: man2html-no-timestamp.patch
|
2015-07-01 10:51:27 +02:00
|
|
|
Patch47: bash-4.3-perl522.patch
|
2014-10-22 14:53:54 +02:00
|
|
|
# PATCH-FIX-SUSE
|
|
|
|
Patch48: bash-4.3-extra-import-func.patch
|
2015-10-19 15:43:05 +02:00
|
|
|
# PATCH-EXTEND-SUSE Allow root to clean file system if filled up
|
|
|
|
Patch49: bash-4.3-pathtemp.patch
|
2019-03-01 13:21:51 +01:00
|
|
|
BuildRequires: audit-devel
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: patchutils
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
# This has to be always the same version as included in the bash its self
|
|
|
|
BuildRequires: readline-devel == 8.0
|
|
|
|
BuildRequires: screen
|
|
|
|
BuildRequires: sed
|
|
|
|
BuildRequires: update-alternatives
|
2019-03-01 15:10:47 +01:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2007-12-12 22:07:41 +01:00
|
|
|
%global _sysconfdir /etc
|
|
|
|
%global _incdir %{_includedir}
|
2009-06-12 16:51:48 +02:00
|
|
|
%global _ldldir /%{_lib}/bash
|
2009-02-19 17:52:11 +01:00
|
|
|
%global _minsh 0
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Bash is an sh-compatible command interpreter that executes commands
|
|
|
|
read from standard input or from a file. Bash incorporates useful
|
|
|
|
features from the Korn and C shells (ksh and csh). Bash is intended to
|
|
|
|
be a conformant implementation of the IEEE Posix Shell and Tools
|
|
|
|
specification (IEEE Working Group 1003.2).
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%package doc
|
2007-08-03 17:30:00 +02:00
|
|
|
Summary: Documentation how to Use the GNU Bourne-Again Shell
|
|
|
|
Group: Documentation/Man
|
2007-12-12 22:07:41 +01:00
|
|
|
Provides: bash:%{_infodir}/bash.info.gz
|
|
|
|
PreReq: %install_info_prereq
|
2009-12-18 12:33:21 +01:00
|
|
|
BuildArch: noarch
|
2007-08-03 17:30:00 +02:00
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%description doc
|
2007-08-03 17:30:00 +02:00
|
|
|
This package contains the documentation for using the bourne shell
|
|
|
|
interpreter Bash.
|
|
|
|
|
2010-07-19 13:22:41 +02:00
|
|
|
%if %{defined lang_package}
|
2009-06-12 16:51:48 +02:00
|
|
|
%lang_package(bash)
|
2010-07-19 13:22:41 +02:00
|
|
|
%else
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%package lang
|
2010-07-19 13:22:41 +02:00
|
|
|
Summary: Languages for package bash
|
|
|
|
Group: System/Localization
|
2018-03-12 16:23:59 +01:00
|
|
|
Requires: bash = %{version}
|
2010-07-19 13:22:41 +02:00
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%description lang
|
2010-07-19 13:22:41 +02:00
|
|
|
Provides translations to the package bash
|
|
|
|
%endif
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%package devel
|
2009-06-12 16:51:48 +02:00
|
|
|
Summary: Include Files mandatory for Development of bash loadable builtins
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%description devel
|
2009-06-12 16:51:48 +02:00
|
|
|
This package contains the C header files for writing loadable new
|
2019-03-04 11:18:00 +01:00
|
|
|
builtins for the interpreter Bash. Use the output of the command
|
|
|
|
`pkg-config bash --cflags' on the compilers command line.
|
2009-06-12 16:51:48 +02:00
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%package loadables
|
2009-06-12 16:51:48 +02:00
|
|
|
Summary: Loadable bash builtins
|
|
|
|
Group: System/Shells
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%description loadables
|
2009-06-12 16:51:48 +02:00
|
|
|
This package contains the examples for the ready-to-dynamic-load
|
|
|
|
builtins found in the source tar ball of the bash:
|
|
|
|
|
|
|
|
basename Return non-directory portion of pathname.
|
|
|
|
|
|
|
|
cut cut(1) replacement.
|
|
|
|
|
|
|
|
dirname Return directory portion of pathname.
|
|
|
|
|
|
|
|
finfo Print file info.
|
|
|
|
|
|
|
|
getconf POSIX.2 getconf utility.
|
|
|
|
|
|
|
|
head Copy first part of files.
|
|
|
|
|
|
|
|
id POSIX.2 user identity.
|
|
|
|
|
|
|
|
ln Make links.
|
|
|
|
|
|
|
|
logname Print login name of current user.
|
|
|
|
|
|
|
|
mkdir Make directories.
|
|
|
|
|
|
|
|
pathchk Check pathnames for validity and portability.
|
|
|
|
|
|
|
|
print Loadable ksh-93 style print builtin.
|
|
|
|
|
|
|
|
printenv Minimal builtin clone of BSD printenv(1).
|
|
|
|
|
|
|
|
push Anyone remember TOPS-20?
|
|
|
|
|
|
|
|
realpath Canonicalize pathnames, resolving symlinks.
|
|
|
|
|
|
|
|
rmdir Remove directory.
|
|
|
|
|
|
|
|
sleep sleep for fractions of a second.
|
|
|
|
|
|
|
|
strftime Loadable builtin interface to strftime(3).
|
|
|
|
|
|
|
|
sync Sync the disks by forcing pending filesystem writes to
|
|
|
|
complete.
|
|
|
|
|
|
|
|
tee Duplicate standard input.
|
|
|
|
|
|
|
|
tty Return terminal name.
|
|
|
|
|
|
|
|
uname Print system information.
|
|
|
|
|
|
|
|
unlink Remove a directory entry.
|
|
|
|
|
|
|
|
whoami Print out username of current user.
|
|
|
|
|
|
|
|
|
2006-12-15 18:03:59 +01:00
|
|
|
%prep
|
2019-01-09 14:08:47 +01:00
|
|
|
%if %{with sjis}
|
|
|
|
echo -e '\033[1m\033[31mWarning: Shift JIS support is enabled\033[m'
|
|
|
|
%else
|
|
|
|
echo -e '\033[1m\032[31mShift JIS support disabled\033[m'
|
|
|
|
%endif
|
2018-03-12 16:23:59 +01:00
|
|
|
%setup -q -n bash-%{version}%{bextend} -b1
|
2013-03-21 12:55:05 +01:00
|
|
|
typeset -i level
|
2018-03-12 16:23:59 +01:00
|
|
|
for patch in ../bash-%{version}-patches/*; do
|
2012-03-06 10:54:25 +01:00
|
|
|
test -e $patch || break
|
2013-03-21 12:55:05 +01:00
|
|
|
let level=0 || true
|
|
|
|
file=$(lsdiff --files=1 $patch)
|
|
|
|
if test ! -e $file ; then
|
|
|
|
file=${file#*/}
|
|
|
|
let level++ || true
|
|
|
|
fi
|
|
|
|
test -e $file || exit 1
|
2018-03-12 16:23:59 +01:00
|
|
|
sed -ri '/^\*\*\* \.\./{ s@\.\./bash-%{version}[^/]*/@@ }' $patch
|
2012-03-06 10:54:25 +01:00
|
|
|
echo Patch $patch
|
2013-03-21 12:55:05 +01:00
|
|
|
patch -s -p$level < $patch
|
2006-12-15 18:03:59 +01:00
|
|
|
done
|
|
|
|
%patch1 -p0 -b .manual
|
|
|
|
%patch2 -p0 -b .security
|
|
|
|
%patch3 -p0 -b .2.4.4
|
|
|
|
%patch4 -p0 -b .evalexp
|
|
|
|
%patch5 -p0 -b .warnlc
|
|
|
|
%patch7 -p0 -b .decl
|
2015-03-19 12:47:55 +01:00
|
|
|
%patch9 -p0 -b .unistd
|
2006-12-15 18:03:59 +01:00
|
|
|
%patch10 -p0 -b .printf
|
|
|
|
%patch11 -p0 -b .plugins
|
2010-03-09 15:35:20 +01:00
|
|
|
%patch12 -p0 -b .completion
|
2011-11-11 16:29:47 +01:00
|
|
|
%patch13 -p0 -b .nscdunmap
|
2008-01-12 02:40:35 +01:00
|
|
|
%patch14 -p0 -b .sigrestart
|
2008-12-03 16:18:51 +01:00
|
|
|
%patch16 -p0 -b .setlocale
|
2019-01-09 14:08:47 +01:00
|
|
|
#%patch18 -p0 -b .winch
|
2010-02-18 12:17:29 +01:00
|
|
|
%patch40 -p0 -b .bashrc
|
2019-01-09 14:08:47 +01:00
|
|
|
%if %{with sjis}
|
|
|
|
%patch42 -p0 -b .sjis
|
|
|
|
%endif
|
2011-03-08 13:18:13 +01:00
|
|
|
%patch46 -p0 -b .notimestamp
|
2015-07-01 10:51:27 +02:00
|
|
|
%patch47 -p0 -b .perl522
|
2014-09-30 15:52:29 +02:00
|
|
|
%if %{with import_function}
|
2016-09-16 13:10:58 +02:00
|
|
|
%patch48 -b .eif
|
2014-09-30 15:52:29 +02:00
|
|
|
%endif
|
2016-09-16 13:10:58 +02:00
|
|
|
%patch49 -p0 -b .pthtmp
|
2011-03-08 13:18:13 +01:00
|
|
|
%patch0 -p0 -b .0
|
2019-01-09 14:08:47 +01:00
|
|
|
|
2018-03-16 19:25:33 +01:00
|
|
|
# This has to be always the same version as included in the bash its self
|
|
|
|
rl1=($(sed -rn '/RL_READLINE_VERSION/p' lib/readline/readline.h))
|
|
|
|
rl2=($(sed -rn '/RL_READLINE_VERSION/p' /usr/include/readline/readline.h))
|
|
|
|
test ${rl1[2]} = ${rl2[2]} || exit 1
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
LANG=POSIX
|
|
|
|
LC_ALL=$LANG
|
|
|
|
unset LC_CTYPE
|
2013-03-15 16:46:33 +01:00
|
|
|
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1
|
|
|
|
SCREENRC=${SCREENDIR}/bash
|
|
|
|
export SCREENRC SCREENDIR
|
|
|
|
exec 0< /dev/null
|
|
|
|
SCREENLOG=${SCREENDIR}/log
|
|
|
|
cat > $SCREENRC<<-EOF
|
|
|
|
deflogin off
|
2017-01-19 13:36:42 +01:00
|
|
|
deflog on
|
2013-03-15 16:46:33 +01:00
|
|
|
logfile $SCREENLOG
|
|
|
|
logfile flush 1
|
|
|
|
logtstamp off
|
|
|
|
log on
|
|
|
|
setsid on
|
|
|
|
scrollback 0
|
|
|
|
silence on
|
|
|
|
utf8 on
|
|
|
|
EOF
|
2006-12-15 18:03:59 +01:00
|
|
|
CPU=$(uname -m 2> /dev/null)
|
|
|
|
HOSTTYPE=${CPU}
|
|
|
|
MACHTYPE=${CPU}-suse-linux
|
|
|
|
export LANG LC_ALL HOSTTYPE MACHTYPE
|
2008-04-25 15:34:05 +02:00
|
|
|
cflags ()
|
|
|
|
{
|
|
|
|
local flag=$1; shift
|
2010-07-19 13:22:41 +02:00
|
|
|
local var=$1; shift
|
|
|
|
test -n "${flag}" -a -n "${var}" || return
|
|
|
|
case "${!var}" in
|
2008-04-25 15:34:05 +02:00
|
|
|
*${flag}*) return
|
|
|
|
esac
|
2011-11-18 13:04:20 +01:00
|
|
|
set -o noclobber
|
2010-07-19 13:22:41 +02:00
|
|
|
case "$flag" in
|
|
|
|
-Wl,*)
|
2011-11-18 13:04:20 +01:00
|
|
|
if echo 'int main () { return 0; }' | \
|
|
|
|
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
2010-07-19 13:22:41 +02:00
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2013-02-12 15:13:38 +01:00
|
|
|
if ${CC:-gcc} -Werror ${flag/#-Wno-/-W} -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
2010-07-19 13:22:41 +02:00
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
2013-02-12 15:13:38 +01:00
|
|
|
if ${CXX:-g++} -Werror ${flag/#-Wno-/-W} -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
|
2010-07-19 13:22:41 +02:00
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
esac
|
2011-11-18 13:04:20 +01:00
|
|
|
set +o noclobber
|
2008-04-25 15:34:05 +02:00
|
|
|
}
|
2015-10-16 18:53:55 +02:00
|
|
|
LARGEFILE="$(getconf LFS_CFLAGS)"
|
2009-02-19 17:52:11 +01:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS $LARGEFILE -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g"
|
2008-11-03 11:56:52 +01:00
|
|
|
LDFLAGS=""
|
2015-01-16 17:57:08 +01:00
|
|
|
#
|
|
|
|
# Never ever put -DMUST_UNBLOCK_CHLD herein as this breaks bash
|
|
|
|
#
|
2008-04-25 15:34:05 +02:00
|
|
|
cflags -Wuninitialized CFLAGS
|
|
|
|
cflags -Wextra CFLAGS
|
|
|
|
cflags -Wno-unprototyped-calls CFLAGS
|
|
|
|
cflags -Wno-switch-enum CFLAGS
|
2009-03-03 18:12:53 +01:00
|
|
|
cflags -Wno-unused-variable CFLAGS
|
|
|
|
cflags -Wno-unused-parameter CFLAGS
|
2015-01-16 17:57:08 +01:00
|
|
|
cflags -Wno-parentheses CFLAGS
|
2009-02-19 17:52:11 +01:00
|
|
|
cflags -ftree-loop-linear CFLAGS
|
2008-04-25 15:34:05 +02:00
|
|
|
cflags -pipe CFLAGS
|
2013-03-15 16:46:33 +01:00
|
|
|
cflags -DBNC382214=0 CFLAGS
|
2014-09-30 14:41:44 +02:00
|
|
|
cflags -DIMPORT_FUNCTIONS_DEF=0 CFLAGS
|
2008-11-03 11:56:52 +01:00
|
|
|
cflags -Wl,--as-needed LDFLAGS
|
2009-05-15 21:21:59 +02:00
|
|
|
cflags -Wl,-O2 LDFLAGS
|
2016-09-16 13:10:58 +02:00
|
|
|
cflags -Wl,-rpath,%{_ldldir} LDFLAGS
|
2006-12-15 18:03:59 +01:00
|
|
|
# /proc is required for correct configuration
|
|
|
|
test -d /dev/fd || { echo "/proc is not mounted!" >&2; exit 1; }
|
2018-03-12 16:23:59 +01:00
|
|
|
CC=gcc
|
2009-02-19 17:52:11 +01:00
|
|
|
%if %_minsh
|
|
|
|
cflags -Os CFLAGS
|
|
|
|
# cflags -U_FORTIFY_SOURCE CFLAGS
|
|
|
|
# cflags -funswitch-loops CFLAGS
|
|
|
|
# cflags -ftree-loop-im CFLAGS
|
|
|
|
# cflags -ftree-loop-ivcanon CFLAGS
|
|
|
|
# cflags -fprefetch-loop-arrays CFLAGS
|
|
|
|
# cflags -fno-stack-protector CFLAGS
|
|
|
|
# cflags -fno-unwind-tables CFLAGS
|
|
|
|
# cflags -fno-asynchronous-unwind-tables CFLAGS
|
|
|
|
%endif
|
2008-04-25 15:34:05 +02:00
|
|
|
CC_FOR_BUILD="$CC"
|
2006-12-15 18:03:59 +01:00
|
|
|
CFLAGS_FOR_BUILD="$CFLAGS"
|
2008-04-25 15:34:05 +02:00
|
|
|
export CC_FOR_BUILD CFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
|
|
|
|
autoconf
|
2006-12-15 18:03:59 +01:00
|
|
|
#
|
|
|
|
# We have a malloc with our glibc
|
|
|
|
#
|
|
|
|
SYSMALLOC="
|
|
|
|
--without-gnu-malloc
|
2009-03-03 18:12:53 +01:00
|
|
|
--without-bash-malloc
|
2019-01-09 14:08:47 +01:00
|
|
|
--enable-mem-scramble
|
2006-12-15 18:03:59 +01:00
|
|
|
"
|
|
|
|
#
|
|
|
|
# System readline library (comment out it not to be used)
|
|
|
|
#
|
|
|
|
READLINE="
|
|
|
|
--with-installed-readline
|
|
|
|
"
|
|
|
|
bash support/mkconffiles -v
|
2009-02-19 17:52:11 +01:00
|
|
|
%if %_minsh
|
|
|
|
./configure --build=%{_target_cpu}-suse-linux \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--with-curses \
|
2009-06-05 22:32:36 +02:00
|
|
|
--with-afs \
|
2019-01-09 14:08:47 +01:00
|
|
|
--with-gnu-ld \
|
2009-06-05 22:32:36 +02:00
|
|
|
$SYSMALLOC \
|
2009-02-19 17:52:11 +01:00
|
|
|
--enable-minimal-config \
|
|
|
|
--enable-arith-for-command \
|
|
|
|
--enable-array-variables \
|
|
|
|
--enable-brace-expansion \
|
2009-03-03 18:12:53 +01:00
|
|
|
--enable-casemod-attributes \
|
|
|
|
--enable-casemod-expansion \
|
|
|
|
--enable-command-timing \
|
2009-02-19 17:52:11 +01:00
|
|
|
--enable-cond-command \
|
|
|
|
--enable-cond-regexp \
|
2009-03-03 18:12:53 +01:00
|
|
|
--enable-coprocesses \
|
2009-02-19 17:52:11 +01:00
|
|
|
--enable-directory-stack \
|
|
|
|
--enable-dparen-arithmetic \
|
|
|
|
--enable-extended-glob \
|
|
|
|
--enable-job-control \
|
|
|
|
--enable-net-redirections \
|
|
|
|
--enable-process-substitution \
|
2019-01-09 14:08:47 +01:00
|
|
|
--enable-glob-asciiranges-default \
|
2009-02-19 17:52:11 +01:00
|
|
|
--disable-strict-posix-default \
|
|
|
|
--enable-separate-helpfiles=%{_datadir}/bash/helpfiles \
|
|
|
|
$READLINE
|
|
|
|
make Program=sh sh
|
|
|
|
make distclean
|
|
|
|
%endif
|
2006-12-15 18:03:59 +01:00
|
|
|
./configure --build=%{_target_cpu}-suse-linux \
|
2007-12-12 22:07:41 +01:00
|
|
|
--prefix=%{_prefix} \
|
2006-12-15 18:03:59 +01:00
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--libdir=%{_libdir} \
|
2018-03-16 07:54:20 +01:00
|
|
|
--docdir=%{_docdir}/%{name} \
|
2006-12-15 18:03:59 +01:00
|
|
|
--with-curses \
|
2009-06-05 22:32:36 +02:00
|
|
|
--with-afs \
|
2019-01-09 14:08:47 +01:00
|
|
|
--with-gnu-ld \
|
2006-12-15 18:03:59 +01:00
|
|
|
$SYSMALLOC \
|
|
|
|
--enable-job-control \
|
2018-02-27 15:38:26 +01:00
|
|
|
--enable-net-redirections \
|
2006-12-15 18:03:59 +01:00
|
|
|
--enable-alias \
|
|
|
|
--enable-readline \
|
|
|
|
--enable-history \
|
|
|
|
--enable-bang-history \
|
|
|
|
--enable-directory-stack \
|
|
|
|
--enable-process-substitution \
|
|
|
|
--enable-prompt-string-decoding \
|
|
|
|
--enable-select \
|
|
|
|
--enable-help-builtin \
|
2019-01-09 14:08:47 +01:00
|
|
|
--enable-separate-helpfiles \
|
2006-12-15 18:03:59 +01:00
|
|
|
--enable-array-variables \
|
|
|
|
--enable-brace-expansion \
|
|
|
|
--enable-command-timing \
|
|
|
|
--enable-disabled-builtins \
|
2019-01-09 14:08:47 +01:00
|
|
|
--enable-glob-asciiranges-default \
|
2009-02-19 17:52:11 +01:00
|
|
|
--disable-strict-posix-default \
|
2017-12-08 07:13:58 +01:00
|
|
|
--enable-multibyte \
|
2009-02-19 17:52:11 +01:00
|
|
|
--enable-separate-helpfiles=%{_datadir}/bash/helpfiles \
|
2006-12-15 18:03:59 +01:00
|
|
|
$READLINE
|
2019-01-09 14:08:47 +01:00
|
|
|
sed -rn '/Configuration feature settings controllable by autoconf/,/End of configuration settings controllable by autoconf/p' < config.h
|
2017-05-24 15:58:50 +02:00
|
|
|
profilecflags=CFLAGS="$CFLAGS"
|
|
|
|
%if 0%{?do_profiling}
|
|
|
|
profilecflags=CFLAGS="$CFLAGS %cflags_profile_generate"
|
|
|
|
%endif
|
|
|
|
make "$profilecflags" \
|
2013-03-15 16:46:33 +01:00
|
|
|
all printenv recho zecho xcase
|
2010-07-19 13:22:41 +02:00
|
|
|
TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1
|
2013-03-15 16:46:33 +01:00
|
|
|
> $SCREENLOG
|
2015-01-09 14:14:01 +01:00
|
|
|
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
2016-10-21 14:25:30 +02:00
|
|
|
env -i HOME=$PWD TERM=$TERM LD_LIBRARY_PATH=$LD_RUN_PATH TMPDIR=$TMPDIR \
|
2013-03-15 16:46:33 +01:00
|
|
|
SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
|
2017-01-19 13:36:42 +01:00
|
|
|
screen -D -m make TESTSCRIPT=%{SOURCE4} check
|
2015-01-09 14:14:01 +01:00
|
|
|
kill -TERM $pid
|
2017-05-24 15:58:50 +02:00
|
|
|
%if 0%{?do_profiling}
|
2017-05-26 08:34:47 +02:00
|
|
|
rm -f jobs.gcda
|
2017-05-24 15:58:50 +02:00
|
|
|
profilecflags=CFLAGS="$CFLAGS %cflags_profile_feedback -fprofile-correction"
|
|
|
|
clean=clean
|
|
|
|
%endif
|
|
|
|
make "$profilecflags" $clean all
|
2006-12-15 18:03:59 +01:00
|
|
|
make -C examples/loadables/
|
|
|
|
make documentation
|
|
|
|
|
|
|
|
%install
|
2018-01-30 08:16:19 +01:00
|
|
|
%make_install
|
2016-09-16 13:10:58 +02:00
|
|
|
make -C examples/loadables/ install-supported DESTDIR=%{buildroot} libdir=/%{_lib}
|
2019-03-04 11:18:00 +01:00
|
|
|
mv -vf %{buildroot}%{_ldldir}/*.h %{buildroot}%{_includedir}/bash/
|
|
|
|
mv -vf %{buildroot}%{_ldldir}/*.inc %{buildroot}%{_datadir}/bash
|
2016-09-16 13:10:58 +02:00
|
|
|
rm -rf %{buildroot}%{_libdir}/bash
|
|
|
|
rm -rf %{buildroot}/%{_lib}/pkgconfig
|
|
|
|
sed -ri '/CC = gcc/s@(CC = gcc).*@\1@' %{buildroot}%{_libdir}/pkgconfig/bash.pc
|
2007-12-12 22:07:41 +01:00
|
|
|
mkdir -p %{buildroot}/bin
|
2019-03-01 15:10:47 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
#
|
|
|
|
# It should be noted that the move of /bin/bash to /usr/bin/bash
|
|
|
|
# had NOT done by me at 2019/02/08. Now only a symbolic link
|
|
|
|
# remains here :(
|
|
|
|
# The same had happen for the system POSIX shell /bin/sh
|
|
|
|
#
|
2019-03-04 11:18:00 +01:00
|
|
|
ln -sf %{_bindir}/bash %{buildroot}%{_sysconfdir}/alternatives/sh
|
|
|
|
ln -sf %{_bindir}/sh %{buildroot}%{_sysconfdir}/alternatives/_bin_sh
|
2019-03-01 15:10:47 +01:00
|
|
|
ln -sf %{_bindir}/bash %{buildroot}/bin/bash
|
|
|
|
ln -sf bash %{buildroot}%{_bindir}/rbash
|
2019-03-01 16:00:33 +01:00
|
|
|
ln -sf bash %{buildroot}%{_bindir}/sh
|
|
|
|
ln -sf %{_bindir}/sh %{buildroot}/bin/sh
|
2018-03-16 07:54:20 +01:00
|
|
|
install -m 644 COMPAT NEWS %{buildroot}%{_docdir}/%{name}
|
|
|
|
install -m 644 COPYING %{buildroot}%{_docdir}/%{name}
|
|
|
|
install -m 644 doc/FAQ %{buildroot}%{_docdir}/%{name}
|
|
|
|
install -m 644 doc/INTRO %{buildroot}%{_docdir}/%{name}
|
|
|
|
install -m 644 doc/*.html %{buildroot}%{_docdir}/%{name}
|
2007-12-12 22:07:41 +01:00
|
|
|
install -m 644 doc/builtins.1 %{buildroot}%{_mandir}/man1/bashbuiltins.1
|
|
|
|
install -m 644 doc/rbash.1 %{buildroot}%{_mandir}/man1/rbash.1
|
|
|
|
gzip -9f %{buildroot}%{_infodir}/*.inf*[^z] || true
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
|
2018-03-16 07:54:20 +01:00
|
|
|
sed 's/^|//' > %{buildroot}%{_docdir}/%{name}/BUGS <<\EOF
|
2006-12-15 18:03:59 +01:00
|
|
|
Known problems
|
|
|
|
--------------
|
|
|
|
|
|
|
|
|
This version of bash/readline supports multi byte handling
|
|
|
|
that is e.g. wide character support for UTF-8. This causes
|
|
|
|
problems in geting the current cursor position within the
|
|
|
|
readline runtime library:
|
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
bash-%{version}> LANG=ja_JP
|
|
|
|
bash-%{version}> echo -n "Hello"
|
|
|
|
bash-%{version}>
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
|
In other words the prompt overwrites the output of the
|
|
|
|
echo comand. The boolean variable byte-oriented
|
2007-12-12 22:07:41 +01:00
|
|
|
set in %{_sysconfdir}/inputrc or $HOME/.inputrc avoids this
|
2006-12-15 18:03:59 +01:00
|
|
|
but disables multi byte handling.
|
|
|
|
EOF
|
2007-12-12 22:07:41 +01:00
|
|
|
# remove unpackaged files
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/skel
|
|
|
|
install -m 644 %{S:5} %{buildroot}%{_sysconfdir}/skel/.bashrc
|
|
|
|
install -m 644 %{S:6} %{buildroot}%{_sysconfdir}/skel/.profile
|
|
|
|
touch -t 199605181720.50 %{buildroot}%{_sysconfdir}/skel/.bash_history
|
|
|
|
chmod 600 %{buildroot}%{_sysconfdir}/skel/.bash_history
|
|
|
|
%find_lang bash
|
2009-02-19 17:52:11 +01:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}/bash/helpfiles
|
2007-08-03 17:30:00 +02:00
|
|
|
|
2019-03-04 11:18:00 +01:00
|
|
|
%post -p /bin/bash
|
|
|
|
%{_sbindir}/update-alternatives --quiet --force \
|
|
|
|
--install %{_bindir}/sh sh %{_bindir}/bash 10100 \
|
|
|
|
--slave /bin/sh _bin_sh %{_bindir}/sh
|
2019-03-01 13:21:51 +01:00
|
|
|
|
2019-03-04 11:18:00 +01:00
|
|
|
%preun -p /bin/bash
|
2019-03-01 13:21:51 +01:00
|
|
|
if test "$1" = 0; then
|
2019-03-04 11:18:00 +01:00
|
|
|
%{_sbindir}/update-alternatives --quiet --remove sh %{_bindir}/bash
|
2019-03-01 13:21:51 +01:00
|
|
|
fi
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%post doc
|
2007-08-03 17:30:00 +02:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/bash.info.gz
|
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%preun doc
|
2007-08-03 17:30:00 +02:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bash.info.gz
|
2006-12-15 18:03:59 +01:00
|
|
|
|
2008-11-03 11:56:52 +01:00
|
|
|
%clean
|
2012-03-06 13:14:55 +01:00
|
|
|
LD_LIBRARY_PATH=%{buildroot}/%{_lib} \
|
2008-11-03 11:56:52 +01:00
|
|
|
ldd -u -r %{buildroot}/bin/bash || true
|
2019-03-01 15:10:47 +01:00
|
|
|
%{?buildroot: %__rm -rf %{buildroot}}
|
2008-11-03 11:56:52 +01:00
|
|
|
|
2009-06-12 16:51:48 +02:00
|
|
|
%files
|
2018-01-30 08:20:06 +01:00
|
|
|
%defattr(-,root,root)
|
2018-02-27 10:48:21 +01:00
|
|
|
%license COPYING
|
2009-02-19 17:52:11 +01:00
|
|
|
%config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history
|
|
|
|
%config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc
|
|
|
|
%config %attr(644,root,root) %{_sysconfdir}/skel/.profile
|
2019-03-04 11:18:00 +01:00
|
|
|
%ghost %config %{_sysconfdir}/alternatives/sh
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/_bin_sh
|
2016-09-16 13:10:58 +02:00
|
|
|
/bin/bash
|
2019-03-04 11:18:00 +01:00
|
|
|
%verify(not link mtime) /bin/sh
|
2007-12-12 22:07:41 +01:00
|
|
|
%dir %{_sysconfdir}/bash_completion.d
|
2019-03-01 13:21:51 +01:00
|
|
|
%{_bindir}/bash
|
2007-12-12 22:07:41 +01:00
|
|
|
%{_bindir}/bashbug
|
|
|
|
%{_bindir}/rbash
|
2019-03-04 11:18:00 +01:00
|
|
|
%verify(not link mtime) %{_bindir}/sh
|
2009-02-19 17:52:11 +01:00
|
|
|
%dir %{_datadir}/bash
|
|
|
|
%dir %{_datadir}/bash/helpfiles
|
|
|
|
%{_datadir}/bash/helpfiles/*
|
2007-08-03 17:30:00 +02:00
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%files lang -f bash.lang
|
2018-01-30 08:20:06 +01:00
|
|
|
%defattr(-,root,root)
|
2009-06-12 16:51:48 +02:00
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%files doc
|
2018-01-30 08:20:06 +01:00
|
|
|
%defattr(-,root,root)
|
2017-04-25 11:21:03 +02:00
|
|
|
%doc %{_infodir}/bash.info*
|
|
|
|
%doc %{_mandir}/man1/bash.1*
|
|
|
|
%doc %{_mandir}/man1/bashbuiltins.1*
|
|
|
|
%doc %{_mandir}/man1/bashbug.1*
|
|
|
|
%doc %{_mandir}/man1/rbash.1*
|
2018-03-16 07:54:20 +01:00
|
|
|
%doc %{_docdir}/%{name}
|
2009-06-12 16:51:48 +02:00
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%files devel
|
2018-01-30 08:20:06 +01:00
|
|
|
%defattr(-,root,root)
|
2019-03-04 11:18:00 +01:00
|
|
|
%dir %{_includedir}/bash/
|
|
|
|
%dir %{_includedir}/bash/
|
|
|
|
%dir %{_includedir}/bash/builtins/
|
|
|
|
%dir %{_includedir}/bash/include/
|
|
|
|
%{_incdir}/bash/*.h
|
|
|
|
%{_incdir}/bash/builtins/*.h
|
|
|
|
%{_incdir}/bash/include/*.h
|
2016-09-16 13:10:58 +02:00
|
|
|
%{_libdir}/pkgconfig/bash.pc
|
2019-03-04 11:18:00 +01:00
|
|
|
%{_datadir}/bash/*.inc
|
2009-06-12 16:51:48 +02:00
|
|
|
|
2018-03-12 16:23:59 +01:00
|
|
|
%files loadables
|
2018-01-30 08:20:06 +01:00
|
|
|
%defattr(-,root,root)
|
2018-03-12 16:23:59 +01:00
|
|
|
%{_ldldir}
|
2007-12-05 23:45:24 +01:00
|
|
|
|
2007-03-01 20:36:52 +01:00
|
|
|
%changelog
|