automatic version update by autodist [release 4.3.011-1mamba;Thu Apr 24 2014]
This commit is contained in:
parent
9e34316491
commit
58647271c5
14
README.md
14
README.md
@ -1,2 +1,16 @@
|
|||||||
# bash
|
# bash
|
||||||
|
|
||||||
|
Bash (Bourne Again shell) is the shell, or command language interpreter, that will appear in the GNU operating system.
|
||||||
|
Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh).
|
||||||
|
It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.
|
||||||
|
It offers functional improvements over sh for both programming and interactive use.
|
||||||
|
In addition, most sh scripts can be run by Bash without modification.
|
||||||
|
|
||||||
|
The improvements offered by BASH include:
|
||||||
|
* Command line editing
|
||||||
|
* Unlimited size command history
|
||||||
|
* Job Control
|
||||||
|
* Shell Functions and Aliases
|
||||||
|
* Indexed arrays of unlimited size
|
||||||
|
* Integer arithmetic in any base from two to sixty-four
|
||||||
|
|
||||||
|
17
bash-2.0.5-cross-compile-config.cache
Normal file
17
bash-2.0.5-cross-compile-config.cache
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
ac_cv_c_bigendian=yes
|
||||||
|
ac_cv_c_char_unsigned=no
|
||||||
|
ac_cv_sizeof_long_long=8
|
||||||
|
ac_cv_sizeof_long=4
|
||||||
|
ac_cv_sizeof_int=4
|
||||||
|
ac_cv_sizeof_short=2
|
||||||
|
ac_cv_sizeof_unsigned_long=4
|
||||||
|
ac_cv_sizeof_unsigned_int=4
|
||||||
|
ac_cv_func_setvbuf_reversed=yes
|
||||||
|
bash_cv_have_mbstate_t=yes
|
||||||
|
bash_cv_func_sigsetjmp=present
|
||||||
|
bash_cv_job_control_missing=present
|
||||||
|
bash_cv_sys_named_pipes=present
|
||||||
|
bash_cv_sys_siglist=yes
|
||||||
|
bash_cv_ulimit_maxfds=yes
|
||||||
|
bash_cv_under_sys_siglist=yes
|
||||||
|
bash_cv_type_rlimit=long
|
310
bash-4.1-bash-requires.patch
Normal file
310
bash-4.1-bash-requires.patch
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
diff -up bash-4.1-rc1/builtins.h.requires bash-4.1-rc1/builtins.h
|
||||||
|
--- bash-4.1-rc1/builtins.h.requires 2009-01-04 20:32:23.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/builtins.h 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -41,6 +41,8 @@
|
||||||
|
#define SPECIAL_BUILTIN 0x08 /* This is a Posix `special' builtin. */
|
||||||
|
#define ASSIGNMENT_BUILTIN 0x10 /* This builtin takes assignment statements. */
|
||||||
|
#define POSIX_BUILTIN 0x20 /* This builtins is special in the Posix command search order. */
|
||||||
|
+#define REQUIRES_BUILTIN 0x40 /* This builtin requires other files. */
|
||||||
|
+
|
||||||
|
|
||||||
|
#define BASE_INDENT 4
|
||||||
|
|
||||||
|
diff -up bash-4.1-rc1/builtins/mkbuiltins.c.requires bash-4.1-rc1/builtins/mkbuiltins.c
|
||||||
|
--- bash-4.1-rc1/builtins/mkbuiltins.c.requires 2009-01-04 20:32:23.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/builtins/mkbuiltins.c 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -69,9 +69,15 @@ extern char *strcpy ();
|
||||||
|
#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
|
||||||
|
|
||||||
|
/* Flag values that builtins can have. */
|
||||||
|
+/* These flags are for the C code generator,
|
||||||
|
+ the C which is produced (./builtin.c)
|
||||||
|
+ includes the flags definitions found
|
||||||
|
+ in ../builtins.h */
|
||||||
|
#define BUILTIN_FLAG_SPECIAL 0x01
|
||||||
|
#define BUILTIN_FLAG_ASSIGNMENT 0x02
|
||||||
|
#define BUILTIN_FLAG_POSIX_BUILTIN 0x04
|
||||||
|
+#define BUILTIN_FLAG_REQUIRES 0x08
|
||||||
|
+
|
||||||
|
|
||||||
|
#define BASE_INDENT 4
|
||||||
|
|
||||||
|
@@ -163,10 +169,18 @@ char *posix_builtins[] =
|
||||||
|
(char *)NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
+/* The builtin commands that cause requirements on other files. */
|
||||||
|
+static char *requires_builtins[] =
|
||||||
|
+{
|
||||||
|
+ ".", "command", "exec", "source", "inlib",
|
||||||
|
+ (char *)NULL
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
/* Forward declarations. */
|
||||||
|
static int is_special_builtin ();
|
||||||
|
static int is_assignment_builtin ();
|
||||||
|
static int is_posix_builtin ();
|
||||||
|
+static int is_requires_builtin ();
|
||||||
|
|
||||||
|
#if !defined (HAVE_RENAME)
|
||||||
|
static int rename ();
|
||||||
|
@@ -812,6 +826,9 @@ builtin_handler (self, defs, arg)
|
||||||
|
new->flags |= BUILTIN_FLAG_ASSIGNMENT;
|
||||||
|
if (is_posix_builtin (name))
|
||||||
|
new->flags |= BUILTIN_FLAG_POSIX_BUILTIN;
|
||||||
|
+ if (is_requires_builtin (name))
|
||||||
|
+ new->flags |= BUILTIN_FLAG_REQUIRES;
|
||||||
|
+
|
||||||
|
|
||||||
|
array_add ((char *)new, defs->builtins);
|
||||||
|
building_builtin = 1;
|
||||||
|
@@ -1229,11 +1246,12 @@ write_builtins (defs, structfile, extern
|
||||||
|
else
|
||||||
|
fprintf (structfile, "(sh_builtin_func_t *)0x0, ");
|
||||||
|
|
||||||
|
- fprintf (structfile, "%s%s%s%s, %s_doc,\n",
|
||||||
|
+ fprintf (structfile, "%s%s%s%s%s, %s_doc,\n",
|
||||||
|
"BUILTIN_ENABLED | STATIC_BUILTIN",
|
||||||
|
(builtin->flags & BUILTIN_FLAG_SPECIAL) ? " | SPECIAL_BUILTIN" : "",
|
||||||
|
(builtin->flags & BUILTIN_FLAG_ASSIGNMENT) ? " | ASSIGNMENT_BUILTIN" : "",
|
||||||
|
(builtin->flags & BUILTIN_FLAG_POSIX_BUILTIN) ? " | POSIX_BUILTIN" : "",
|
||||||
|
+ (builtin->flags & BUILTIN_FLAG_REQUIRES) ? " | REQUIRES_BUILTIN" : "",
|
||||||
|
document_name (builtin));
|
||||||
|
|
||||||
|
fprintf
|
||||||
|
@@ -1581,6 +1599,13 @@ is_posix_builtin (name)
|
||||||
|
return (_find_in_table (name, posix_builtins));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int
|
||||||
|
+is_requires_builtin (name)
|
||||||
|
+ char *name;
|
||||||
|
+{
|
||||||
|
+ return (_find_in_table (name, requires_builtins));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#if !defined (HAVE_RENAME)
|
||||||
|
static int
|
||||||
|
rename (from, to)
|
||||||
|
diff -up bash-4.1-rc1/doc/bash.1.requires bash-4.1-rc1/doc/bash.1
|
||||||
|
--- bash-4.1-rc1/doc/bash.1.requires 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/doc/bash.1 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -231,6 +231,13 @@ The shell becomes restricted (see
|
||||||
|
.B "RESTRICTED SHELL"
|
||||||
|
below).
|
||||||
|
.TP
|
||||||
|
+.B \-\-rpm-requires
|
||||||
|
+Produce the list of files that are required for the
|
||||||
|
+shell script to run. This implies '-n' and is subject
|
||||||
|
+to the same limitations as compile time error checking checking;
|
||||||
|
+Backticks, [] tests, and evals are not parsed so some
|
||||||
|
+dependencies may be missed.
|
||||||
|
+.TP
|
||||||
|
.B \-\-verbose
|
||||||
|
Equivalent to \fB\-v\fP.
|
||||||
|
.TP
|
||||||
|
diff -up bash-4.1-rc1/doc/bashref.texi.requires bash-4.1-rc1/doc/bashref.texi
|
||||||
|
--- bash-4.1-rc1/doc/bashref.texi.requires 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/doc/bashref.texi 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -5337,6 +5337,13 @@ standard. @xref{Bash POSIX Mode}, for a
|
||||||
|
@item --restricted
|
||||||
|
Make the shell a restricted shell (@pxref{The Restricted Shell}).
|
||||||
|
|
||||||
|
+@item --rpm-requires
|
||||||
|
+Produce the list of files that are required for the
|
||||||
|
+shell script to run. This implies '-n' and is subject
|
||||||
|
+to the same limitations as compile time error checking checking;
|
||||||
|
+Backticks, [] tests, and evals are not parsed so some
|
||||||
|
+dependencies may be missed.
|
||||||
|
+
|
||||||
|
@item --verbose
|
||||||
|
Equivalent to @option{-v}. Print shell input lines as they're read.
|
||||||
|
|
||||||
|
diff -up bash-4.1-rc1/eval.c.requires bash-4.1-rc1/eval.c
|
||||||
|
--- bash-4.1-rc1/eval.c.requires 2009-01-04 20:32:26.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/eval.c 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -53,6 +53,7 @@ extern int last_command_exit_value, stdi
|
||||||
|
extern int need_here_doc;
|
||||||
|
extern int current_command_number, current_command_line_count, line_number;
|
||||||
|
extern int expand_aliases;
|
||||||
|
+extern int rpm_requires;
|
||||||
|
|
||||||
|
static void send_pwd_to_eterm __P((void));
|
||||||
|
static sighandler alrm_catcher __P((int));
|
||||||
|
@@ -136,7 +137,7 @@ reader_loop ()
|
||||||
|
|
||||||
|
if (read_command () == 0)
|
||||||
|
{
|
||||||
|
- if (interactive_shell == 0 && read_but_dont_execute)
|
||||||
|
+ if (interactive_shell == 0 && (read_but_dont_execute && !rpm_requires))
|
||||||
|
{
|
||||||
|
last_command_exit_value = EXECUTION_SUCCESS;
|
||||||
|
dispose_command (global_command);
|
||||||
|
diff -up bash-4.1-rc1/execute_cmd.c.requires bash-4.1-rc1/execute_cmd.c
|
||||||
|
--- bash-4.1-rc1/execute_cmd.c.requires 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/execute_cmd.c 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -501,6 +501,8 @@ async_redirect_stdin ()
|
||||||
|
|
||||||
|
#define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0)
|
||||||
|
|
||||||
|
+extern int rpm_requires;
|
||||||
|
+
|
||||||
|
/* Execute the command passed in COMMAND, perhaps doing it asynchrounously.
|
||||||
|
COMMAND is exactly what read_command () places into GLOBAL_COMMAND.
|
||||||
|
ASYNCHROUNOUS, if non-zero, says to do this command in the background.
|
||||||
|
@@ -532,8 +534,13 @@ execute_command_internal (command, async
|
||||||
|
#else
|
||||||
|
if (breaking || continuing)
|
||||||
|
return (last_command_exit_value);
|
||||||
|
- if (command == 0 || read_but_dont_execute)
|
||||||
|
+ if (command == 0 || (read_but_dont_execute && !rpm_requires))
|
||||||
|
return (EXECUTION_SUCCESS);
|
||||||
|
+ if (rpm_requires && command->type == cm_function_def)
|
||||||
|
+ return last_command_exit_value =
|
||||||
|
+ execute_intern_function (command->value.Function_def->name,
|
||||||
|
+ command->value.Function_def->command);
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QUIT;
|
||||||
|
@@ -5061,7 +5068,7 @@ execute_intern_function (name, function)
|
||||||
|
|
||||||
|
if (check_identifier (name, posixly_correct) == 0)
|
||||||
|
{
|
||||||
|
- if (posixly_correct && interactive_shell == 0)
|
||||||
|
+ if (posixly_correct && interactive_shell == 0 && rpm_requires == 0)
|
||||||
|
{
|
||||||
|
last_command_exit_value = EX_BADUSAGE;
|
||||||
|
jump_to_top_level (ERREXIT);
|
||||||
|
diff -up bash-4.1-rc1/execute_cmd.h.requires bash-4.1-rc1/execute_cmd.h
|
||||||
|
--- bash-4.1-rc1/execute_cmd.h.requires 2009-01-16 22:20:15.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/execute_cmd.h 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -22,6 +22,8 @@
|
||||||
|
#define _EXECUTE_CMD_H_
|
||||||
|
|
||||||
|
#include "stdc.h"
|
||||||
|
+#include "variables.h"
|
||||||
|
+#include "command.h"
|
||||||
|
|
||||||
|
extern struct fd_bitmap *new_fd_bitmap __P((int));
|
||||||
|
extern void dispose_fd_bitmap __P((struct fd_bitmap *));
|
||||||
|
diff -up bash-4.1-rc1/make_cmd.c.requires bash-4.1-rc1/make_cmd.c
|
||||||
|
--- bash-4.1-rc1/make_cmd.c.requires 2009-09-11 23:26:12.000000000 +0200
|
||||||
|
+++ bash-4.1-rc1/make_cmd.c 2009-12-26 22:57:46.000000000 +0100
|
||||||
|
@@ -42,11 +42,15 @@
|
||||||
|
#include "flags.h"
|
||||||
|
#include "make_cmd.h"
|
||||||
|
#include "dispose_cmd.h"
|
||||||
|
+#include "execute_cmd.h"
|
||||||
|
#include "variables.h"
|
||||||
|
#include "subst.h"
|
||||||
|
#include "input.h"
|
||||||
|
#include "ocache.h"
|
||||||
|
#include "externs.h"
|
||||||
|
+#include "builtins.h"
|
||||||
|
+
|
||||||
|
+#include "builtins/common.h"
|
||||||
|
|
||||||
|
#if defined (JOB_CONTROL)
|
||||||
|
#include "jobs.h"
|
||||||
|
@@ -56,6 +60,10 @@
|
||||||
|
|
||||||
|
extern int line_number, current_command_line_count, parser_state;
|
||||||
|
extern int last_command_exit_value;
|
||||||
|
+extern int rpm_requires;
|
||||||
|
+
|
||||||
|
+static char *alphabet_set = "abcdefghijklmnopqrstuvwxyz"
|
||||||
|
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
|
||||||
|
/* Object caching */
|
||||||
|
sh_obj_cache_t wdcache = {0, 0, 0};
|
||||||
|
@@ -820,6 +828,27 @@ make_coproc_command (name, command)
|
||||||
|
return (make_command (cm_coproc, (SIMPLE_COM *)temp));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+output_requirement (deptype, filename)
|
||||||
|
+const char *deptype;
|
||||||
|
+char *filename;
|
||||||
|
+{
|
||||||
|
+ if (strchr(filename, '$') || (filename[0] != '/' && strchr(filename, '/')))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ if the executable is called via variable substitution we can
|
||||||
|
+ not dermine what it is at compile time.
|
||||||
|
+
|
||||||
|
+ if the executable consists only of characters not in the
|
||||||
|
+ alphabet we do not consider it a dependency just an artifact
|
||||||
|
+ of shell parsing (ex "exec < ${infile}").
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ if (strpbrk(filename, alphabet_set))
|
||||||
|
+ printf ("%s(%s)\n", deptype, filename);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Reverse the word list and redirection list in the simple command
|
||||||
|
has just been parsed. It seems simpler to do this here the one
|
||||||
|
time then by any other method that I can think of. */
|
||||||
|
@@ -837,6 +866,27 @@ clean_simple_command (command)
|
||||||
|
REVERSE_LIST (command->value.Simple->redirects, REDIRECT *);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (rpm_requires && command->value.Simple->words)
|
||||||
|
+ {
|
||||||
|
+ char *cmd0;
|
||||||
|
+ char *cmd1;
|
||||||
|
+ struct builtin *b;
|
||||||
|
+
|
||||||
|
+ cmd0 = command->value.Simple->words->word->word;
|
||||||
|
+ b = builtin_address_internal (cmd0, 0);
|
||||||
|
+ cmd1 = 0;
|
||||||
|
+ if (command->value.Simple->words->next)
|
||||||
|
+ cmd1 = command->value.Simple->words->next->word->word;
|
||||||
|
+
|
||||||
|
+ if (b) {
|
||||||
|
+ if ( (b->flags & REQUIRES_BUILTIN) && cmd1)
|
||||||
|
+ output_requirement ("executable", cmd1);
|
||||||
|
+ } else {
|
||||||
|
+ if (!assignment(cmd0, 0))
|
||||||
|
+ output_requirement (find_function(cmd0) ? "function" : "executable", cmd0);
|
||||||
|
+ }
|
||||||
|
+ } /*rpm_requires*/
|
||||||
|
+
|
||||||
|
parser_state &= ~PST_REDIRLIST;
|
||||||
|
return (command);
|
||||||
|
}
|
||||||
|
diff -up bash-4.1-rc1/shell.c.requires bash-4.1-rc1/shell.c
|
||||||
|
--- bash-4.1-rc1/shell.c.requires 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
+++ bash-4.1-rc1/shell.c 2009-12-26 22:55:02.000000000 +0100
|
||||||
|
@@ -193,6 +193,9 @@ int have_devfd = 0;
|
||||||
|
/* The name of the .(shell)rc file. */
|
||||||
|
static char *bashrc_file = "~/.bashrc";
|
||||||
|
|
||||||
|
+/* Non-zero if we are finding the scripts requirements. */
|
||||||
|
+int rpm_requires;
|
||||||
|
+
|
||||||
|
/* Non-zero means to act more like the Bourne shell on startup. */
|
||||||
|
static int act_like_sh;
|
||||||
|
|
||||||
|
@@ -251,6 +254,7 @@ static const struct {
|
||||||
|
{ "posix", Int, &posixly_correct, (char **)0x0 },
|
||||||
|
{ "protected", Int, &protected_mode, (char **)0x0 },
|
||||||
|
{ "rcfile", Charp, (int *)0x0, &bashrc_file },
|
||||||
|
+ { "rpm-requires", Int, &rpm_requires, (char **)0x0 },
|
||||||
|
#if defined (RESTRICTED_SHELL)
|
||||||
|
{ "restricted", Int, &restricted, (char **)0x0 },
|
||||||
|
#endif
|
||||||
|
@@ -485,6 +489,12 @@ main (argc, argv, env)
|
||||||
|
if (dump_translatable_strings)
|
||||||
|
read_but_dont_execute = 1;
|
||||||
|
|
||||||
|
+ if (rpm_requires)
|
||||||
|
+ {
|
||||||
|
+ read_but_dont_execute = 1;
|
||||||
|
+ initialize_shell_builtins ();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (running_setuid && privileged_mode == 0)
|
||||||
|
disable_priv_mode ();
|
||||||
|
|
25
bash-patchset.sh
Normal file
25
bash-patchset.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
|
||||||
|
BASH_PATCHVERSION=$1
|
||||||
|
BASH_MAJVER=$(echo $BASH_PATCHVERSION | cut -d. -f1-2)
|
||||||
|
BASH_MAJVER_NODOT=$(echo $BASH_MAJVER | tr -d .)
|
||||||
|
BASH_PATCHVER=$(echo $BASH_PATCHVERSION | cut -d. -f3)
|
||||||
|
|
||||||
|
if [ -z "$BASH_PATCHVERSION" ]; then
|
||||||
|
echo "Usage: $0 <path_version>"
|
||||||
|
echo
|
||||||
|
echo "E.g.: $0 4.2.045"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf bash-patchset-$BASH_PATCHVERSION
|
||||||
|
mkdir bash-patchset-$BASH_PATCHVERSION
|
||||||
|
cd bash-patchset-$BASH_PATCHVERSION
|
||||||
|
for f in `seq 1 $BASH_PATCHVER`; do
|
||||||
|
BASH_PATCHVER_FORMATTED=`printf "%03d" $f`
|
||||||
|
wget -r -N -l 1 -np -nd -A "bash*" ftp://ftp.gnu.org/pub/gnu/bash/bash-$BASH_MAJVER-patches/bash${BASH_MAJVER_NODOT}-${BASH_PATCHVER_FORMATTED} || exit 1
|
||||||
|
done
|
||||||
|
cd ..
|
||||||
|
tar -cz bash-patchset-$BASH_PATCHVERSION > bash-patchset-$BASH_PATCHVERSION.tar.gz
|
||||||
|
rm -rf bash-patchset-$BASH_PATCHVERSION
|
296
bash.spec
Normal file
296
bash.spec
Normal file
@ -0,0 +1,296 @@
|
|||||||
|
# NOTE: no bash doc 4.x available for now
|
||||||
|
%define majver %(echo %version | cut -d. -f1-2)
|
||||||
|
|
||||||
|
Name: bash
|
||||||
|
Version: 4.3.011
|
||||||
|
Release: 1mamba
|
||||||
|
Summary: The GNU Bourne Again shell (bash)
|
||||||
|
Group: Applications/Shells
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: http://www.gnu.org/software/bash/bash.html
|
||||||
|
Source0: ftp://ftp.gnu.org/pub/gnu/bash/bash-%{majver}.tar.gz
|
||||||
|
# Official upstream patches from `http://ftp.gnu.org/gnu/bash/bash-4.2-patches'
|
||||||
|
# Create bash-patchset for current release using bash-patchset.sh script
|
||||||
|
#Source1: bash-patchset-%{version}.tar.gz
|
||||||
|
Source2: dot-bashrc
|
||||||
|
Source3: dot-bash_profile
|
||||||
|
Source4: dot-bash_logout
|
||||||
|
Source5: bash-2.0.5-cross-compile-config.cache
|
||||||
|
Source6: bash-patchset.sh
|
||||||
|
#Source7: http://translationproject.org/PO-files/it/bash-%{majver}.it.po
|
||||||
|
Patch0: %{name}-4.1-bash-requires.patch
|
||||||
|
License: GPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libncurses-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildRequires: libreadline-devel
|
||||||
|
BuildRequires: bison
|
||||||
|
%if "%{stage1}" != "1"
|
||||||
|
BuildRequires: emacs
|
||||||
|
%endif
|
||||||
|
BuildRequires: gettext-devel
|
||||||
|
# clear is used by $HOME/.bash_logout
|
||||||
|
Requires: %{_bindir}/clear
|
||||||
|
Requires(pre): glibc
|
||||||
|
Requires(post): %{__install_info}
|
||||||
|
Requires(post): chkconfig
|
||||||
|
Provides: /bin/sh
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%debug_package
|
||||||
|
|
||||||
|
%description
|
||||||
|
Bash (Bourne Again shell) is the shell, or command language interpreter, that will appear in the GNU operating system.
|
||||||
|
Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh).
|
||||||
|
It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.
|
||||||
|
It offers functional improvements over sh for both programming and interactive use.
|
||||||
|
In addition, most sh scripts can be run by Bash without modification.
|
||||||
|
|
||||||
|
The improvements offered by BASH include:
|
||||||
|
* Command line editing
|
||||||
|
* Unlimited size command history
|
||||||
|
* Job Control
|
||||||
|
* Shell Functions and Aliases
|
||||||
|
* Indexed arrays of unlimited size
|
||||||
|
* Integer arithmetic in any base from two to sixty-four
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for the GNU Bourne Again shell (bash)
|
||||||
|
Group: Documentation
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Bash (Bourne Again shell) is the shell, or command language interpreter, that will appear in the GNU operating system.
|
||||||
|
Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh).
|
||||||
|
It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.
|
||||||
|
It offers functional improvements over sh for both programming and interactive use.
|
||||||
|
In addition, most sh scripts can be run by Bash without modification.
|
||||||
|
|
||||||
|
This package includes doc guide examples and manual for bash.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{majver}
|
||||||
|
#-a1
|
||||||
|
#%patch0 -p1 -b .bash-requires
|
||||||
|
#for f in bash-patchset-%{version}/*; do
|
||||||
|
# patch -p0 < $f
|
||||||
|
#done
|
||||||
|
|
||||||
|
%if "%{_host}" != "%{_build}"
|
||||||
|
# cross-compiling: give configure some anwsers
|
||||||
|
case %{_host_cpu} in ppc|powerpc) install %{S:5} config.cache ;; esac
|
||||||
|
%endif
|
||||||
|
|
||||||
|
## add italian localization
|
||||||
|
#install -m0644 %{SOURCE7} po/it.po
|
||||||
|
#sed -i "s|\(en@quot.*\)|\1 it|" po/LINGUAS
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure \
|
||||||
|
-C --with-bash-malloc=no \
|
||||||
|
--bindir=/bin \
|
||||||
|
--with-curses \
|
||||||
|
%if "%{_host}" != "%{_build}"
|
||||||
|
bash_cv_job_control_missing=present
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%make
|
||||||
|
%make check
|
||||||
|
|
||||||
|
make -C po it.gmo
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall
|
||||||
|
#ln -s bash %{buildroot}/bin/sh
|
||||||
|
#ln -s bash.1 %{buildroot}%{_mandir}/man1/sh.1
|
||||||
|
|
||||||
|
#install skeletons
|
||||||
|
install -D -c -m644 %{S:2} %{buildroot}/etc/skel/.bashrc
|
||||||
|
install -D -c -m644 %{S:3} %{buildroot}/etc/skel/.bash_profile
|
||||||
|
install -D -c -m644 %{S:4} %{buildroot}/etc/skel/.bash_logout
|
||||||
|
|
||||||
|
install -c -m 644 doc/builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%post -p /bin/bash
|
||||||
|
if [ $1 -ge 1 ]; then
|
||||||
|
%install_info %{name}.info
|
||||||
|
sh=`readlink /bin/sh`
|
||||||
|
[ "$sh" != "/etc/alternatives/sh" -o ! -L /bin/sh ] && ln -sf bash /bin/sh
|
||||||
|
/usr/sbin/update-alternatives \
|
||||||
|
--install /bin/sh sh /bin/bash 20
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%uninstall_info %{name}.info
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
# remove legacy alternatives /usr/bin/ld
|
||||||
|
/usr/sbin/update-alternatives --remove sh /bin/bash 2>/dev/null
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%posttrans -p /bin/bash
|
||||||
|
[ -e /bin/sh ] || ln -s /etc/alternatives/sh /bin/sh
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files -f %{name}.lang
|
||||||
|
%defattr(-,root,root)
|
||||||
|
/bin/bash
|
||||||
|
/bin/bashbug
|
||||||
|
#/bin/sh
|
||||||
|
%config(noreplace) %{_sysconfdir}/skel/.b*
|
||||||
|
%{_infodir}/bash.info*
|
||||||
|
%{_mandir}/man1/bash.*
|
||||||
|
%{_mandir}/man1/bashbug.*
|
||||||
|
%{_mandir}/man1/builtins.*
|
||||||
|
#%{_mandir}/man1/sh.*
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc doc/FAQ doc/INTRO doc/README
|
||||||
|
%doc doc/bashref.html
|
||||||
|
%dir %{_docdir}/bash
|
||||||
|
%{_docdir}/bash/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Apr 24 2014 Automatic Build System <autodist@mambasoft.it> 4.3.011-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Tue Apr 08 2014 Automatic Build System <autodist@mambasoft.it> 4.3.008-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Fri Mar 07 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 4.3-1mamba
|
||||||
|
- update to 4.3
|
||||||
|
|
||||||
|
* Sat Nov 23 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.045-6mamba
|
||||||
|
- added chkconfig Requires(post) for alternatives
|
||||||
|
|
||||||
|
* Tue Oct 15 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.045-5mamba
|
||||||
|
- run scripts with /bin/bash to avoid damage due to /bin/sh disappearing
|
||||||
|
|
||||||
|
* Tue Oct 15 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.045-4mamba
|
||||||
|
- added italian localization
|
||||||
|
- add alternative for /bin/sh
|
||||||
|
|
||||||
|
* Mon Sep 30 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.045-3mamba
|
||||||
|
- removed /bin/sh symlink in favour of dash
|
||||||
|
|
||||||
|
* Tue May 28 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.045-2mamba
|
||||||
|
- really update patchset to 4.2.045 (added bash-patchset.sh new script to generate patchset for current version)
|
||||||
|
|
||||||
|
* Mon Apr 15 2013 Automatic Build System <autodist@mambasoft.it> 4.2.045-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Thu Jan 03 2013 Automatic Build System <autodist@mambasoft.it> 4.2.042-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sat Dec 01 2012 Automatic Build System <autodist@mambasoft.it> 4.2.039-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sun May 06 2012 Davide Madrisan <davide.madrisan@gmail.com> 4.2.028-1mamba
|
||||||
|
- update to 4.2.028
|
||||||
|
|
||||||
|
* Tue Dec 20 2011 Davide Madrisan <davide.madrisan@gmail.com> 4.2.020-1mamba
|
||||||
|
- update to 4.2.020
|
||||||
|
|
||||||
|
* Wed May 04 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.000-2mamba
|
||||||
|
- rebuilt with debug package
|
||||||
|
|
||||||
|
* Thu Feb 17 2011 Davide Madrisan <davide.madrisan@gmail.com> 4.2.000-1mamba
|
||||||
|
- update to 4.2.000
|
||||||
|
- install builtins.1 manpage
|
||||||
|
- install the file bashref.html included in the source tarball
|
||||||
|
- provide a manpage for sh
|
||||||
|
|
||||||
|
* Sun Oct 17 2010 Davide Madrisan <davide.madrisan@gmail.com> 4.1.009-1mamba
|
||||||
|
- update to 4.1.009
|
||||||
|
|
||||||
|
* Fri Jul 02 2010 Davide Madrisan <davide.madrisan@gmail.com> 4.1.007-1mamba
|
||||||
|
- update to 4.1.007
|
||||||
|
|
||||||
|
* Sat Apr 17 2010 Davide Madrisan <davide.madrisan@gmail.com> 4.1.005-1mamba
|
||||||
|
- update to 4.1.005
|
||||||
|
|
||||||
|
* Sun Mar 28 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.002-1mamba
|
||||||
|
- update to 4.1.002 (fixed specfile for automatic updates: Version field cannot be parametric
|
||||||
|
- added stage1 code for cross compilation
|
||||||
|
|
||||||
|
* Sat Mar 20 2010 Davide Madrisan <davide.madrisan@gmail.com> 4.1-2mamba
|
||||||
|
- really update to version 4.1
|
||||||
|
- removed obsolete patches bash-4.0-nnn.patch
|
||||||
|
- update bash-requires patch
|
||||||
|
- provide bashref.html for bash 4.0 instead of outdate documentation files
|
||||||
|
|
||||||
|
* Fri Jan 01 2010 Automatic Build System <autodist@mambasoft.it> 4.1-1mamba
|
||||||
|
- automatic update to 4.1 by autodist
|
||||||
|
|
||||||
|
* Mon Oct 26 2009 Davide Madrisan <davide.madrisan@gmail.com> 4.0.035-1mamba
|
||||||
|
- update to 4.0p35
|
||||||
|
|
||||||
|
* Thu Jun 11 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0-4mamba
|
||||||
|
- rebuilt with option "--with-curses" to re-enable support for multiline prompt
|
||||||
|
|
||||||
|
* Tue Mar 24 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0-3mamba
|
||||||
|
- rebuilt against libreadline 6
|
||||||
|
|
||||||
|
* Sun Mar 22 2009 Davide Madrisan <davide.madrisan@gmail.com> 4.0-2mamba
|
||||||
|
- update to 4.0p10
|
||||||
|
|
||||||
|
* Sun Mar 01 2009 Davide Madrisan <davide.madrisan@gmail.com> 4.0-1mamba
|
||||||
|
- update to 4.0
|
||||||
|
|
||||||
|
* Tue Aug 26 2008 Aleph0 <aleph0@openmamba.org> 3.2p39-1mamba
|
||||||
|
- update to 3.2p39
|
||||||
|
|
||||||
|
* Fri Jun 13 2008 Aleph0 <aleph0@openmamba.org> 3.2p37-1mamba
|
||||||
|
- update to 3.2p37
|
||||||
|
- source file `dot-bash_profile' updated
|
||||||
|
|
||||||
|
* Mon Jun 04 2007 Aleph0 <aleph0@openmamba.org> 3.2p17-1mamba
|
||||||
|
- update to 3.2p17
|
||||||
|
|
||||||
|
* Sun Feb 25 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2p9-2qilnx
|
||||||
|
- add glibc prereq
|
||||||
|
|
||||||
|
* Wed Jan 17 2007 Davide Madrisan <davide.madrisan@qilinux.it> 3.2p9-1qilnx
|
||||||
|
- update to patch level 9
|
||||||
|
|
||||||
|
* Fri Oct 13 2006 Davide Madrisan <davide.madrisan@qilinux.it> 3.2-2qilnx
|
||||||
|
- rebuilt against libreadline 5.2
|
||||||
|
|
||||||
|
* Thu Oct 12 2006 Davide Madrisan <davide.madrisan@qilinux.it> 3.2-1qilnx
|
||||||
|
- update to version 3.2 by autospec
|
||||||
|
|
||||||
|
* Mon May 15 2006 Davide Madrisan <davide.madrisan@qilinux.it> 3.1-2qilnx
|
||||||
|
- added a patch from ALT Linux that enable the command '--rpm-requires'
|
||||||
|
- added all the available official patches (p#1 to 9)
|
||||||
|
|
||||||
|
* Tue Dec 13 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.1-1qilnx
|
||||||
|
- update to version 3.1 by autospec
|
||||||
|
|
||||||
|
* Thu Sep 08 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.0-1qilnx
|
||||||
|
- update to version 3.0 by autospec
|
||||||
|
|
||||||
|
* Sun Sep 04 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.05b-6qilnx
|
||||||
|
- rebuilt with gcc4
|
||||||
|
- added cross-platform build support
|
||||||
|
|
||||||
|
* Wed Jul 28 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.05b-5qilnx
|
||||||
|
- added patches from ufficial site
|
||||||
|
- specfile updated
|
||||||
|
|
||||||
|
* Mon Apr 22 2003 Silvan Calarco <silvan.calarco@qinet.it> 2.05b-4qilnx
|
||||||
|
- removed Prefix variable definition
|
||||||
|
- corrected infodir and mandir locations
|
3
dot-bash_logout
Normal file
3
dot-bash_logout
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# ~/.bash_logout
|
||||||
|
|
||||||
|
clear
|
14
dot-bash_profile
Normal file
14
dot-bash_profile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# .bash_profile
|
||||||
|
|
||||||
|
# Get the aliases and functions
|
||||||
|
if [ -f ~/.bashrc ]; then
|
||||||
|
. ~/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# User specific environment and startup programs
|
||||||
|
if [ -d $HOME/bin ]; then
|
||||||
|
PATH=$PATH:$HOME/bin
|
||||||
|
fi
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
unset USERNAME
|
8
dot-bashrc
Normal file
8
dot-bashrc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# .bashrc
|
||||||
|
|
||||||
|
# User specific aliases and functions
|
||||||
|
|
||||||
|
# Source global definitions
|
||||||
|
if [ -f /etc/bashrc ]; then
|
||||||
|
. /etc/bashrc
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user