Accepting request 147710 from Base:System
- Avoid autoconf on older products - Apply audit patch variant to readline as well as we use a shared libreadline - Avoid bash-devel on older products as older GNU make do not have a realpath builtin - Do not trigger the export of COLUMNS or LINES due enforced checkwinsize (bnc#793536) - Update bash 4.2 to patch level 42 * Missing I/O errors if output redirection applied to builtin commands when the file descriptor was closed * Process substitution incorrectly inherited a flag that inhibited using the temporary environment for variable lookups if it was providing the filename to a redirection. * Compilation failed after specifying the `minimal config' option OBS-URL: https://build.opensuse.org/request/show/147710 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=104
This commit is contained in:
commit
cc0b386ade
99
audit-rl-patch
Normal file
99
audit-rl-patch
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
--- readline-6.2/config.h.in
|
||||||
|
+++ readline-6.2/config.h.in 2013-01-09 09:31:06.833952652 +0000
|
||||||
|
@@ -251,6 +251,9 @@
|
||||||
|
|
||||||
|
#undef CTYPE_NON_ASCII
|
||||||
|
|
||||||
|
+/* Define if you have <linux/audit.h> and it defines AUDIT_USER_TTY */
|
||||||
|
+#undef HAVE_DECL_AUDIT_USER_TTY
|
||||||
|
+
|
||||||
|
/* modify settings or make new ones based on what autoconf tells us. */
|
||||||
|
|
||||||
|
/* Ultrix botches type-ahead when switching from canonical to
|
||||||
|
--- readline-6.2/configure.in
|
||||||
|
+++ readline-6.2/configure.in 2013-01-09 09:33:09.125452625 +0000
|
||||||
|
@@ -159,6 +159,8 @@ AC_CHECK_HEADERS(sys/ptem.h,,,
|
||||||
|
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
|
+AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include <linux/audit.h>]])
|
||||||
|
+
|
||||||
|
BASH_SYS_SIGNAL_VINTAGE
|
||||||
|
BASH_SYS_REINSTALL_SIGHANDLERS
|
||||||
|
|
||||||
|
--- readline-6.2/readline.c
|
||||||
|
+++ readline-6.2/readline.c 2009-01-21 16:40:12.000000000 +0000
|
||||||
|
@@ -55,6 +55,12 @@
|
||||||
|
extern int errno;
|
||||||
|
#endif /* !errno */
|
||||||
|
|
||||||
|
+#if defined (HAVE_DECL_AUDIT_USER_TTY)
|
||||||
|
+# include <sys/socket.h>
|
||||||
|
+# include <linux/audit.h>
|
||||||
|
+# include <linux/netlink.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* System-specific feature definitions and include files. */
|
||||||
|
#include "rldefs.h"
|
||||||
|
#include "rlmbutil.h"
|
||||||
|
@@ -297,7 +303,47 @@ rl_set_prompt (prompt)
|
||||||
|
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+#if defined (HAVE_DECL_AUDIT_USER_TTY)
|
||||||
|
+/* Report STRING to the audit system. */
|
||||||
|
+static void
|
||||||
|
+audit_tty (char *string)
|
||||||
|
+{
|
||||||
|
+ struct sockaddr_nl addr;
|
||||||
|
+ struct msghdr msg;
|
||||||
|
+ struct nlmsghdr nlm;
|
||||||
|
+ struct iovec iov[2];
|
||||||
|
+ size_t size;
|
||||||
|
+ int fd;
|
||||||
|
+
|
||||||
|
+ size = strlen (string) + 1;
|
||||||
|
+ fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_AUDIT);
|
||||||
|
+ if (fd < 0)
|
||||||
|
+ return;
|
||||||
|
+ nlm.nlmsg_len = NLMSG_LENGTH (size);
|
||||||
|
+ nlm.nlmsg_type = AUDIT_USER_TTY;
|
||||||
|
+ nlm.nlmsg_flags = NLM_F_REQUEST;
|
||||||
|
+ nlm.nlmsg_seq = 0;
|
||||||
|
+ nlm.nlmsg_pid = 0;
|
||||||
|
+ iov[0].iov_base = &nlm;
|
||||||
|
+ iov[0].iov_len = sizeof (nlm);
|
||||||
|
+ iov[1].iov_base = string;
|
||||||
|
+ iov[1].iov_len = size;
|
||||||
|
+ addr.nl_family = AF_NETLINK;
|
||||||
|
+ addr.nl_pid = 0;
|
||||||
|
+ addr.nl_groups = 0;
|
||||||
|
+ msg.msg_name = &addr;
|
||||||
|
+ msg.msg_namelen = sizeof (addr);
|
||||||
|
+ msg.msg_iov = iov;
|
||||||
|
+ msg.msg_iovlen = 2;
|
||||||
|
+ msg.msg_control = NULL;
|
||||||
|
+ msg.msg_controllen = 0;
|
||||||
|
+ msg.msg_flags = 0;
|
||||||
|
+ (void)sendmsg (fd, &msg, 0);
|
||||||
|
+ close (fd);
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Read a line of input. Prompt with PROMPT. An empty PROMPT means
|
||||||
|
none. A return value of NULL means that EOF was encountered. */
|
||||||
|
char *
|
||||||
|
@@ -348,6 +394,11 @@ readline (prompt)
|
||||||
|
RL_SETSTATE (RL_STATE_CALLBACK);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if defined (HAVE_DECL_AUDIT_USER_TTY)
|
||||||
|
+ if (value != NULL)
|
||||||
|
+ audit_tty (value);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
return (value);
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:e2cc87f25782c7d7eb5e24bdea053a4c063b0d3f296b2142862b6ca9100d6415
|
oid sha256:251f7aa87048b2ad274e6006e234a1d6270bc074cc779308c2117dcf17f73723
|
||||||
size 24539
|
size 25471
|
||||||
|
@ -73,15 +73,6 @@
|
|||||||
|
|
||||||
/* The pipeline currently being built. */
|
/* The pipeline currently being built. */
|
||||||
PROCESS *the_pipeline = (PROCESS *)NULL;
|
PROCESS *the_pipeline = (PROCESS *)NULL;
|
||||||
@@ -215,7 +215,7 @@ int already_making_children = 0;
|
|
||||||
|
|
||||||
/* If this is non-zero, $LINES and $COLUMNS are reset after every process
|
|
||||||
exits from get_tty_state(). */
|
|
||||||
-int check_window_size;
|
|
||||||
+int check_window_size = 1;
|
|
||||||
|
|
||||||
/* Functions local to this file. */
|
|
||||||
|
|
||||||
--- jobs.h
|
--- jobs.h
|
||||||
+++ jobs.h 2006-03-27 12:15:25.000000000 +0000
|
+++ jobs.h 2006-03-27 12:15:25.000000000 +0000
|
||||||
@@ -165,7 +165,7 @@ extern pid_t fork (), getpid (), getpgrp
|
@@ -165,7 +165,7 @@ extern pid_t fork (), getpid (), getpgrp
|
||||||
|
26
bash.changes
26
bash.changes
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 9 08:55:09 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Avoid autoconf on older products
|
||||||
|
- Apply audit patch variant to readline as well as we use a shared
|
||||||
|
libreadline
|
||||||
|
- Avoid bash-devel on older products as older GNU make do not have
|
||||||
|
a realpath builtin
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 8 17:43:01 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Do not trigger the export of COLUMNS or LINES due enforced
|
||||||
|
checkwinsize (bnc#793536)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 8 14:57:17 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Update bash 4.2 to patch level 42
|
||||||
|
* Missing I/O errors if output redirection applied to builtin
|
||||||
|
commands when the file descriptor was closed
|
||||||
|
* Process substitution incorrectly inherited a flag that
|
||||||
|
inhibited using the temporary environment for variable lookups
|
||||||
|
if it was providing the filename to a redirection.
|
||||||
|
* Compilation failed after specifying the `minimal config' option
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 5 12:41:57 UTC 2012 - werner@suse.de
|
Mon Nov 5 12:41:57 UTC 2012 - werner@suse.de
|
||||||
|
|
||||||
|
22
bash.spec
22
bash.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package bash
|
# spec file for package bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -88,6 +88,7 @@ Patch27: readline-6.2-xmalloc.dif
|
|||||||
Patch30: readline-6.2-destdir.patch
|
Patch30: readline-6.2-destdir.patch
|
||||||
Patch40: bash-4.1-bash.bashrc.dif
|
Patch40: bash-4.1-bash.bashrc.dif
|
||||||
Patch42: audit-patch
|
Patch42: audit-patch
|
||||||
|
Patch43: audit-rl-patch
|
||||||
Patch46: man2html-no-timestamp.patch
|
Patch46: man2html-no-timestamp.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%global _sysconfdir /etc
|
%global _sysconfdir /etc
|
||||||
@ -132,6 +133,7 @@ Requires: bash = %{version}
|
|||||||
Provides translations to the package bash
|
Provides translations to the package bash
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%suse_version >= 1100
|
||||||
%package -n bash-devel
|
%package -n bash-devel
|
||||||
Summary: Include Files mandatory for Development of bash loadable builtins
|
Summary: Include Files mandatory for Development of bash loadable builtins
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
@ -142,6 +144,7 @@ Release: 0
|
|||||||
This package contains the C header files for writing loadable new
|
This package contains the C header files for writing loadable new
|
||||||
builtins for the interpreter Bash. Use -I /usr/include/bash/<version>
|
builtins for the interpreter Bash. Use -I /usr/include/bash/<version>
|
||||||
on the compilers command line.
|
on the compilers command line.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n bash-loadables
|
%package -n bash-loadables
|
||||||
Summary: Loadable bash builtins
|
Summary: Loadable bash builtins
|
||||||
@ -209,7 +212,7 @@ Group: System/Libraries
|
|||||||
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
|
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
|
||||||
Version: 6.2
|
Version: 6.2
|
||||||
Release: 0
|
Release: 0
|
||||||
%if %suse_version > 1020
|
%if 0%suse_version > 1020
|
||||||
Recommends: readline-doc = %{version}
|
Recommends: readline-doc = %{version}
|
||||||
%endif
|
%endif
|
||||||
# bug437293
|
# bug437293
|
||||||
@ -233,7 +236,7 @@ Version: 6.2
|
|||||||
Release: 0
|
Release: 0
|
||||||
Requires: libreadline6 = %{version}
|
Requires: libreadline6 = %{version}
|
||||||
Requires: ncurses-devel
|
Requires: ncurses-devel
|
||||||
%if %suse_version > 1020
|
%if 0%suse_version > 1020
|
||||||
Recommends: readline-doc = %{version}
|
Recommends: readline-doc = %{version}
|
||||||
%endif
|
%endif
|
||||||
# bug437293
|
# bug437293
|
||||||
@ -253,7 +256,7 @@ Provides: readline:%{_infodir}/readline.info.gz
|
|||||||
PreReq: %install_info_prereq
|
PreReq: %install_info_prereq
|
||||||
Version: 6.2
|
Version: 6.2
|
||||||
Release: 0
|
Release: 0
|
||||||
%if %suse_version > 1120
|
%if 0%suse_version > 1120
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -295,7 +298,9 @@ unset p
|
|||||||
#%patch25 -p0 -b .endpw
|
#%patch25 -p0 -b .endpw
|
||||||
%patch26 -p0 -b .msgdy
|
%patch26 -p0 -b .msgdy
|
||||||
%patch40 -p0 -b .bashrc
|
%patch40 -p0 -b .bashrc
|
||||||
|
%if 0%suse_version >= 1100
|
||||||
%patch42 -p1 -b .audit
|
%patch42 -p1 -b .audit
|
||||||
|
%endif
|
||||||
%patch46 -p0 -b .notimestamp
|
%patch46 -p0 -b .notimestamp
|
||||||
%patch0 -p0 -b .0
|
%patch0 -p0 -b .0
|
||||||
pushd ../readline-%{rl_vers}%{extend}
|
pushd ../readline-%{rl_vers}%{extend}
|
||||||
@ -312,6 +317,9 @@ done
|
|||||||
%patch26 -p2 -b .msgdy
|
%patch26 -p2 -b .msgdy
|
||||||
%patch27 -p0 -b .xm
|
%patch27 -p0 -b .xm
|
||||||
%patch30 -p0 -b .destdir
|
%patch30 -p0 -b .destdir
|
||||||
|
%if 0%suse_version >= 1100
|
||||||
|
%patch43 -p1 -b .audit
|
||||||
|
%endif
|
||||||
%patch20 -p0 -b .0
|
%patch20 -p0 -b .0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -323,7 +331,9 @@ done
|
|||||||
MACHTYPE=${CPU}-suse-linux
|
MACHTYPE=${CPU}-suse-linux
|
||||||
export LANG LC_ALL HOSTTYPE MACHTYPE
|
export LANG LC_ALL HOSTTYPE MACHTYPE
|
||||||
pushd ../readline-%{rl_vers}%{extend}
|
pushd ../readline-%{rl_vers}%{extend}
|
||||||
|
%if 0%suse_version >= 1100
|
||||||
autoconf
|
autoconf
|
||||||
|
%endif
|
||||||
cflags ()
|
cflags ()
|
||||||
{
|
{
|
||||||
local flag=$1; shift
|
local flag=$1; shift
|
||||||
@ -422,7 +432,9 @@ popd
|
|||||||
CC_FOR_BUILD="$CC"
|
CC_FOR_BUILD="$CC"
|
||||||
CFLAGS_FOR_BUILD="$CFLAGS"
|
CFLAGS_FOR_BUILD="$CFLAGS"
|
||||||
export CC_FOR_BUILD CFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
|
export CC_FOR_BUILD CFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
|
||||||
|
%if 0%suse_version >= 1100
|
||||||
autoconf
|
autoconf
|
||||||
|
%endif
|
||||||
#
|
#
|
||||||
# We have a malloc with our glibc
|
# We have a malloc with our glibc
|
||||||
#
|
#
|
||||||
@ -623,6 +635,7 @@ ldd -u -r %{buildroot}/%{_lib}/libreadline.so.* || true
|
|||||||
%doc %{_mandir}/man1/rbash.1.gz
|
%doc %{_mandir}/man1/rbash.1.gz
|
||||||
%doc %{_defaultdocdir}/bash/
|
%doc %{_defaultdocdir}/bash/
|
||||||
|
|
||||||
|
%if 0%suse_version >= 1100
|
||||||
%files -n bash-devel
|
%files -n bash-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir /%{_includedir}/bash/
|
%dir /%{_includedir}/bash/
|
||||||
@ -630,6 +643,7 @@ ldd -u -r %{buildroot}/%{_lib}/libreadline.so.* || true
|
|||||||
%dir /%{_includedir}/bash/%{bash_vers}/builtins/
|
%dir /%{_includedir}/bash/%{bash_vers}/builtins/
|
||||||
/%{_incdir}/bash/%{bash_vers}/*.h
|
/%{_incdir}/bash/%{bash_vers}/*.h
|
||||||
/%{_incdir}/bash/%{bash_vers}/builtins/*.h
|
/%{_incdir}/bash/%{bash_vers}/builtins/*.h
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n bash-loadables
|
%files -n bash-loadables
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user