auto-import changelog data from bash-2.05a-12.src.rpm

Fri Apr 05 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-12
- Fix the fix for #62418
Thu Apr 04 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-11
- Fix kill builtin (#62418)
Mon Mar 25 2002 Trond Eivind Glomsrd <teg@redhat.com> 2.0.5a-10
- Get rid of completion subpackage
- Use %{_tmppath}
Mon Mar 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-9
- Add patch from Ulrich Drepper to get better error messages when trying to
    launch an application with a bad ELF interpreter (e.g. libc5 ld.so)
    (#60870)
Fri Feb 22 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-8
- Update completion
This commit is contained in:
cvsdist 2004-09-09 03:26:17 +00:00
parent fd6bf9f3c2
commit 8b5e1e8d30
4 changed files with 336 additions and 55 deletions

View File

@ -1,2 +1,3 @@
bash-2.05.tar.bz2 bash-2.05a.tar.bz2
bash-doc-2.05.tar.bz2 bash-completion-20020220.tar.gz
bash-doc-2.05a.tar.bz2

View File

@ -0,0 +1,223 @@
--- bash-2.05a/config.h.in Mon Oct 22 06:58:13 2001
+++ bash-2.05a-ud/config.h.in Thu Mar 7 17:33:03 2002
@@ -541,6 +541,9 @@
/* Define if you have the pathconf function. */
#undef HAVE_PATHCONF
+/* Define if you have the pread function. */
+#undef HAVE_PREAD
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
@@ -675,6 +678,9 @@
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if you have the <elf.h> header file. */
+#undef HAVE_ELF_H
+
/* Define if you have the <grp.h> header file. */
#undef HAVE_GRP_H
--- bash-2.05a/configure.in Mon Nov 5 12:45:35 2001
+++ bash-2.05a-ud/configure.in Thu Mar 7 17:28:32 2002
@@ -484,7 +484,7 @@ BASH_HEADER_INTTYPES
AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
- stddef.h stdint.h netdb.h grp.h strings.h)
+ stddef.h stdint.h netdb.h grp.h strings.h elf.h)
AC_CHECK_HEADERS(sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \
sys/resource.h sys/param.h sys/socket.h \
sys/time.h sys/times.h sys/wait.h)
@@ -546,7 +546,7 @@ AC_CHECK_FUNCS(bcopy bzero confstr sysco
setlinebuf setvbuf setlocale strchr tcgetattr uname \
ulimit tzset siginterrupt memmove ttyname times \
getaddrinfo gethostbyname getservbyname inet_aton \
- vsnprintf snprintf vasprintf asprintf fnmatch)
+ vsnprintf snprintf vasprintf asprintf fnmatch pread)
AC_CHECK_FUNCS(isascii isblank isgraph isprint isspace isxdigit)
AC_REPLACE_FUNCS(getcwd strcasecmp strerror strpbrk strtod)
AC_REPLACE_FUNCS(strtol strtoul strtoll strtoull strtoimax strtoumax)
--- bash-2.05a/execute_cmd.c Mon Oct 29 11:03:18 2001
+++ bash-2.05a-ud/execute_cmd.c Fri Mar 8 00:50:53 2002
@@ -1,6 +1,6 @@
/* execute_command.c -- Execute a COMMAND structure. */
-/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+/* Copyright (C) 1987,1991, 2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -40,6 +40,10 @@
# include <unistd.h>
#endif
+#ifdef HAVE_ELF_H
+# include <elf.h>
+#endif
+
#include "posixtime.h"
#if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE)
@@ -3499,12 +3503,21 @@ shell_execve (command, args, env)
internal_error ("%s: is a directory", command);
else
{
+#if defined (HAVE_HASH_BANG_EXEC) || defined (HAVE_ELF_H)
+ int fd = open (command, O_RDONLY);
+
+ if (fd >= 0)
+ sample_len = read (fd, sample, sizeof (sample));
+ else
+ sample_len = -1;
+#endif
+
#if defined (HAVE_HASH_BANG_EXEC)
- READ_SAMPLE_BUF (command, sample, sample_len);
if (sample_len > 2 && sample[0] == '#' && sample[1] == '!')
{
char *interp;
+ close (fd);
interp = getinterp (sample, sample_len, (int *)NULL);
errno = i;
sys_error ("%s: %s: bad interpreter", command, interp ? interp : "");
@@ -3512,6 +3525,136 @@ shell_execve (command, args, env)
return (EX_NOEXEC);
}
#endif
+#if defined (HAVE_ELF_H)
+ if (i == ENOENT
+ && sample_len > EI_NIDENT
+ && memcmp (sample, ELFMAG, SELFMAG) == 0)
+ {
+ off_t offset = -1;
+
+ /* It is an ELF file. Now determine whether it is dynamically
+ linked and if yes, get the offset of the interpreter
+ string. */
+ if (sample[EI_CLASS] == ELFCLASS32
+ && sample_len > sizeof (Elf32_Ehdr))
+ {
+ Elf32_Ehdr ehdr;
+ Elf32_Phdr *phdr;
+ int nphdr;
+
+ /* We have to copy the data since the sample buffer
+ might not be aligned correctly to be accessed as
+ an Elf32_Ehdr struct. */
+ memcpy (&ehdr, sample, sizeof (Elf32_Ehdr));
+
+ nphdr = ehdr.e_phnum;
+ phdr = (Elf32_Phdr *) malloc (nphdr * ehdr.e_phentsize);
+ if (phdr != NULL)
+ {
+#ifdef HAVE_PREAD
+ sample_len = pread (fd, phdr, nphdr * ehdr.e_phentsize,
+ ehdr.e_phoff);
+#else
+ if (lseek (fd, ehdr.e_phoff, SEEK_SET) != -1)
+ sample_len = read (fd, phdr,
+ nphdr * ehdr.e_phentsize);
+ else
+ sample_len = -1;
+#endif
+ if (sample_len == nphdr * ehdr.e_phentsize)
+ while (nphdr-- > 0)
+ if (phdr[nphdr].p_type == PT_INTERP)
+ {
+ offset = phdr[nphdr].p_offset;
+ break;
+ }
+ free (phdr);
+ }
+ }
+ else if (sample[EI_CLASS] == ELFCLASS64
+ && sample_len > sizeof (Elf64_Ehdr))
+ {
+ Elf64_Ehdr ehdr;
+ Elf64_Phdr *phdr;
+ int nphdr;
+
+ /* We have to copy the data since the sample buffer
+ might not be aligned correctly to be accessed as
+ an Elf64_Ehdr struct. */
+ memcpy (&ehdr, sample, sizeof (Elf64_Ehdr));
+
+ nphdr = ehdr.e_phnum;
+ phdr = (Elf64_Phdr *) malloc (nphdr * ehdr.e_phentsize);
+ if (phdr != NULL)
+ {
+#ifdef HAVE_PREAD
+ sample_len = pread (fd, phdr, nphdr * ehdr.e_phentsize,
+ ehdr.e_phoff);
+#else
+ if (lseek (fd, ehdr.e_phoff, SEEK_SET) != -1)
+ sample_len = read (fd, phdr,
+ nphdr * ehdr.e_phentsize);
+ else
+ sample_len = -1;
+#endif
+ if (sample_len == nphdr * ehdr.e_phentsize)
+ while (nphdr-- > 0)
+ if (phdr[nphdr].p_type == PT_INTERP)
+ {
+ offset = phdr[nphdr].p_offset;
+ break;
+ }
+ free (phdr);
+ }
+ }
+
+ if (offset != -1)
+ {
+ size_t maxlen = 0;
+ size_t actlen = 0;
+ char *interp = NULL;
+
+ do
+ {
+ if (actlen == maxlen)
+ {
+ char *newinterp = realloc (interp, maxlen += 200);
+ if (newinterp == NULL)
+ {
+ actlen = 0;
+ break;
+ }
+ interp = newinterp;
+
+#ifdef HAVE_PREAD
+ actlen = pread (fd, interp, maxlen, offset);
+#else
+ if (lseek (fd, offset, SEEK_SET) != -1)
+ actlen = read (fd, interp, maxlen);
+ else
+ actlen = -1;
+#endif
+ }
+ }
+ while (actlen > 0 && memchr (interp, '\0', actlen) == NULL);
+
+ if (actlen > 0)
+ {
+ close (fd);
+ errno = i;
+ sys_error ("%s: %s: bad ELF interpreter", command,
+ interp);
+ free (interp);
+ return (EX_NOEXEC);
+ }
+
+ free (interp);
+ }
+ }
+#endif
+#if defined (HAVE_HASH_BANG_EXEC) || defined (HAVE_ELF_H)
+ close (fd);
+#endif
errno = i;
file_error (command);
}

158
bash.spec
View File

@ -1,7 +1,7 @@
Version: 2.05 Version: 2.05a
Name: bash Name: bash
Summary: The GNU Bourne Again shell (bash) version %{version}. Summary: The GNU Bourne Again shell (bash) version %{version}.
Release: 8 Release: 12
Group: System Environment/Shells Group: System Environment/Shells
License: GPL License: GPL
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{version}.tar.bz2 Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{version}.tar.bz2
@ -9,32 +9,26 @@ Source2: ftp://ftp.gnu.org/gnu/bash/bash-doc-%{version}.tar.bz2
Source3: dot-bashrc Source3: dot-bashrc
Source4: dot-bash_profile Source4: dot-bash_profile
Source5: dot-bash_logout Source5: dot-bash_logout
# FIXME: Source6 and 7 MUST be removed at the next base version Source6: http://www.caliban.org/files/bash/bash-completion-20020220.tar.gz
# update! They're fixing a bug in the current version.
Source6: y.tab.c
Source7: y.tab.h
Patch0: bash-2.03-paths.patch Patch0: bash-2.03-paths.patch
Patch1: bash-2.02-security.patch Patch1: bash-2.02-security.patch
Patch2: bash-2.04-arm.patch Patch2: bash-2.04-arm.patch
Patch3: bash-2.03-profile.patch Patch3: bash-2.03-profile.patch
Patch4: bash-2.05-readlinefixes.patch Patch4: bash-2.05-readlinefixes.patch
Patch5: bash-2.04-requires.patch Patch5: bash-2.05a-requires.patch
Patch6: bash-2.04-compat.patch Patch6: bash-2.04-compat.patch
Patch7: bash-2.04-shellfunc.patch Patch7: bash-2.05a-shellfunc.patch
Patch8: bash-2.05-ia64.patch Patch8: bash-2.05-ia64.patch
Patch9: bash-2.05-s390x-unwind.patch Patch9: bash-2.05a-mailcheck.patch
Patch10: bash-2.05-ipv6-20010418.patch Patch10: bash-2.05a-service_completion.patch
Patch51: ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-001 Patch11: bash-2.05a-loadables.patch
Patch52: ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-002 Patch12: bash-2.05a-interpreter.patch
Patch53: ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-003 Patch13: bash-2.05a-killbuiltin.patch
Patch54: ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-004
Patch55: ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-005
Patch56: ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-006
Prefix: %{_prefix} Prefix: %{_prefix}
Requires: mktemp Requires: mktemp
Provides: bash2 Provides: bash2
Obsoletes: bash2 etcskel Obsoletes: bash2 etcskel
BuildRoot: /var/tmp/%{name}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
The GNU Bourne Again shell (Bash) is a shell or command language The GNU Bourne Again shell (Bash) is a shell or command language
@ -60,9 +54,7 @@ The bash-doc package contains documentation for the GNU Bourne
Again shell version %{version}. Again shell version %{version}.
%prep %prep
%setup -q -a 2 %setup -q -a 2 -a 6
cp %{SOURCE6} .
cp %{SOURCE7} .
%patch0 -p1 -b .paths %patch0 -p1 -b .paths
%patch1 -p1 -b .security %patch1 -p1 -b .security
%patch2 -p1 -b .arm %patch2 -p1 -b .arm
@ -72,16 +64,11 @@ cp %{SOURCE7} .
%patch6 -p1 -b .compat %patch6 -p1 -b .compat
%patch7 -p1 -b .shellfunc %patch7 -p1 -b .shellfunc
%patch8 -p1 -b .ia64 %patch8 -p1 -b .ia64
%ifarch s390x %patch9 -p1 -b .mailcheck
%patch9 -p1 -b .s390x %patch10 -p1 -b .servicecomp
%endif %patch11 -p1 -b .loadables
%patch10 -p1 -b .ipv6 %patch12 -p1 -b .interpreter
%patch51 -p0 -b .pl1 %patch13 -p1 -b .killbuiltin
%patch52 -p0 -b .pl2
%patch53 -p0 -b .pl3
%patch54 -p0 -b .pl4
%patch55 -p0 -b .pl5
%patch56 -p0 -b .pl6
echo %{version} > _distribution echo %{version} > _distribution
echo %{release} > _patchlevel echo %{release} > _patchlevel
@ -89,14 +76,29 @@ echo %{release} > _patchlevel
#CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \ #CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \
# ./configure --prefix=$RPM_BUILD_ROOT/usr $RPM_ARCH-redhat-linux # ./configure --prefix=$RPM_BUILD_ROOT/usr $RPM_ARCH-redhat-linux
autoreconf if ! autoconf; then
%configure # Yuck. We're using autoconf 2.1x.
ln -s /bin/true autoconf
export PATH=.:$PATH
fi
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --with-afs
make
cd examples/loadables
make make
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
if [ -e autoconf ]; then
# Yuck. We're using autoconf 2.1x.
export PATH=.:$PATH
fi
%makeinstall %makeinstall
mkdir -p $RPM_BUILD_ROOT/etc
# make manpages for bash builtins as per suggestion in DOC/README # make manpages for bash builtins as per suggestion in DOC/README
cd doc cd doc
sed -e ' sed -e '
@ -118,15 +120,10 @@ install -c -m 644 builtins.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/builtins.1
for i in `cat man.pages` ; do for i in `cat man.pages` ; do
echo .so man1/builtins.1 > ${RPM_BUILD_ROOT}%{_mandir}/man1/$i.1 echo .so man1/builtins.1 > ${RPM_BUILD_ROOT}%{_mandir}/man1/$i.1
chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man1/$i.1
done done
# Not for printf (conflict with coreutils)
# now turn man.pages into a filelist for the man subpackage rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/printf.1
cat man.pages | tr -s ' ' '\n' | sed '
1i\
%defattr(0644,root,root,0755)
s:^:%{_mandir}/man1/:
s/$/.1*/
' > ../man.pages
{ cd $RPM_BUILD_ROOT { cd $RPM_BUILD_ROOT
mkdir ./bin mkdir ./bin
@ -137,14 +134,24 @@ s/$/.1*/
gzip -9nf .%{_infodir}/bash.info gzip -9nf .%{_infodir}/bash.info
rm -f .%{_infodir}/dir rm -f .%{_infodir}/dir
} }
mkdir -p $RPM_BUILD_ROOT/etc/skel mkdir -p $RPM_BUILD_ROOT/etc/skel $RPM_BUILD_ROOT/etc/profile.d
install -c -m644 $RPM_SOURCE_DIR/dot-bashrc $RPM_BUILD_ROOT/etc/skel/.bashrc install -c -m644 $RPM_SOURCE_DIR/dot-bashrc $RPM_BUILD_ROOT/etc/skel/.bashrc
install -c -m644 $RPM_SOURCE_DIR/dot-bash_profile \ install -c -m644 $RPM_SOURCE_DIR/dot-bash_profile \
$RPM_BUILD_ROOT/etc/skel/.bash_profile $RPM_BUILD_ROOT/etc/skel/.bash_profile
install -c -m644 $RPM_SOURCE_DIR/dot-bash_logout \ install -c -m644 $RPM_SOURCE_DIR/dot-bash_logout \
$RPM_BUILD_ROOT/etc/skel/.bash_logout $RPM_BUILD_ROOT/etc/skel/.bash_logout
cat >>$RPM_BUILD_ROOT/etc/profile.d/bashopts.sh <<EOF
# Edit bash settings
if echo \$SHELL |grep -q bash; then
if [ -z "\$NO_BASH_SETTINGS" ]; then
export CDPATH=.:~:/:/usr/src/redhat
shopt -s cdspell
fi
fi
EOF
mkdir -p $RPM_BUILD_ROOT%{_libdir}/bash
find examples/loadables -type f -perm +0111 | \
xargs -i cp -pf {} $RPM_BUILD_ROOT%{_libdir}/bash
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -189,28 +196,77 @@ if [ "$1" = 0 ]; then
mv /etc/shells.new /etc/shells mv /etc/shells.new /etc/shells
fi fi
%files -f man.pages %files
%defattr(-,root,root) %defattr(-,root,root)
%doc CHANGES COMPAT NEWS NOTES CWRU/POSIX.NOTES %doc CHANGES COMPAT NEWS NOTES CWRU/POSIX.NOTES
%doc doc/FAQ doc/INTRO doc/article.ms %doc doc/FAQ doc/INTRO doc/article.ms
%doc examples/bashdb/ examples/functions/ examples/misc/ %doc -P examples/bashdb/ examples/functions/ examples/misc/
%doc examples/scripts.noah/ examples/scripts.v2/ examples/scripts/ %doc -P examples/scripts.noah/ examples/scripts.v2/ examples/scripts/
%doc examples/startup-files/ %doc -P examples/startup-files/ examples/complete/ examples/loadables/
%config(noreplace) /etc/skel/.b* %config(noreplace) /etc/skel/.b*
/bin/sh /bin/sh
/bin/bash /bin/bash
/bin/bash2 /bin/bash2
%{_infodir}/bash.info* %{_libdir}/bash
%{_mandir}/man1/bash.1*
%{_mandir}/man1/builtins.1*
%{_prefix}/bin/bashbug %{_prefix}/bin/bashbug
%{_mandir}/man1/bashbug.1* %{_infodir}/bash.info*
%{_mandir}/*/*
%files doc %files doc
%defattr(-,root,root) %defattr(-,root,root)
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog %changelog
* Fri Apr 5 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-12
- Fix the fix for #62418
* Thu Apr 4 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-11
- Fix kill builtin (#62418)
* Mon Mar 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.0.5a-10
- Get rid of completion subpackage
- Use %%{_tmppath}
* Mon Mar 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-9
- Add patch from Ulrich Drepper to get better error messages when trying
to launch an application with a bad ELF interpreter (e.g. libc5 ld.so)
(#60870)
* Fri Feb 22 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-8
- Update completion
* Wed Jan 30 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-7
- Update completion stuff and move it to a separate package
* Sat Jan 26 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-6
- Add patches from Ian Macdonald <ian@caliban.org>
* Wed Jan 23 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-5
- Add programmable completion (optional)
* Thu Jan 17 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-4
- Fix mailcheck (#57792)
* Tue Jan 15 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-3
- Fix autoconf mess
- Build --with-afs, some users may be using it
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Thu Nov 22 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-2
- Fix conflict with sh-utils (printf builtin manpage vs. printf binary manpage)
(#56590)
* Tue Nov 20 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.05a-1
- 2.05a
* Wed Oct 10 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- disable s390x fix, not needed anymore
* Mon Oct 1 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.05-9
- Add patch from readline 4.2-3 to bash's internal libreadline
* Mon Jul 9 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.05-8 * Mon Jul 9 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.05-8
- Merge Pekka Savola's patch (RFE#47762) - Merge Pekka Savola's patch (RFE#47762)

View File

@ -1,2 +1,3 @@
2d2e4b9a20ea673ee00925dfa5c31d24 bash-2.05.tar.bz2 c29b50db808003e39558a0f6354f4cad bash-2.05a.tar.bz2
6be0a817ada25a0552cb17975acad0f7 bash-doc-2.05.tar.bz2 1fb7158868b3d0486fc4611a838c2662 bash-completion-20020220.tar.gz
33d9704a812dd43c2e9fad44d74dc569 bash-doc-2.05a.tar.bz2