Adding debian version 5.2.37-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
fa1b3d3922
commit
fc8a52c443
59 changed files with 8007 additions and 0 deletions
35
debian/FAQ
vendored
Normal file
35
debian/FAQ
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
[ The original document has a license, which doesn't allow inclusion of the
|
||||
FAQ in the main section of the Debian packages and therefore isn't
|
||||
distributed in the Debian packages for bash. Pleae get it from the upstream
|
||||
location.
|
||||
]
|
||||
|
||||
-----------
|
||||
This is the Bash FAQ, version 3.20, for Bash version 2.05b.
|
||||
|
||||
This document contains a set of frequently-asked questions concerning
|
||||
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
|
||||
interpreter with advanced features for both interactive use and shell
|
||||
programming.
|
||||
|
||||
Another good source of basic information about shells is the collection
|
||||
of FAQ articles periodically posted to comp.unix.shell.
|
||||
|
||||
Questions and comments concerning this document should be sent to
|
||||
chet@po.cwru.edu.
|
||||
|
||||
This document is available for anonymous FTP with the URL
|
||||
|
||||
ftp://ftp.cwru.edu/pub/bash/FAQ
|
||||
|
||||
The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
|
||||
|
||||
The original document has the following license:
|
||||
-----------
|
||||
This document is Copyright 1995-2002 by Chester Ramey.
|
||||
|
||||
Permission is hereby granted, without written agreement and
|
||||
without license or royalty fees, to use, copy, and distribute
|
||||
this document for any purpose, provided that the above copyright
|
||||
notice appears in all copies of this document and that the
|
||||
contents of this document remain unaltered.
|
122
debian/README
vendored
Normal file
122
debian/README
vendored
Normal file
|
@ -0,0 +1,122 @@
|
|||
Bash Configuration for Debian
|
||||
-----------------------------
|
||||
|
||||
A number of patches for the bash sources is applied for the Debian build
|
||||
of bash. See the details at the end of the file.
|
||||
|
||||
The bash package was built using the following configuration options:
|
||||
|
||||
--with-curses \
|
||||
--enable-largefile \
|
||||
|
||||
bash-static additionally configured with --enable-static-link.
|
||||
|
||||
The upstream ChangeLog can be found in the bash-doc package.
|
||||
|
||||
|
||||
A kind of FAQ for bash on Debian GNU/{Linux,Hurd}
|
||||
-------------------------------------------------
|
||||
|
||||
1. symlinked directory completion behavior
|
||||
|
||||
Starting with readline-4.2a, completion on symlinks that point
|
||||
to directories does not append the slash. To restore the behaviour
|
||||
found in readline-4.2, add to /etc/inputrc or ~/.inputrc:
|
||||
|
||||
set mark-symlinked-directories on
|
||||
|
||||
2. How can I make bash 8-bit clean so I can type hi-bit characters
|
||||
directly?
|
||||
|
||||
Remove the comments from the indicated lines in /etc/inputrc.
|
||||
It doesn't ship this way because otherwise the Meta bindings will not work.
|
||||
|
||||
3. How to get rid off annoying beeps for ambiguous completions?
|
||||
|
||||
Put in /etc/inputrc (or in your ~/.inputrc):
|
||||
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
Other people prefer:
|
||||
|
||||
set bell-style none
|
||||
|
||||
4. bash doesn't display prompts correctly.
|
||||
|
||||
When using colors in prompts (or escape characters), then make sure
|
||||
those characters are surrounded by \[ and \]. For more information
|
||||
look at the man page bash(1) and search for PROMPTING.
|
||||
|
||||
5. What is /etc/bash.bashrc? It doesn't seem to be documented.
|
||||
|
||||
The Debian version of bash is compiled with a special option
|
||||
(-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc
|
||||
for interactive non-login shells. So, on Debian systems,
|
||||
/etc/bash.bashrc is to ~/.bashrc as /etc/profile is to
|
||||
~/.bash_profile.
|
||||
|
||||
6. bash does not check $PATH if hash fails
|
||||
|
||||
bash hashes the location of recently executed commands. When a command
|
||||
is moved to a new location in the PATH, the command is still in the PATH
|
||||
but the hash table still records the old location.
|
||||
|
||||
For performance reasons bash does not remove the command from the hash
|
||||
and relook it up in PATH.
|
||||
|
||||
Use 'hash -r' manually or set a bash option: 'shopt -s checkhash'.
|
||||
|
||||
7. Bourne-style shells have always accepted multiple directory name arguments
|
||||
to cd. If the user doesn't like it, have him define a shell function:
|
||||
|
||||
cd()
|
||||
{
|
||||
case $# in
|
||||
0|1) ;;
|
||||
*) echo "cd: too many arguments ; return 2 ;;
|
||||
esac
|
||||
builtin cd "$@"
|
||||
}
|
||||
|
||||
8. key bindings for ESC
|
||||
|
||||
Consider the following .inputrc:
|
||||
|
||||
set editing-mode vi
|
||||
|
||||
keymap vi
|
||||
"\M-[D": backward-char
|
||||
"\M-[C": forward-char
|
||||
"\M-[A": previous-history
|
||||
"\M-[B": next-history
|
||||
|
||||
And, just to be certain, set -o reports that vi is on.
|
||||
|
||||
However, ESC k does not send me to the previous line.
|
||||
|
||||
I'm guessing that this is a conflict between bash's concept of a meta
|
||||
keymap and its concept of vi's command-mode character -- which is to
|
||||
say that its data structures don't properly reflect its implementation.
|
||||
|
||||
Note that if I remove the meta prefix, leaving lines like:
|
||||
"[A": previous-history
|
||||
|
||||
That vi command mode keys work fine, and I can use the arrow keys in vi
|
||||
mode, *provided I'm already in command mode already*. In other words,
|
||||
bash is doing something wrong here such that it doesn't see the escape
|
||||
character at the beginning of the key sequence even when in vi insert mode.
|
||||
|
||||
Comment from the upstream author: "This guy destroyed the key binding for
|
||||
ESC, which effectively disabled vi command mode. It's not as simple as he
|
||||
paints it to be -- the binding for ESC in the vi insertion keymap *must*
|
||||
be a function because of the other things needed when switching
|
||||
from insert mode to command mode.
|
||||
|
||||
If he wants to change something in vi's command mode, he needs
|
||||
to use `set keymap vi-command' and enter key bindings without
|
||||
the \M- prefix (as he discovered)."
|
||||
|
||||
|
||||
Patches Applied to the Bash Sources
|
||||
-----------------------------------
|
||||
|
26
debian/README.abs-guide
vendored
Normal file
26
debian/README.abs-guide
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
[ This is just a pointer to a document, which you might find helpful]
|
||||
|
||||
Advanced Bash-Scripting Guide
|
||||
|
||||
A complete guide to shell scripting, using Bash
|
||||
|
||||
Mendel Cooper - Brindlesoft
|
||||
|
||||
thegrendel@theriver.com
|
||||
|
||||
|
||||
This tutorial assumes no previous knowledge of scripting or programming, but
|
||||
progresses rapidly toward an intermediate/advanced level of instruction
|
||||
(...all the while sneaking in little snippets of UNIX wisdom and lore). It
|
||||
serves as a textbook, a manual for self-study, and a reference and source
|
||||
of knowledge on shell scripting techniques. The exercises and heavily-
|
||||
commented examples invite active reader participation, under the premise that
|
||||
the only way to really learn scripting is to write scripts.
|
||||
|
||||
The guide is availabe at http://tldp.org/LDP/abs/html/
|
||||
|
||||
The latest update of this document, as an archived "tarball" including both
|
||||
the SGML source and rendered HTML, may be downloaded from the author's home
|
||||
site (http://personal.riverusers.com/~thegrendel/abs-guide-2.1.tar.bz2). See
|
||||
the change log for a revision history
|
||||
(http://personal.riverusers.com/~thegrendel/Change.log).
|
18
debian/README.bash_completion
vendored
Normal file
18
debian/README.bash_completion
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
Programmable Completion
|
||||
=======================
|
||||
|
||||
[BUG REPORTING: Please direct all enhancement requests directly to the
|
||||
bash_completion maintainer, the completion script won't be changed for
|
||||
Debian specific enhancements. If you find a real bug, report it the usual
|
||||
way. The bash_completion author can be reached at
|
||||
http://freshmeat.net/projects/bashcompletion/
|
||||
|
||||
If you find a newer version on freshmeat, you can replace it, if you did
|
||||
not change the Debian version.
|
||||
]
|
||||
|
||||
To enable programmable completion for bash on Debian, uncomment the
|
||||
bash_completion lines in /etc/bash.bashrc to source
|
||||
/usr/share/bash-completion/bash_completion.
|
||||
/usr/share/bash-completion/bash_completion sources ~/.bash_completion, if
|
||||
it exists.
|
189
debian/README.commands
vendored
Normal file
189
debian/README.commands
vendored
Normal file
|
@ -0,0 +1,189 @@
|
|||
This is a jumping-off reference point for new users who may be
|
||||
completely unfamiliar with Linux commands. It does not contain all
|
||||
the information you need about using the Linux console, but instead
|
||||
just gives you enough information to get started finding the
|
||||
information you need.
|
||||
|
||||
Linux Commands
|
||||
|
||||
To run a command, type the command at the prompt, followed by any
|
||||
necessary options, and then press the Enter or Return key.
|
||||
|
||||
Most commands operate silently unless they are specifically asked to
|
||||
say what they are doing. If there is no error message, the command
|
||||
should have worked.
|
||||
|
||||
The operation of most commands can be changed by putting command
|
||||
options immediately after the command name. There are several styles
|
||||
of options used, and you have to check the documentation for each
|
||||
command to know what options it can take, and what they do.
|
||||
|
||||
Linux commands are case-sensitive, and almost always are all
|
||||
lower-case. ls is a valid command; LS is not.
|
||||
|
||||
In most cases you can use the tab key to ask the command shell to
|
||||
auto-complete the command, directory or filename you have started
|
||||
to type. If a unique completion exists, the shell will type it. If
|
||||
not, you can press tab a second time to obtain a list of the
|
||||
possible auto-completions.
|
||||
|
||||
Commands for Reading Documentation
|
||||
|
||||
In the following command examples, the [ ] characters are not
|
||||
typed, they mean that whatever is enclosed is optional. For
|
||||
example, you can also start `info' without any subject at all.
|
||||
|
||||
When a given keyboard shortcut is preceded by ctrl- or alt- , that
|
||||
means hold the control or alt key down, and type the given key
|
||||
while holding it down (the same way you use the shift key). A
|
||||
shorthand notation for ctrl- is ^ (^C means ctrl-C).
|
||||
|
||||
man subject
|
||||
man shows the manual page on the command (use q or ctrl-C to
|
||||
get out of it if it doesn't terminate at the end of the
|
||||
text).
|
||||
|
||||
info [subject]
|
||||
A lot of Debian Linux documentation is provided in info
|
||||
format. This is similar to a hypertext format, in that you
|
||||
can jump to other sections of the documentation by following
|
||||
links embedded in the text. An info tutorial is available
|
||||
within info, using ctrl-h followed by h.
|
||||
|
||||
help [subject]
|
||||
Use help for on-line help about the shell's built-in commands.
|
||||
help by itself prints a list of subjects for which you can
|
||||
ask for help.
|
||||
|
||||
pager filename
|
||||
pager displays a plain text file one screen at a time.
|
||||
Additional screens can be displayed by pressing the space
|
||||
bar, and previous screens can be displayed by pressing the b
|
||||
key. When finished viewing the help, press q to return to
|
||||
the prompt.
|
||||
|
||||
Using -h --help with | pager
|
||||
Most commands offer very brief built-in help by typing the
|
||||
command followed by
|
||||
|
||||
-h or --help
|
||||
|
||||
If the help scrolls up beyond the top of the screen before
|
||||
you can read it, add
|
||||
|
||||
| pager
|
||||
|
||||
to the end of the command.
|
||||
|
||||
zmore document.gz
|
||||
zmore is a document pager -- it displays the contents of
|
||||
compressed documentation on your disk, one screenful at a
|
||||
time. Compression is signified by filenames ending in .gz .
|
||||
|
||||
lynx [document] or lynx [directory] or lynx [url]
|
||||
lynx is a text-based web browser. It can display documents
|
||||
(plain-text, compressed, or html), directory listings, and
|
||||
urls such as www.google.com. It does not display images.
|
||||
|
||||
Commands for Navigating Directories
|
||||
|
||||
pwd
|
||||
Displays your current working directory. The p stands for
|
||||
print, which is a carryover from when unix was designed,
|
||||
before the advent of computer screens. Interactive computer
|
||||
responses were printed on paper by a connected electric
|
||||
typewriter instead of being displayed electronically.
|
||||
|
||||
cd [directory]
|
||||
Change your current directory to the named directory. If you
|
||||
don't specify directory, you will be returned to your home
|
||||
directory. The `root' directory is signified by / at the
|
||||
beginning of the directory path ( / also separates directory
|
||||
and file names within the path). Thus paths beginning with /
|
||||
are `absolute' paths; cd will take you to an absolute path
|
||||
no matter what your current directory is. Paths not
|
||||
beginning with / specify paths relative to your
|
||||
current directory. cd .. means change to the parent
|
||||
directory of your current working directory.
|
||||
|
||||
ls [directory]
|
||||
ls lists the contents of directory. If you don't specify a
|
||||
directory name, the current working directory's list is
|
||||
displayed.
|
||||
|
||||
find directory -name filename
|
||||
find tells you where filename is in the tree starting at
|
||||
directory. This command has many other useful options.
|
||||
|
||||
Documentation Indices
|
||||
|
||||
The standard doc-linux-text package installs compressed text linux
|
||||
HOWTOs in
|
||||
|
||||
/usr/share/doc/HOWTO/en-txt/
|
||||
|
||||
Particularly helpful HOWTOs for new users are
|
||||
|
||||
/usr/share/doc/HOWTO/en-txt/Unix-and-Internet-Fundamentals-HOWTO.gz
|
||||
/usr/share/doc/HOWTO/en-txt/mini/INDEX.gz
|
||||
/usr/share/doc/HOWTO/en-txt/Reading-List-HOWTO.gz
|
||||
/usr/share/doc/HOWTO/en-txt/META-FAQ.gz
|
||||
|
||||
Individual package documentation is installed in
|
||||
|
||||
/usr/share/doc/<package-name>
|
||||
|
||||
New user website references include
|
||||
|
||||
http://www.debian.org/doc/FAQ
|
||||
http://www.linuxdoc.org/LDP/gs/gs.html
|
||||
|
||||
Recording User Sessions
|
||||
|
||||
script filename
|
||||
Use script to record everything that appears on the screen
|
||||
(until the next exit) in filename. This is useful if you
|
||||
need to record what's going on in order to include it in
|
||||
your message when you ask for help. Use exit, logout or
|
||||
ctrl-D to stop the recording session.
|
||||
|
||||
Turning Echo On/Off
|
||||
|
||||
To turn off echoing of characters to the screen, you can use
|
||||
ctrl-S. ctrl-Q starts the echo again. If your terminal suddenly
|
||||
seems to become unresponsive, try ctrl-Q; you may have accidentally
|
||||
typed ctrl-S which activated echo-off.
|
||||
|
||||
Virtual Consoles
|
||||
|
||||
By default, six virtual consoles are provided. If you want to
|
||||
execute another command without interrupting the operation of a
|
||||
command you previously started, you can switch to another virtual
|
||||
console (similar to a separate window). This is very handy for
|
||||
displaying the documentation for a command in one console while
|
||||
actually trying the command in another. Switch consoles 1 through 6
|
||||
by using alt-F1 through alt-F6.
|
||||
|
||||
Logging Out
|
||||
|
||||
exit or logout
|
||||
|
||||
Use exit or logout to terminate your session and log
|
||||
out. You should be returned to the log-in prompt.
|
||||
|
||||
Turning Off the Computer
|
||||
|
||||
Turning the computer on and off is really a system administration
|
||||
subject, but I include it here because it is something that every
|
||||
user who is his own administrator needs to know.
|
||||
|
||||
halt or shutdown -t 0 -h now
|
||||
This command shuts the computer down safely. You can also
|
||||
use ctrl-alt-del if your system is set up for that. (If you
|
||||
are in X, ctrl-alt-del will be intercepted by X. Get out of
|
||||
X first by using ctrl-alt-backspace.)
|
||||
|
||||
|
||||
To display this file one screen at a time, type
|
||||
|
||||
pager /usr/share/doc/doc-linux-text/README.commands
|
1304
debian/autoreconf.after
vendored
Normal file
1304
debian/autoreconf.after
vendored
Normal file
File diff suppressed because it is too large
Load diff
1301
debian/autoreconf.before
vendored
Normal file
1301
debian/autoreconf.before
vendored
Normal file
File diff suppressed because it is too large
Load diff
18
debian/bash-builtins.7
vendored
Normal file
18
debian/bash-builtins.7
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
.\" This is a hack to force bash builtins into the whatis database
|
||||
.\" and to get the list of builtins to come up with the man command.
|
||||
.TH BASH-BUILTINS 7 "2001 October 29" "GNU Bash-2.05a"
|
||||
.SH NAME
|
||||
bash-builtins \- bash built-in commands, see \fBbash\fR(1)
|
||||
.SH SYNOPSIS
|
||||
bash defines the following built-in commands:
|
||||
:, ., [, alias, bg, bind, break, builtin, case, cd, command, compgen, complete,
|
||||
continue, declare, dirs, disown, echo, enable, eval, exec, exit,
|
||||
export, fc, fg, getopts, hash, help, history, if, jobs, kill,
|
||||
let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set,
|
||||
shift, shopt, source, suspend, test, times, trap, type, typeset,
|
||||
ulimit, umask, unalias, unset, until, wait, while.
|
||||
.SH BASH BUILTIN COMMANDS
|
||||
.nr zZ 1
|
||||
.so man1/bash.1
|
||||
.SH SEE ALSO
|
||||
bash(1), sh(1)
|
2
debian/bash-builtins.overrides
vendored
Normal file
2
debian/bash-builtins.overrides
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
bash-builtins binary: shlib-with-executable-bit
|
||||
bash-builtins binary: missing-dependency-on-libc
|
14
debian/bash-doc.doc-base.bash
vendored
Normal file
14
debian/bash-doc.doc-base.bash
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
Document: bash
|
||||
Title: Bash Manual Page
|
||||
Author: Chet Ramey
|
||||
Abstract: Bash is an sh-compatible command language interpreter that executes
|
||||
commands read from the standard input or from a file. Bash also
|
||||
incorporates useful features from the Korn and C shells (ksh and csh).
|
||||
Section: Shells
|
||||
|
||||
Format: html
|
||||
Index: /usr/share/doc/bash/bash.html
|
||||
Files: /usr/share/doc/bash/bash.html
|
||||
|
||||
Format: pdf
|
||||
Files: /usr/share/doc/bash/bash.pdf
|
10
debian/bash-doc.doc-base.bashref
vendored
Normal file
10
debian/bash-doc.doc-base.bashref
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
Document: bashref
|
||||
Title: Bash Reference Manual
|
||||
Author: Chet Ramey
|
||||
Abstract: Bash is an sh-compatible command language interpreter that executes
|
||||
commands read from the standard input or from a file. Bash also
|
||||
incorporates useful features from the Korn and C shells (ksh and csh).
|
||||
Section: Shells
|
||||
|
||||
Format: pdf
|
||||
Files: /usr/share/doc/bash/bashref.pdf
|
5
debian/bash-static.overrides
vendored
Normal file
5
debian/bash-static.overrides
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# yes lintian, it's called -static
|
||||
bash-static binary: embedded-library
|
||||
|
||||
# no, used conditionally
|
||||
bash-static binary: manpage-has-errors-from-man
|
2
debian/bash.menu
vendored
Normal file
2
debian/bash.menu
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
?package(bash):needs="text" section="Applications/Shells" title="Bash" command="/bin/bash --login"
|
||||
?package(bash):needs="text" section="Applications/Shells" title="Sh" command="/bin/sh --login"
|
5
debian/bash.overrides
vendored
Normal file
5
debian/bash.overrides
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# no, used conditionally
|
||||
bash binary: manpage-has-errors-from-man
|
||||
|
||||
# we have NEWS, CHANGES and changelog ...
|
||||
bash binary: wrong-name-for-upstream-changelog
|
19
debian/bash.postinst
vendored
Normal file
19
debian/bash.postinst
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# This should never happen.
|
||||
if [ ! -e /bin/sh ]; then
|
||||
ln -s bash /bin/sh
|
||||
fi
|
||||
|
||||
update-alternatives --install \
|
||||
/usr/share/man/man7/builtins.7.gz \
|
||||
builtins.7.gz \
|
||||
/usr/share/man/man7/bash-builtins.7.gz \
|
||||
10 \
|
||||
|| true
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
22
debian/bash.prerm
vendored
Normal file
22
debian/bash.prerm
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
upgrade)
|
||||
update-alternatives --remove builtins.7.gz \
|
||||
/usr/share/man/man7/bash-builtins.7.gz
|
||||
;;
|
||||
|
||||
remove|deconfigure)
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
68
debian/bashbug.1
vendored
Normal file
68
debian/bashbug.1
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
.TH "BASHBUG" "1" "11 December 2007" "GNU Bash 3\.1" "bashbug"
|
||||
.nh
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
bashbug - report a bug in bash
|
||||
.SH "SYNOPSIS"
|
||||
.HP 8
|
||||
\fBbashbug\fR [\fB\-\-help\fR] [\fB\-\-version\fR] [\fB\fIbug\-report\-email\-addresses\fR\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
|
||||
\fBbashbug\fR
|
||||
is a utility for reporting bugs in Bash to the maintainers\.
|
||||
.PP
|
||||
|
||||
\fBbashbug\fR
|
||||
will start up your preferred editor with a preformatted bug report template for you to fill in\. Save the file and quit the editor once you have completed the missing fields\.
|
||||
\fBbashbug\fR
|
||||
will notify you of any problems with the report and ask for confirmation before sending it\. By default the bug report is mailed to both the GNU developers and the Debian Bash maintainers\. The recipients can be changed by giving a comma separated list of
|
||||
\fIbug\-report\-email\-addresses\fR\.
|
||||
.PP
|
||||
If you invoke
|
||||
\fBbashbug\fR
|
||||
by accident, just quit your editor\. You will always be asked for confirmation before a bug report is sent\.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
.PP
|
||||
\fB\-\-help\fR
|
||||
.RS
|
||||
Show a brief usage message and exit\.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-version\fR
|
||||
.RS
|
||||
Show the version of
|
||||
\fBbashbug\fR
|
||||
and exit\.
|
||||
.RE
|
||||
.PP
|
||||
\fBbug\-report\-email\-addresses\fR
|
||||
.RS
|
||||
Comma separated list of recipients\' email addresses\. By default the report is mailed to both the GNU developers and the Debian Bash maintainers\.
|
||||
.RE
|
||||
.SH "ENVIRONMENT"
|
||||
.PP
|
||||
.PP
|
||||
\fBDEFEDITOR\fR
|
||||
.RS
|
||||
Editor to use for editing the bug report\.
|
||||
.RE
|
||||
.PP
|
||||
\fBEDITOR\fR
|
||||
.RS
|
||||
Editor to use for editing the bug report (overridden by
|
||||
\fBDEFEDITOR\fR)\.
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
|
||||
\fBbash\fR(1),
|
||||
\fBreportbug\fR(1),
|
||||
\fBupdate-alternatives\fR(8)
|
||||
for preferred editor\.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
This manual page was written by Christer Andersson
|
||||
<klamm@comhem\.se>
|
||||
for the Debian project (but may be used by others)\.
|
2743
debian/changelog
vendored
Normal file
2743
debian/changelog
vendored
Normal file
File diff suppressed because it is too large
Load diff
50
debian/clear_console.1
vendored
Normal file
50
debian/clear_console.1
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
.\"***************************************************************************
|
||||
.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
|
||||
.\" *
|
||||
.\" Permission is hereby granted, free of charge, to any person obtaining a *
|
||||
.\" copy of this software and associated documentation files (the *
|
||||
.\" "Software"), to deal in the Software without restriction, including *
|
||||
.\" without limitation the rights to use, copy, modify, merge, publish, *
|
||||
.\" distribute, distribute with modifications, sublicense, and/or sell *
|
||||
.\" copies of the Software, and to permit persons to whom the Software is *
|
||||
.\" furnished to do so, subject to the following conditions: *
|
||||
.\" *
|
||||
.\" The above copyright notice and this permission notice shall be included *
|
||||
.\" in all copies or substantial portions of the Software. *
|
||||
.\" *
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
||||
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
||||
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
||||
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
||||
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
||||
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
||||
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
.\" *
|
||||
.\" Except as contained in this notice, the name(s) of the above copyright *
|
||||
.\" holders shall not be used in advertising or otherwise to promote the *
|
||||
.\" sale, use or other dealings in this Software without prior written *
|
||||
.\" authorization. *
|
||||
.\"***************************************************************************
|
||||
.\"
|
||||
.\" $Id: clear.1,v 1.3 2000/07/15 23:59:35 china Exp $
|
||||
.TH clear_console 1 ""
|
||||
.ds n 5
|
||||
.SH NAME
|
||||
\fBclear_console\fR - clear the console
|
||||
.SH SYNOPSIS
|
||||
\fBclear_console\fR
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
\fBclear_console\fR clears your console if this is possible. It looks in the
|
||||
environment for the terminal type and then in the \fBterminfo\fR database to
|
||||
figure out how to clear the screen. To clear the buffer, it then changes the
|
||||
foreground virtual terminal to another terminal and then back to the original
|
||||
terminal.
|
||||
.SH SEE ALSO
|
||||
\fBclear\fR(1), \fBchvt\fR(1)
|
||||
.\"#
|
||||
.\"# The following sets edit modes for GNU EMACS
|
||||
.\"# Local Variables:
|
||||
.\"# mode:nroff
|
||||
.\"# fill-column:79
|
||||
.\"# End:
|
291
debian/clear_console.c
vendored
Normal file
291
debian/clear_console.c
vendored
Normal file
|
@ -0,0 +1,291 @@
|
|||
/*
|
||||
Copyright (C) 2006-2019 Canonical Ltd.
|
||||
|
||||
clear_console and it's man page are free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2, or (at your
|
||||
option) any later version.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#if defined(__linux)
|
||||
#include <linux/kd.h>
|
||||
#include <linux/vt.h>
|
||||
#elif defined(__FreeBSD_kernel__)
|
||||
#include <sys/consio.h>
|
||||
#include <sys/kbio.h>
|
||||
#endif
|
||||
|
||||
#include <curses.h>
|
||||
#include <term.h>
|
||||
|
||||
#define VERSION "0.1"
|
||||
|
||||
char* progname;
|
||||
int quiet = 0;
|
||||
|
||||
void usage()
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [option]\n", progname);
|
||||
fprintf(stderr, "valid options are:\n");
|
||||
fprintf(stderr, "\t-q --quiet don't print error messages\n");
|
||||
fprintf(stderr, "\t-h --help display this help text and exit\n");
|
||||
fprintf(stderr, "\t-V --version display version information and exit\n");
|
||||
}
|
||||
|
||||
const struct option opts[] =
|
||||
{
|
||||
/* operations */
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"version", no_argument, 0, 'V'},
|
||||
{"quiet", no_argument, 0, 'q'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
static int putch(int c)
|
||||
{
|
||||
return putchar(c);
|
||||
}
|
||||
|
||||
|
||||
/* taken from console-utils, lib/misc-console-utils.c */
|
||||
|
||||
int is_a_console(int fd)
|
||||
{
|
||||
#if defined(__linux__)
|
||||
char arg;
|
||||
#elif defined(__FreeBSD_kernel__)
|
||||
int arg;
|
||||
#endif
|
||||
|
||||
arg = 0;
|
||||
return (ioctl(fd, KDGKBTYPE, &arg) == 0
|
||||
&& ((arg == KB_OTHER) || (arg == KB_101) || (arg == KB_84)));
|
||||
}
|
||||
|
||||
static int open_a_console(char *fnam)
|
||||
{
|
||||
int fd;
|
||||
|
||||
/* try read-only */
|
||||
fd = open(fnam, O_RDWR);
|
||||
|
||||
/* if failed, try read-only */
|
||||
if (fd < 0 && errno == EACCES)
|
||||
fd = open(fnam, O_RDONLY);
|
||||
|
||||
/* if failed, try write-only */
|
||||
if (fd < 0 && errno == EACCES)
|
||||
fd = open(fnam, O_WRONLY);
|
||||
|
||||
/* if failed, fail */
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
|
||||
/* if not a console, fail */
|
||||
if (! is_a_console(fd))
|
||||
{
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* success */
|
||||
return fd;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get an fd for use with kbd/console ioctls.
|
||||
* We try several things because opening /dev/console will fail
|
||||
* if someone else used X (which does a chown on /dev/console).
|
||||
*
|
||||
* if tty_name is non-NULL, try this one instead.
|
||||
*/
|
||||
|
||||
int get_console_fd(char* tty_name)
|
||||
{
|
||||
int fd;
|
||||
|
||||
if (tty_name)
|
||||
{
|
||||
if (-1 == (fd = open_a_console(tty_name)))
|
||||
return -1;
|
||||
else
|
||||
return fd;
|
||||
}
|
||||
|
||||
fd = open_a_console("/dev/tty");
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
|
||||
fd = open_a_console("/dev/tty0");
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
|
||||
fd = open_a_console("/dev/console");
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
|
||||
for (fd = 0; fd < 3; fd++)
|
||||
if (is_a_console(fd))
|
||||
return fd;
|
||||
|
||||
#if 0
|
||||
fprintf(stderr,
|
||||
_("Couldnt get a file descriptor referring to the console\n"));
|
||||
#endif
|
||||
return -1; /* total failure */
|
||||
}
|
||||
|
||||
|
||||
int is_pseudo_tty(int fd)
|
||||
{
|
||||
char *tty = ttyname(fd);
|
||||
|
||||
if (!tty)
|
||||
{
|
||||
if (!quiet)
|
||||
perror("ttyname");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strlen(tty) >= 9 && !strncmp(tty, "/dev/pts/", 9))
|
||||
return 1;
|
||||
|
||||
if (strlen(tty) >= 8 && !strncmp(tty, "/dev/tty", 8)
|
||||
&& tty[8] >= 'a' && tty[8] <= 'z')
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int clear_console(int fd)
|
||||
{
|
||||
int num, tmp_num;
|
||||
#if defined(__linux__)
|
||||
struct vt_stat vtstat;
|
||||
#endif
|
||||
|
||||
/* Linux console secure erase (since 2.6.39), this is sufficient there;
|
||||
other terminals silently ignore this code. If they don't and write junk
|
||||
instead, well, we're clearing the screen anyway.
|
||||
*/
|
||||
write(1, "\e[3J", 4);
|
||||
|
||||
/* clear screen */
|
||||
setupterm((char *) 0, 1, (int *) 0);
|
||||
if (tputs(clear_screen, lines > 0 ? lines : 1, putch) == ERR)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (is_pseudo_tty(STDIN_FILENO))
|
||||
return 0;
|
||||
|
||||
if (!strcmp(getenv("TERM"), "screen"))
|
||||
return 0;
|
||||
|
||||
/* get current vt */
|
||||
#if defined(__linux__)
|
||||
if (ioctl(fd, VT_GETSTATE, &vtstat) < 0)
|
||||
#elif defined(__FreeBSD_kernel__)
|
||||
if (ioctl(fd, VT_ACTIVATE, &num) < 0)
|
||||
#endif
|
||||
{
|
||||
if (!quiet)
|
||||
fprintf(stderr, "%s: cannot get VTstate\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
#if defined(__linux__)
|
||||
num = vtstat.v_active;
|
||||
#endif
|
||||
tmp_num = (num == 6 ? 5 : 6);
|
||||
|
||||
/* switch vt to clear the scrollback buffer */
|
||||
if (ioctl(fd, VT_ACTIVATE, tmp_num))
|
||||
{
|
||||
if (!quiet)
|
||||
perror("chvt: VT_ACTIVATE");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ioctl(fd, VT_WAITACTIVE, tmp_num))
|
||||
{
|
||||
if (!quiet)
|
||||
perror("VT_WAITACTIVE");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* switch back */
|
||||
if (ioctl(fd, VT_ACTIVATE, num))
|
||||
{
|
||||
if (!quiet)
|
||||
perror("chvt: VT_ACTIVATE");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ioctl(fd, VT_WAITACTIVE, num))
|
||||
{
|
||||
if (!quiet)
|
||||
perror("VT_WAITACTIVE");
|
||||
exit(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
int fd;
|
||||
int result; /* option handling */
|
||||
int an_option;
|
||||
|
||||
if ((progname = strrchr(argv[0], '/')) == NULL)
|
||||
progname = argv[0];
|
||||
else
|
||||
progname++;
|
||||
|
||||
while (1)
|
||||
{
|
||||
result = getopt_long(argc, argv, "Vhq", opts, &an_option);
|
||||
|
||||
if (result == EOF)
|
||||
break;
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case 'V':
|
||||
fprintf(stdout, "%s: Version %s\n", progname, VERSION);
|
||||
exit (0);
|
||||
case 'h':
|
||||
usage();
|
||||
exit (0);
|
||||
|
||||
case 'q':
|
||||
quiet = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
if (!quiet)
|
||||
fprintf(stderr, "%s: no non-option arguments are valid", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((fd = get_console_fd(NULL)) == -1)
|
||||
{
|
||||
if (!quiet)
|
||||
fprintf(stderr, "%s: terminal is not a console\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
clear_console(fd);
|
||||
|
||||
return 0;
|
||||
}
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
11
|
74
debian/control
vendored
Normal file
74
debian/control
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
Source: bash
|
||||
Section: base
|
||||
Priority: required
|
||||
Maintainer: Matthias Klose <doko@debian.org>
|
||||
Standards-Version: 4.7.2
|
||||
Build-Depends: autoconf, autotools-dev, bison, libncurses5-dev,
|
||||
texinfo, texi2html, debhelper (>= 11), gettext, sharutils,
|
||||
locales <!nocheck>, time <!nocheck>,
|
||||
xz-utils,
|
||||
Build-Depends-Indep: texlive-latex-base, ghostscript, texlive-fonts-recommended, man2html-base
|
||||
Build-Conflicts: r-base-core
|
||||
Homepage: http://tiswww.case.edu/php/chet/bash/bashtop.html
|
||||
#Vcs-Browser: https://code.launchpad.net/~doko/+junk/pkg-bash-debian
|
||||
#Vcs-Bzr: http://bazaar.launchpad.net/~doko/+junk/pkg-bash-debian
|
||||
Rules-Requires-Root: binary-targets
|
||||
|
||||
Package: bash
|
||||
Architecture: any
|
||||
Multi-Arch: foreign
|
||||
Pre-Depends: ${shlibs:Pre-Depends}, ${misc:Depends}
|
||||
Depends: base-files (>= 2.1.12), debianutils (>= 5.6-0.1)
|
||||
Recommends: bash-completion
|
||||
Suggests: bash-doc
|
||||
Essential: yes
|
||||
Section: shells
|
||||
Priority: required
|
||||
Description: GNU Bourne Again SHell
|
||||
Bash is an sh-compatible command language interpreter that executes
|
||||
commands read from the standard input or from a file. Bash also
|
||||
incorporates useful features from the Korn and C shells (ksh and csh).
|
||||
.
|
||||
Bash is ultimately intended to be a conformant implementation of the
|
||||
IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).
|
||||
.
|
||||
The Programmable Completion Code, by Ian Macdonald, is now found in
|
||||
the bash-completion package.
|
||||
|
||||
Package: bash-static
|
||||
Architecture: any
|
||||
Multi-Arch: foreign
|
||||
Depends: passwd (>= 1:4.0.3-10), debianutils (>= 5.6-0.1), ${misc:Depends}
|
||||
Suggests: bash-doc
|
||||
Section: shells
|
||||
Priority: optional
|
||||
Built-Using: ${glibc:Source}
|
||||
Description: GNU Bourne Again SHell (static version)
|
||||
Bash is an sh-compatible command language interpreter that executes
|
||||
commands read from the standard input or from a file. Bash also
|
||||
incorporates useful features from the Korn and C shells (ksh and csh).
|
||||
.
|
||||
Statically linked.
|
||||
|
||||
Package: bash-builtins
|
||||
Architecture: any
|
||||
Depends: bash (= ${binary:Version}), ${misc:Depends}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Description: Bash loadable builtins - headers & examples
|
||||
Bash can dynamically load new builtin commands. Included are the
|
||||
necessary headers to compile your own builtins and lots of examples.
|
||||
|
||||
Package: bash-doc
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}
|
||||
Section: doc
|
||||
Priority: optional
|
||||
Replaces: bash (<< 4.3-2)
|
||||
Description: Documentation and examples for the GNU Bourne Again SHell
|
||||
Bash is an sh-compatible command language interpreter that executes
|
||||
commands read from the standard input or from a file. Bash also
|
||||
incorporates useful features from the Korn and C shells (ksh and csh).
|
||||
.
|
||||
This package contains the distributable documentation, all the
|
||||
examples and the main changelog.
|
236
debian/copyright
vendored
Normal file
236
debian/copyright
vendored
Normal file
|
@ -0,0 +1,236 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Contact: chet@po.cwru.edu
|
||||
Comment:
|
||||
This is Debian GNU/Linux's prepackaged version of the FSF's GNU Bash,
|
||||
the Bourne Again SHell.
|
||||
.
|
||||
This package was put together by Matthias Klose <doko@debian.org>.
|
||||
Source:
|
||||
ftp.gnu.org:/pub/gnu/bash
|
||||
Files-Excluded:
|
||||
doc/FAQ
|
||||
doc/aosa-bash*.pdf
|
||||
doc/article.*
|
||||
doc/rose94.*
|
||||
|
||||
Files: *
|
||||
Copyright: (C) 1987-2022 Free Software Foundation, Inc.
|
||||
License: GPL-3+
|
||||
|
||||
Files: examples/shellmath/*
|
||||
Copyright: (c) 2020 by Michael Wood. All rights reserved.
|
||||
License: GPL-3+
|
||||
|
||||
Files: support/bash.xbm
|
||||
Copyright: (C) 1992 Simon Marshall
|
||||
License: GPL-3+
|
||||
|
||||
Files: support/checkbashisms
|
||||
Copyright:
|
||||
Copyright (C) 1998 Richard Braakman
|
||||
Copyright (C) 2002 Josip Rodin
|
||||
Copyright (C) 2003 Julian Gilbey
|
||||
License: GPL-3+
|
||||
|
||||
Files:
|
||||
tests/ifs-posix.tests
|
||||
tests/posix2.tests
|
||||
Copyright: (C) 2005 Glen Fowler
|
||||
Copyright (c) 1995 Stephen Gildea
|
||||
License: GPL-3+
|
||||
|
||||
License: GPL-3+
|
||||
Bash is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 3, or (at your option) any later
|
||||
version.
|
||||
.
|
||||
Bash is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
Comment:
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
version 3 can be found in `/usr/share/common-licenses/GPL-3'.
|
||||
|
||||
Files: y.tab.*
|
||||
Copyright: (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Inc.
|
||||
License: GPL-3+ with Bison exception
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
under terms of your choice, so long as that work isn't itself a
|
||||
parser generator using the skeleton or a modified version thereof
|
||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||
the parser skeleton itself, you may (at your option) remove this
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
.
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison.
|
||||
Comment:
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
version 3 can be found in `/usr/share/common-licenses/GPL-3'.
|
||||
|
||||
Files:
|
||||
examples/functions/array-stuff
|
||||
examples/functions/fstty
|
||||
examples/functions/func
|
||||
examples/functions/inetaddr
|
||||
examples/functions/isnum2
|
||||
examples/functions/ksh*
|
||||
examples/functions/notify.bash
|
||||
examples/functions/seq*
|
||||
examples/functions/sort-pos-params
|
||||
examples/functions/substr*
|
||||
examples/functions/substr2
|
||||
examples/functions/w*
|
||||
tests/complete.tests
|
||||
Copyright: 1992-2020 Chester Ramey
|
||||
License: GPL-2+
|
||||
|
||||
Files:
|
||||
debian/clear_console.c
|
||||
examples/complete/bash_completion
|
||||
Copyright:
|
||||
Copyright (C) 2006-2019 Canonical Ltd.
|
||||
Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
License: GPL-2+
|
||||
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
.
|
||||
TThis program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
Comment:
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
version 2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files:
|
||||
doc/bashref.texi
|
||||
lib/readline/doc/history.texi
|
||||
lib/readline/doc/rl*man.texi
|
||||
Copyright: (c) 1988-2022 Free Software Foundation, Inc.
|
||||
License: GFDL-NIV-1.3
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled
|
||||
``GNU Free Documentation License''.
|
||||
Comment:
|
||||
On Debian systems, the complete text of the GNU Free Documentation License
|
||||
version 1.3 can be found in `/usr/share/common-licenses/GFDL-1.3'.
|
||||
|
||||
Files:
|
||||
lib/readline/doc/rltech.texi
|
||||
lib/readline/doc/rluser.texi
|
||||
lib/readline/doc/hs*.texi
|
||||
Copyright: (C) 1988-2022 Free Software Foundation, Inc.
|
||||
License: Latex2e
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
pare preserved on all copies.
|
||||
.
|
||||
Permission is granted to process this file through TeX and print the
|
||||
results, provided the printed document carries copying permission
|
||||
notice identical to this one except for the removal of this paragraph
|
||||
(this paragraph not being relevant to the printed manual).
|
||||
.
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the entire
|
||||
resulting derived work is distributed under the terms of a permission
|
||||
notice identical to this one.
|
||||
.
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation approved
|
||||
by the Foundation.
|
||||
|
||||
Files: lib/sh/inet_aton.c
|
||||
Copyright:
|
||||
* Copyright (c) 1983, 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
License: BSD-4-clause-UC and MIT-like
|
||||
|
||||
License: BSD-4-clause-UC
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. <removed>
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
|
||||
License: MIT-like
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
|
||||
Files: support/man2html.c
|
||||
Copyright: Richard Verhoeven
|
||||
License: permissive
|
||||
* This program was written by Richard Verhoeven (NL:5482ZX35)
|
||||
* at the Eindhoven University of Technology. Email: rcb5@win.tue.nl
|
||||
*
|
||||
* Permission is granted to distribute, modify and use this program as long
|
||||
* as this comment is not removed or changed.
|
||||
*
|
||||
* THIS IS A MODIFIED VERSION. IT WAS MODIFIED BY chet@po.cwru.edu FOR
|
||||
* USE BY BASH.
|
58
debian/etc.bash.bashrc
vendored
Normal file
58
debian/etc.bash.bashrc
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
# System-wide .bashrc file for interactive bash(1) shells.
|
||||
|
||||
# To enable the settings / commands in this file for login shells as well,
|
||||
# this file has to be sourced in /etc/profile.
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[ -z "${PS1-}" ] && return
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(< /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, overwrite the one in /etc/profile)
|
||||
# but only if not SUDOing and have SUDO_PS1 set; then assume smart user.
|
||||
if ! [ -n "${SUDO_USER-}" -a -n "${SUDO_PS1-}" ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
|
||||
# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
#case "$TERM" in
|
||||
#xterm*|rxvt*)
|
||||
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
|
||||
# ;;
|
||||
#*)
|
||||
# ;;
|
||||
#esac
|
||||
|
||||
# enable bash completion in interactive shells
|
||||
#if ! shopt -oq posix; then
|
||||
# if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
# . /usr/share/bash-completion/bash_completion
|
||||
# elif [ -f /etc/bash_completion ]; then
|
||||
# . /etc/bash_completion
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# if the command-not-found package is installed, use it
|
||||
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
|
||||
function command_not_found_handle {
|
||||
# check because c-n-f could've been removed in the meantime
|
||||
if [ -x /usr/lib/command-not-found ]; then
|
||||
/usr/lib/command-not-found -- "$1"
|
||||
return $?
|
||||
elif [ -x /usr/share/command-not-found/command-not-found ]; then
|
||||
/usr/share/command-not-found/command-not-found -- "$1"
|
||||
return $?
|
||||
else
|
||||
printf "%s: command not found\n" "$1" >&2
|
||||
return 127
|
||||
fi
|
||||
}
|
||||
fi
|
17
debian/etc.inputrc
vendored
Normal file
17
debian/etc.inputrc
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# /etc/inputrc - global inputrc for libreadline
|
||||
# See readline(3readline) and `info readline' for more information.
|
||||
|
||||
# Be 8 bit clean.
|
||||
set input-meta on
|
||||
set output-meta on
|
||||
|
||||
# To allow the use of german 8bit-characters like the german umlauts, comment
|
||||
# out the two lines below. However this makes the meta key not work as a meta
|
||||
# key, which is annoying to those which don't need to type in 8-bit characters.
|
||||
|
||||
#set meta-flag on
|
||||
#set convert-meta off
|
||||
|
||||
# use a visible bell if one is available
|
||||
#set bell-style none
|
||||
#set bell-style visible
|
27
debian/etc.profile
vendored
Normal file
27
debian/etc.profile
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
|
||||
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
|
||||
|
||||
if [ -f /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
if [ "$PS1" ]; then
|
||||
if [ "$BASH" ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
if [ -f /etc/bash.bashrc ]; then
|
||||
. /etc/bash.bashrc
|
||||
fi
|
||||
else
|
||||
if [ "`id -u`" -eq 0 ]; then
|
||||
PS1='# '
|
||||
else
|
||||
PS1='$ '
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export PATH
|
||||
|
||||
umask 022
|
30
debian/inputrc.arrows
vendored
Normal file
30
debian/inputrc.arrows
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This file controls the behaviour of line input editing for
|
||||
# programs that use the Gnu Readline library.
|
||||
#
|
||||
# Arrow keys in keypad mode
|
||||
#
|
||||
"\C-[OD" backward-char
|
||||
"\C-[OC" forward-char
|
||||
"\C-[OA" previous-history
|
||||
"\C-[OB" next-history
|
||||
#
|
||||
# Arrow keys in ANSI mode
|
||||
#
|
||||
"\C-[[D" backward-char
|
||||
"\C-[[C" forward-char
|
||||
"\C-[[A" previous-history
|
||||
"\C-[[B" next-history
|
||||
#
|
||||
# Arrow keys in 8 bit keypad mode
|
||||
#
|
||||
"\C-M-OD" backward-char
|
||||
"\C-M-OC" forward-char
|
||||
"\C-M-OA" previous-history
|
||||
"\C-M-OB" next-history
|
||||
#
|
||||
# Arrow keys in 8 bit ANSI mode
|
||||
#
|
||||
"\C-M-[D" backward-char
|
||||
"\C-M-[C" forward-char
|
||||
"\C-M-[A" previous-history
|
||||
"\C-M-[B" next-history
|
30
debian/locale-gen
vendored
Normal file
30
debian/locale-gen
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
LOCPATH=`pwd`/locales
|
||||
export LOCPATH
|
||||
|
||||
[ -d $LOCPATH ] || mkdir -p $LOCPATH
|
||||
|
||||
umask 022
|
||||
|
||||
echo "Generating locales..."
|
||||
while read locale charset; do
|
||||
case $locale in \#*) continue;; esac
|
||||
[ -n "$locale" -a -n "$charset" ] || continue
|
||||
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"
|
||||
echo -n ".$charset"
|
||||
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`
|
||||
echo -n '...'
|
||||
if [ -f $LOCPATH/$locale ]; then
|
||||
input=$locale
|
||||
else
|
||||
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`
|
||||
fi
|
||||
localedef -i $input -c -f $charset $LOCPATH/$locale #-A /etc/locale.alias
|
||||
echo ' done'; \
|
||||
done <<EOF
|
||||
# This file lists locales that the bash testsuite depends on
|
||||
en_US.UTF-8 UTF-8
|
||||
EOF
|
||||
|
||||
echo "Generation complete."
|
28
debian/patches/bash-aliases-repeat.diff
vendored
Normal file
28
debian/patches/bash-aliases-repeat.diff
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
# DP: Fix bug in Bash_aliases example.
|
||||
|
||||
--- a/examples/startup-files/Bash_aliases
|
||||
+++ b/examples/startup-files/Bash_aliases
|
||||
@@ -41,20 +41,20 @@
|
||||
{
|
||||
local count="$1" i;
|
||||
shift;
|
||||
- for i in $(seq 1 "$count");
|
||||
+ for i in $(_seq 1 "$count");
|
||||
do
|
||||
eval "$@";
|
||||
done
|
||||
}
|
||||
|
||||
# Subfunction needed by `repeat'.
|
||||
-seq ()
|
||||
+_seq ()
|
||||
{
|
||||
local lower upper output;
|
||||
lower=$1 upper=$2;
|
||||
|
||||
if [ $lower -ge $upper ]; then return; fi
|
||||
- while [ $lower -le $upper ];
|
||||
+ while [ $lower -lt $upper ];
|
||||
do
|
||||
echo -n "$lower "
|
||||
lower=$(($lower + 1))
|
31
debian/patches/bash-default-editor.diff
vendored
Normal file
31
debian/patches/bash-default-editor.diff
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
# DP: Use `command -v editor`, as an editor, if available.
|
||||
|
||||
--- a/bashline.c
|
||||
+++ b/bashline.c
|
||||
@@ -936,8 +936,8 @@ hostnames_matching (text)
|
||||
command being entered (if no explicit argument is given), otherwise on
|
||||
a command from the history file. */
|
||||
|
||||
-#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\""
|
||||
-#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\""
|
||||
+#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo vi)}}\""
|
||||
+#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo emacs)}}\""
|
||||
#define POSIX_VI_EDIT_COMMAND "fc -e vi"
|
||||
|
||||
static int
|
||||
--- a/builtins/fc.def
|
||||
+++ b/builtins/fc.def
|
||||
@@ -171,11 +171,11 @@ set_verbose_flag ()
|
||||
}
|
||||
|
||||
/* String to execute on a file that we want to edit. */
|
||||
-#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}"
|
||||
+#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo vi)}}"
|
||||
#if defined (STRICT_POSIX)
|
||||
# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-ed}"
|
||||
#else
|
||||
-# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-ed}}"
|
||||
+# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo ed)}}"
|
||||
#endif
|
||||
|
||||
int
|
12
debian/patches/bashbug-editor.diff
vendored
Normal file
12
debian/patches/bashbug-editor.diff
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
# DP: send bug reports to Debian bash maintainer too.
|
||||
|
||||
--- a/support/bashbug.sh
|
||||
+++ b/support/bashbug.sh
|
||||
@@ -117,6 +117,7 @@
|
||||
esac ;;
|
||||
esac
|
||||
|
||||
+BUGBASH="${BUGBASH},bash@packages.debian.org"
|
||||
BUGADDR="${1-$BUGBASH}"
|
||||
|
||||
if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
|
52
debian/patches/deb-bash-config.diff
vendored
Normal file
52
debian/patches/deb-bash-config.diff
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
# DP: Changed compile time configuration options:
|
||||
# DP:
|
||||
# DP: - Set the default path to comply with Debian policy
|
||||
# DP:
|
||||
# DP: - Enable System-wide .bashrc file for interactive shells.
|
||||
# DP:
|
||||
# DP: - Enable System-wide .bash.logout file for interactive shells.
|
||||
# DP:
|
||||
# DP: - make non-interactive shells begun with argv[0][0] == '-'
|
||||
# DP: run the startup files when not in posix mode.
|
||||
# DP:
|
||||
# DP: - try to check whether bash is being run by sshd and source
|
||||
# DP: the .bashrc if so (like the rshd behavior).
|
||||
# DP:
|
||||
# DP: - don't define a default DEFAULT_MAIL_DIRECTORY, because it
|
||||
# DP: can cause a timeout on NFS mounts.
|
||||
|
||||
--- a/config-bot.h
|
||||
+++ b/config-bot.h
|
||||
@@ -204,4 +204,4 @@
|
||||
/******************************************************************/
|
||||
|
||||
/* If you don't want bash to provide a default mail file to check. */
|
||||
-/* #undef DEFAULT_MAIL_DIRECTORY */
|
||||
+#undef DEFAULT_MAIL_DIRECTORY
|
||||
--- a/config-top.h
|
||||
+++ b/config-top.h
|
||||
@@ -97,20 +97,20 @@
|
||||
#define DEFAULT_BASHRC "~/.bashrc"
|
||||
|
||||
/* System-wide .bashrc file for interactive shells. */
|
||||
-/* #define SYS_BASHRC "/etc/bash.bashrc" */
|
||||
+#define SYS_BASHRC "/etc/bash.bashrc"
|
||||
|
||||
/* System-wide .bash_logout for login shells. */
|
||||
-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
|
||||
+#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
|
||||
|
||||
/* Define this to make non-interactive shells begun with argv[0][0] == '-'
|
||||
run the startup files when not in posix mode. */
|
||||
-/* #define NON_INTERACTIVE_LOGIN_SHELLS */
|
||||
+#define NON_INTERACTIVE_LOGIN_SHELLS
|
||||
|
||||
/* Define this if you want bash to try to check whether it's being run by
|
||||
sshd and source the .bashrc if so (like the rshd behavior). This checks
|
||||
for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment,
|
||||
which can be fooled under certain not-uncommon circumstances. */
|
||||
-/* #define SSH_SOURCE_BASHRC */
|
||||
+#define SSH_SOURCE_BASHRC
|
||||
|
||||
/* Define if you want the case-toggling operators (~[~]) and the
|
||||
`capcase' variable attribute (declare -c). */
|
14
debian/patches/deb-examples.diff
vendored
Normal file
14
debian/patches/deb-examples.diff
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
# DP: document readline header location on Debian systems
|
||||
|
||||
--- a/examples/loadables/README
|
||||
+++ b/examples/loadables/README
|
||||
@@ -40,6 +40,9 @@ rest of the example builtins. It's inten
|
||||
that can be modified or included to help you build your own loadables
|
||||
without having to search for the right CFLAGS and LDFLAGS.
|
||||
|
||||
+On Debian GNU/Linux systems, the bash headers are in /usr/include/bash.
|
||||
+The appropriate options are already set in the example Makefile.
|
||||
+
|
||||
basename.c Return non-directory portion of pathname.
|
||||
cat.c cat(1) replacement with no options - the way cat was intended.
|
||||
csv.c Process a line of csv data and store it in an indexed array.
|
25
debian/patches/exec-redirections-doc.diff
vendored
Normal file
25
debian/patches/exec-redirections-doc.diff
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -4121,6 +4121,10 @@ A failure to open or create a file cause
|
||||
Redirections using file descriptors greater than 9 should be used with
|
||||
care, as they may conflict with file descriptors the shell uses
|
||||
internally.
|
||||
+.PP
|
||||
+Note that the
|
||||
+.B exec
|
||||
+builtin command can make redirections take effect in the current shell.
|
||||
.SS Redirecting Input
|
||||
Redirection of input causes the file whose name results from
|
||||
the expansion of
|
||||
--- a/doc/bashref.texi
|
||||
+++ b/doc/bashref.texi
|
||||
@@ -3044,6 +3044,9 @@ Redirections using file descriptors grea
|
||||
care, as they may conflict with file descriptors the shell uses
|
||||
internally.
|
||||
|
||||
+Note that the @code{exec} builtin command can make redirections take
|
||||
+effect in the current shell.
|
||||
+
|
||||
@subsection Redirecting Input
|
||||
Redirection of input causes the file whose name results from
|
||||
the expansion of @var{word}
|
125
debian/patches/fix-rl_do_undo-crash.diff
vendored
Normal file
125
debian/patches/fix-rl_do_undo-crash.diff
vendored
Normal file
|
@ -0,0 +1,125 @@
|
|||
https://git.savannah.gnu.org/cgit/bash.git/patch/?id=277c21d2b2c6730f6cbda428180b08bacdcecc80
|
||||
|
||||
From 277c21d2b2c6730f6cbda428180b08bacdcecc80 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Mon, 6 Mar 2023 10:50:45 -0500
|
||||
Subject: readline fix for rl_undo_list pointer aliasing; arith command sets
|
||||
word_top
|
||||
|
||||
--- a/lib/readline/histlib.h
|
||||
+++ b/lib/readline/histlib.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/* histlib.h -- internal definitions for the history library. */
|
||||
|
||||
-/* Copyright (C) 1989-2009,2021-2022 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1989-2009,2021-2023 Free Software Foundation, Inc.
|
||||
|
||||
This file contains the GNU History Library (History), a set of
|
||||
routines for managing the text of previously typed lines.
|
||||
@@ -84,6 +84,7 @@ extern int _hs_history_patsearch (const
|
||||
|
||||
/* history.c */
|
||||
extern void _hs_replace_history_data (int, histdata_t *, histdata_t *);
|
||||
+extern int _hs_search_history_data (histdata_t *);
|
||||
extern int _hs_at_end_of_history (void);
|
||||
|
||||
/* histfile.c */
|
||||
--- a/lib/readline/history.c
|
||||
+++ b/lib/readline/history.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* history.c -- standalone history library */
|
||||
|
||||
-/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1989-2023 Free Software Foundation, Inc.
|
||||
|
||||
This file contains the GNU History Library (History), a set of
|
||||
routines for managing the text of previously typed lines.
|
||||
@@ -460,7 +460,7 @@ _hs_replace_history_data (int which, his
|
||||
}
|
||||
|
||||
last = -1;
|
||||
- for (i = 0; i < history_length; i++)
|
||||
+ for (i = history_length - 1; i >= 0; i--)
|
||||
{
|
||||
entry = the_history[i];
|
||||
if (entry == 0)
|
||||
@@ -477,7 +477,27 @@ _hs_replace_history_data (int which, his
|
||||
entry = the_history[last];
|
||||
entry->data = new; /* XXX - we don't check entry->old */
|
||||
}
|
||||
-}
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+_hs_search_history_data (histdata_t *needle)
|
||||
+{
|
||||
+ register int i;
|
||||
+ HIST_ENTRY *entry;
|
||||
+
|
||||
+ if (history_length == 0 || the_history == 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ for (i = history_length - 1; i >= 0; i--)
|
||||
+ {
|
||||
+ entry = the_history[i];
|
||||
+ if (entry == 0)
|
||||
+ continue;
|
||||
+ if (entry->data == needle)
|
||||
+ return i;
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
|
||||
/* Remove history element WHICH from the history. The removed
|
||||
element is returned to you so you can free the line, data,
|
||||
--- a/lib/readline/misc.c
|
||||
+++ b/lib/readline/misc.c
|
||||
@@ -339,6 +339,9 @@ rl_maybe_replace_line (void)
|
||||
xfree (temp->line);
|
||||
FREE (temp->timestamp);
|
||||
xfree (temp);
|
||||
+ /* XXX - what about _rl_saved_line_for_history? if the saved undo list
|
||||
+ is rl_undo_list, and we just put that into a history entry, should
|
||||
+ we set the saved undo list to NULL? */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -386,14 +389,16 @@ _rl_free_saved_history_line (void)
|
||||
|
||||
if (_rl_saved_line_for_history)
|
||||
{
|
||||
- if (rl_undo_list && rl_undo_list == (UNDO_LIST *)_rl_saved_line_for_history->data)
|
||||
- rl_undo_list = 0;
|
||||
- /* Have to free this separately because _rl_free_history entry can't:
|
||||
- it doesn't know whether or not this has application data. Only the
|
||||
- callers that know this is _rl_saved_line_for_history can know that
|
||||
- it's an undo list. */
|
||||
- if (_rl_saved_line_for_history->data)
|
||||
- _rl_free_undo_list ((UNDO_LIST *)_rl_saved_line_for_history->data);
|
||||
+ UNDO_LIST *sentinel;
|
||||
+
|
||||
+ sentinel = (UNDO_LIST *)_rl_saved_line_for_history->data;
|
||||
+
|
||||
+ /* We should only free `data' if it's not the current rl_undo_list and
|
||||
+ it's not the `data' member in a history entry somewhere. We have to
|
||||
+ free it separately because only the callers know it's an undo list. */
|
||||
+ if (sentinel && sentinel != rl_undo_list && _hs_search_history_data ((histdata_t *)sentinel) < 0)
|
||||
+ _rl_free_undo_list (sentinel);
|
||||
+
|
||||
_rl_free_history_entry (_rl_saved_line_for_history);
|
||||
_rl_saved_line_for_history = (HIST_ENTRY *)NULL;
|
||||
}
|
||||
--- a/lib/readline/search.c
|
||||
+++ b/lib/readline/search.c
|
||||
@@ -88,8 +88,10 @@ make_history_line_current (HIST_ENTRY *e
|
||||
|
||||
xlist = _rl_saved_line_for_history ? (UNDO_LIST *)_rl_saved_line_for_history->data : 0;
|
||||
/* At this point, rl_undo_list points to a private search string list. */
|
||||
- if (rl_undo_list && rl_undo_list != (UNDO_LIST *)entry->data && rl_undo_list != xlist)
|
||||
+ if (rl_undo_list && rl_undo_list != (UNDO_LIST *)entry->data && rl_undo_list != xlist &&
|
||||
+ _hs_search_history_data ((histdata_t *)rl_undo_list) < 0)
|
||||
rl_free_undo_list ();
|
||||
+ rl_undo_list = 0; /* XXX */
|
||||
|
||||
/* Now we create a new undo list with a single insert for this text.
|
||||
WE DON'T CHANGE THE ORIGINAL HISTORY ENTRY UNDO LIST */
|
15
debian/patches/input-err.diff
vendored
Normal file
15
debian/patches/input-err.diff
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
# DP: Define PGRP_PIPE to avoid race condition.
|
||||
|
||||
Index: b/input.c
|
||||
===================================================================
|
||||
--- a/input.c
|
||||
+++ b/input.c
|
||||
@@ -517,7 +517,7 @@ b_fill_buffer (bp)
|
||||
if (nr == 0)
|
||||
bp->b_flag |= B_EOF;
|
||||
else
|
||||
- bp->b_flag |= B_ERROR;
|
||||
+ fatal_error("error reading input file: %s", strerror(errno));
|
||||
return (EOF);
|
||||
}
|
||||
|
14
debian/patches/man-arithmetic.diff
vendored
Normal file
14
debian/patches/man-arithmetic.diff
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
# DP: document deprecated syntax for arithmetic evaluation.
|
||||
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -3580,6 +3580,9 @@ and the substitution of the result. The
|
||||
\fB$((\fP\fIexpression\fP\fB))\fP
|
||||
.RE
|
||||
.PP
|
||||
+The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will
|
||||
+be removed in upcoming versions of bash.
|
||||
+.PP
|
||||
The
|
||||
.I expression
|
||||
undergoes the same expansions
|
14
debian/patches/man-bashlogout.diff
vendored
Normal file
14
debian/patches/man-bashlogout.diff
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
# DP: document /etc/bash.bashrc in bash man page
|
||||
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -11576,6 +11576,9 @@ The systemwide initialization file, exec
|
||||
.FN /etc/bash.bashrc
|
||||
The systemwide per-interactive-shell startup file
|
||||
.TP
|
||||
+.FN /etc/bash.bash.logout
|
||||
+The systemwide login shell cleanup file, executed when a login shell exits
|
||||
+.TP
|
||||
.FN ~/.bash_profile
|
||||
The personal initialization file, executed for login shells
|
||||
.TP
|
65
debian/patches/man-bashrc.diff
vendored
Normal file
65
debian/patches/man-bashrc.diff
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
# DP: document /etc/bash.bashrc in bash man page
|
||||
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -187,7 +187,9 @@ Display a usage message on standard outp
|
||||
.PD
|
||||
Execute commands from
|
||||
.I file
|
||||
-instead of the standard personal initialization file
|
||||
+instead of the system wide initialization file
|
||||
+.I /etc/bash.bashrc
|
||||
+and the standard personal initialization file
|
||||
.I ~/.bashrc
|
||||
if the shell is interactive (see
|
||||
.SM
|
||||
@@ -218,7 +220,9 @@ reads these files when it is invoked as
|
||||
below).
|
||||
.TP
|
||||
.B \-\-norc
|
||||
-Do not read and execute the personal initialization file
|
||||
+Do not read and execute the system wide initialization file
|
||||
+.I /etc/bash.bashrc
|
||||
+and the personal initialization file
|
||||
.I ~/.bashrc
|
||||
if the shell is interactive.
|
||||
This option is on by default if the shell is invoked as
|
||||
@@ -333,13 +337,15 @@ exists.
|
||||
.PP
|
||||
When an interactive shell that is not a login shell is started,
|
||||
.B bash
|
||||
-reads and executes commands from \fI~/.bashrc\fP, if that file exists.
|
||||
+reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP,
|
||||
+if these files exist.
|
||||
This may be inhibited by using the
|
||||
.B \-\-norc
|
||||
option.
|
||||
The \fB\-\-rcfile\fP \fIfile\fP option will force
|
||||
.B bash
|
||||
-to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP.
|
||||
+to read and execute commands from \fIfile\fP instead of
|
||||
+\fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP.
|
||||
.PP
|
||||
When
|
||||
.B bash
|
||||
@@ -426,8 +432,8 @@ or the secure shell daemon \fIsshd\fP.
|
||||
If
|
||||
.B bash
|
||||
determines it is being run non-interactively in this fashion,
|
||||
-it reads and executes commands from \fI~/.bashrc\fP,
|
||||
-if that file exists and is readable.
|
||||
+it reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP,
|
||||
+if these files exist and are readable.
|
||||
It will not do this if invoked as \fBsh\fP.
|
||||
The
|
||||
.B \-\-norc
|
||||
@@ -11581,6 +11587,9 @@ The \fBbash\fP executable
|
||||
.FN /etc/profile
|
||||
The systemwide initialization file, executed for login shells
|
||||
.TP
|
||||
+.FN /etc/bash.bashrc
|
||||
+The systemwide per-interactive-shell startup file
|
||||
+.TP
|
||||
.FN ~/.bash_profile
|
||||
The personal initialization file, executed for login shells
|
||||
.TP
|
15
debian/patches/man-fignore.diff
vendored
Normal file
15
debian/patches/man-fignore.diff
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
# DP: bash(1): mention quoting when assigning to FIGNORE
|
||||
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -2220,7 +2220,9 @@ A filename whose suffix matches one of t
|
||||
is excluded from the list of matched filenames.
|
||||
A sample value is
|
||||
.if t \f(CW".o:~"\fP.
|
||||
-.if n ".o:~".
|
||||
+.if n ".o:~"
|
||||
+(Quoting is needed when assigning a value to this variable,
|
||||
+which contains tildes).
|
||||
.TP
|
||||
.B FUNCNEST
|
||||
If set to a numeric value greater than 0, defines a maximum function
|
53
debian/patches/man-macro-warnings.diff
vendored
Normal file
53
debian/patches/man-macro-warnings.diff
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
# DP: Move definition of the macro "FN" out of the region of the "ig"
|
||||
# DP: macro. Define macros and registers "zZ" and "zY".
|
||||
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -8,6 +8,22 @@
|
||||
.\" Last Change: Mon Sep 19 11:13:21 EDT 2022
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
+.de zZ
|
||||
+..
|
||||
+.de zY
|
||||
+..
|
||||
+.\"
|
||||
+.\" File Name macro. This used to be `.PN', for Path Name,
|
||||
+.\" but Sun doesn't seem to like that very much.
|
||||
+.\"
|
||||
+.de FN
|
||||
+\fI\|\\$1\|\fP
|
||||
+..
|
||||
+.\" Number register zZ is defined in bash-builtins(7)
|
||||
+.\" Number register zY is defined in rbash(1)
|
||||
+.\" This man-page is included in them
|
||||
+.if !rzZ .nr zZ 0 \" avoid a warning about an undefined register
|
||||
+.if !rzY .nr zY 0 \" avoid a warning about an undefined register
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2022 September 19" "GNU Bash 5.2"
|
||||
@@ -36,13 +52,6 @@
|
||||
.\" .el \\*(]X\h|\\n()Iu+\\n()Ru\c
|
||||
.\" .}f
|
||||
.\" ..
|
||||
-.\"
|
||||
-.\" File Name macro. This used to be `.PN', for Path Name,
|
||||
-.\" but Sun doesn't seem to like that very much.
|
||||
-.\"
|
||||
-.de FN
|
||||
-\fI\|\\$1\|\fP
|
||||
-..
|
||||
.SH NAME
|
||||
bash \- GNU Bourne-Again SHell
|
||||
.SH SYNOPSIS
|
||||
@@ -2530,8 +2539,8 @@ and is set by the administrator who inst
|
||||
.BR bash .
|
||||
A common value is
|
||||
.na
|
||||
-.if t \f(CW/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin\fP.
|
||||
-.if n ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''.
|
||||
+.if t \f(CW/usr/local/bin:\:/usr/local/sbin:\:/usr/bin:\:/usr/sbin:\:/bin:\:/sbin\fP.
|
||||
+.if n ``/usr/local/bin:\:/usr/local/sbin:\:/usr/bin:\:/usr/sbin:\:/bin:\:/sbin''.
|
||||
.ad
|
||||
.TP
|
||||
.B POSIXLY_CORRECT
|
15
debian/patches/man-nocaseglob.diff
vendored
Normal file
15
debian/patches/man-nocaseglob.diff
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
# DP: Clarify documentation about case-insensitive pathname expansion
|
||||
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -3754,6 +3754,10 @@ If the shell option
|
||||
.B nocaseglob
|
||||
is enabled, the match is performed without regard to the case
|
||||
of alphabetic characters.
|
||||
+Note that when using range expressions like
|
||||
+[a-z] (see below), letters of the other case may be included,
|
||||
+depending on the setting of
|
||||
+.B LC_COLLATE.
|
||||
When a pattern is used for pathname expansion,
|
||||
the character
|
||||
.B ``.''
|
17
debian/patches/man-test.diff
vendored
Normal file
17
debian/patches/man-test.diff
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# DP: document conditional file expressions acting on the target of
|
||||
# DP: symbolic links as well (except -h, -L).
|
||||
|
||||
Index: b/builtins/test.def
|
||||
===================================================================
|
||||
--- a/builtins/test.def
|
||||
+++ b/builtins/test.def
|
||||
@@ -64,6 +64,9 @@ File operators:
|
||||
|
||||
FILE1 -ef FILE2 True if file1 is a hard link to file2.
|
||||
|
||||
+All file operators except -h and -L are acting on the target of a symbolic
|
||||
+link, not on the symlink itself, if FILE is a symbolic link.
|
||||
+
|
||||
String operators:
|
||||
|
||||
-z STRING True if string is empty.
|
40
debian/patches/man-test2.diff
vendored
Normal file
40
debian/patches/man-test2.diff
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
# DP: Document handling of parameters of the test builtin.
|
||||
|
||||
--- a/builtins/test.def
|
||||
+++ b/builtins/test.def
|
||||
@@ -100,6 +100,9 @@ Arithmetic binary operators return true
|
||||
less-than, less-than-or-equal, greater-than, or greater-than-or-equal
|
||||
than ARG2.
|
||||
|
||||
+See the bash manual page bash(1) for the handling of parameters (i.e.
|
||||
+missing parameters).
|
||||
+
|
||||
Exit Status:
|
||||
Returns success if EXPR evaluates to true; fails if EXPR evaluates to
|
||||
false or an invalid argument is given.
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -732,6 +732,10 @@ as primaries.
|
||||
.if n .sp 1
|
||||
When used with \fB[[\fP, the \fB<\fP and \fB>\fP operators sort
|
||||
lexicographically using the current locale.
|
||||
+.PP
|
||||
+See the description of the \fItest\fP builtin command (section SHELL
|
||||
+BUILTIN COMMANDS below) for the handling of parameters (i.e.
|
||||
+missing parameters).
|
||||
.if t .sp 0.5
|
||||
.if n .sp 1
|
||||
When the \fB==\fP and \fB!=\fP operators are used, the string to the
|
||||
--- a/doc/bashref.texi
|
||||
+++ b/doc/bashref.texi
|
||||
@@ -7322,6 +7322,10 @@ The @code{test} command uses ASCII order
|
||||
Unless otherwise specified, primaries that operate on files follow symbolic
|
||||
links and operate on the target of the link, rather than the link itself.
|
||||
|
||||
+See the description of the @code{test} builtin command (section
|
||||
+@pxref{Bash Builtins} below) for the handling of parameters
|
||||
+(i.e. missing parameters).
|
||||
+
|
||||
@table @code
|
||||
@item -a @var{file}
|
||||
True if @var{file} exists.
|
19
debian/patches/man-vx-opts.diff
vendored
Normal file
19
debian/patches/man-vx-opts.diff
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# DP: document -v / -x options
|
||||
|
||||
Index: b/doc/bash.1
|
||||
===================================================================
|
||||
--- a/doc/bash.1
|
||||
+++ b/doc/bash.1
|
||||
@@ -131,6 +131,12 @@ This option allows the positional parame
|
||||
when invoking an interactive shell or when reading input
|
||||
through a pipe.
|
||||
.TP
|
||||
+.B \-v
|
||||
+Print shell input lines as they are read.
|
||||
+.TP
|
||||
+.B \-x
|
||||
+Print commands and their arguments as they are executed.
|
||||
+.TP
|
||||
.B \-D
|
||||
A list of all double-quoted strings preceded by \fB$\fP
|
||||
is printed on the standard output.
|
47
debian/patches/no-brk-caching.diff
vendored
Normal file
47
debian/patches/no-brk-caching.diff
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
# DP: Don't cache the value of brk between sbrk calls.
|
||||
|
||||
--- a/lib/malloc/malloc.c
|
||||
+++ b/lib/malloc/malloc.c
|
||||
@@ -227,8 +227,6 @@
|
||||
static int pagebucket; /* bucket for requests a page in size */
|
||||
static int maxbuck; /* highest bucket receiving allocation request. */
|
||||
|
||||
-static char *memtop; /* top of heap */
|
||||
-
|
||||
static const unsigned long binsizes[NBUCKETS] = {
|
||||
8UL, 16UL, 32UL, 64UL, 128UL, 256UL, 512UL, 1024UL, 2048UL, 4096UL,
|
||||
8192UL, 16384UL, 32768UL, 65536UL, 131072UL, 262144UL, 524288UL,
|
||||
@@ -538,7 +536,6 @@
|
||||
siz = binsize (nu);
|
||||
/* Should check for errors here, I guess. */
|
||||
sbrk (-siz);
|
||||
- memtop -= siz;
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nsbrk++;
|
||||
@@ -633,8 +630,6 @@
|
||||
if ((long)mp == -1)
|
||||
goto morecore_done;
|
||||
|
||||
- memtop += sbrk_amt;
|
||||
-
|
||||
/* shouldn't happen, but just in case -- require 8-byte alignment */
|
||||
if ((long)mp & MALIGN_MASK)
|
||||
{
|
||||
@@ -684,7 +679,7 @@
|
||||
Some of this partial page will be wasted space, but we'll use as
|
||||
much as we can. Once we figure out how much to advance the break
|
||||
pointer, go ahead and do it. */
|
||||
- memtop = curbrk = sbrk (0);
|
||||
+ curbrk = sbrk (0);
|
||||
sbrk_needed = pagesz - ((long)curbrk & (pagesz - 1)); /* sbrk(0) % pagesz */
|
||||
if (sbrk_needed < 0)
|
||||
sbrk_needed += pagesz;
|
||||
@@ -699,7 +694,6 @@
|
||||
curbrk = sbrk (sbrk_needed);
|
||||
if ((long)curbrk == -1)
|
||||
return -1;
|
||||
- memtop += sbrk_needed;
|
||||
|
||||
/* Take the memory which would otherwise be wasted and populate the most
|
||||
popular bin (2 == 32 bytes) with it. Add whatever we need to curbrk
|
12
debian/patches/rbash-manpage.diff
vendored
Normal file
12
debian/patches/rbash-manpage.diff
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
# DP: doc/rbash.1: fix bash(1) reference
|
||||
|
||||
--- a/doc/rbash.1
|
||||
+++ b/doc/rbash.1
|
||||
@@ -3,6 +3,6 @@
|
||||
rbash \- restricted bash, see \fBbash\fR(1)
|
||||
.SH RESTRICTED SHELL
|
||||
.nr zY 1
|
||||
-.so bash.1
|
||||
+.so man1/bash.1
|
||||
.SH SEE ALSO
|
||||
bash(1)
|
20
debian/patches/series
vendored
Normal file
20
debian/patches/series
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
bashbug-editor.diff
|
||||
deb-bash-config.diff
|
||||
deb-examples.diff
|
||||
man-arithmetic.diff
|
||||
man-fignore.diff
|
||||
man-bashrc.diff
|
||||
man-bashlogout.diff
|
||||
man-nocaseglob.diff
|
||||
man-test.diff
|
||||
man-test2.diff
|
||||
rbash-manpage.diff
|
||||
bash-default-editor.diff
|
||||
input-err.diff
|
||||
exec-redirections-doc.diff
|
||||
bash-aliases-repeat.diff
|
||||
# no-brk-caching.diff
|
||||
use-system-texi2html.diff
|
||||
man-macro-warnings.diff
|
||||
man-vx-opts.diff
|
||||
fix-rl_do_undo-crash.diff
|
13
debian/patches/use-system-texi2html.diff
vendored
Normal file
13
debian/patches/use-system-texi2html.diff
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- a/doc/Makefile.in
|
||||
+++ b/doc/Makefile.in
|
||||
@@ -70,8 +70,8 @@ TEXINDEX = texindex
|
||||
TEX = tex
|
||||
|
||||
MAKEINFO = makeinfo
|
||||
-TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi
|
||||
-TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html
|
||||
+TEXI2DVI = texi2dvi
|
||||
+TEXI2HTML = texi2html
|
||||
MAN2HTML = ${BUILD_DIR}/support/man2html
|
||||
HTMLPOST = ${srcdir}/htmlpost.sh
|
||||
QUIETPS = #set this to -q to shut up dvips
|
453
debian/rules
vendored
Executable file
453
debian/rules
vendored
Executable file
|
@ -0,0 +1,453 @@
|
|||
#! /usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
unexport LANG LC_ALL LC_CTYPE LC_COLLATE LC_TIME LC_NUMERIC LC_MESSAGES
|
||||
|
||||
# architecture dependent variables
|
||||
vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1)))
|
||||
DPKG_VARS := $(shell dpkg-architecture)
|
||||
DEB_BUILD_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE)
|
||||
DEB_HOST_ARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH)
|
||||
DEB_HOST_ARCH_OS ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH_OS)
|
||||
DEB_HOST_GNU_CPU ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_CPU)
|
||||
DEB_HOST_GNU_SYSTEM ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_SYSTEM)
|
||||
DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE)
|
||||
DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH)
|
||||
|
||||
VERSION := 4.2
|
||||
#PKGVERSION := $(shell dpkg-parsechangelog \
|
||||
# | sed -n '/Version:/s/\(.* \)\(.*\)-2\(.*\)/\2\3/p')
|
||||
#PKGVERSION := 3.0
|
||||
#dpkg_ctrl_args := -v$(PKGVERSION) -VBinary-Version=$(PKGVERSION)
|
||||
|
||||
with_gfdl = yes
|
||||
|
||||
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
|
||||
CC = $(DEB_HOST_GNU_TYPE)-gcc
|
||||
else
|
||||
CC = gcc
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
STRIP = :
|
||||
else
|
||||
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
|
||||
STRIP = $(DEB_HOST_GNU_TYPE)-strip
|
||||
else
|
||||
STRIP = strip
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS="hardening=+all" DEB_CFLAGS_MAINT_APPEND="-Wall" dpkg-buildflags
|
||||
CFLAGS := $(shell $(dpkg_buildflags) --get CFLAGS)
|
||||
CPPFLAGS := $(shell $(dpkg_buildflags) --get CPPFLAGS)
|
||||
LDFLAGS := $(shell $(dpkg_buildflags) --get LDFLAGS)
|
||||
|
||||
SHELL = /bin/bash
|
||||
YACC = bison -y
|
||||
|
||||
IX = install -o 0 -g 0
|
||||
ID = install -o 0 -g 0 -m 644
|
||||
|
||||
# built with installed libreadline?
|
||||
with_installed_rl = no
|
||||
|
||||
debflags =
|
||||
|
||||
p = bash
|
||||
p_stat = bash-static
|
||||
p_bins = bash-builtins
|
||||
p_doc = bash-doc
|
||||
|
||||
d = debian/$(p)
|
||||
d_stat = debian/$(p_stat)
|
||||
d_bins = debian/$(p_bins)
|
||||
d_doc = debian/$(p_doc)
|
||||
|
||||
termcap_lib := $(if $(wildcard /usr/lib/libtinfo.so /usr/lib/$(DEB_HOST_MULTIARCH)/libtinfo.so), \
|
||||
-ltinfo, \
|
||||
-lncurses)
|
||||
|
||||
conf_args = \
|
||||
--enable-largefile \
|
||||
--prefix=/usr \
|
||||
--infodir=/usr/share/info \
|
||||
--mandir=/usr/share/man \
|
||||
--without-bash-malloc
|
||||
ifeq ($(with_installed_rl),yes)
|
||||
conf_args += --with-installed-readline
|
||||
endif
|
||||
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
|
||||
conf_args += --build $(DEB_HOST_GNU_TYPE)
|
||||
else
|
||||
conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
|
||||
endif
|
||||
|
||||
static_conf_args := $(conf_args) \
|
||||
--enable-static-link \
|
||||
|
||||
#build: bash-build static-build check
|
||||
build: stamps/before-build bash-build static-build check
|
||||
build-arch: build
|
||||
build-indep: build
|
||||
|
||||
stamps/before-build:
|
||||
dh_testdir
|
||||
# dh_update_autotools_config
|
||||
dh_autotools-dev_updateconfig
|
||||
mkdir -p stamps
|
||||
: # see #327477, needed to have HAVE_DEV_STDIN defined
|
||||
(test -d /dev/fd && test -r /dev/stdin < /dev/null) \
|
||||
|| (test -d /proc/self/fd && test -r /dev/stdin < /dev/null)
|
||||
ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux freebsd))
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o clear_console \
|
||||
debian/clear_console.c $(termcap_lib)
|
||||
endif
|
||||
touch $@
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# build standard bash
|
||||
|
||||
bash-build:
|
||||
$(MAKE) -f debian/rules do-build-bash \
|
||||
bash_src=. \
|
||||
build=bash \
|
||||
configure_args="$(conf_args)"
|
||||
bash-configure: stamps/before-build
|
||||
$(MAKE) -f debian/rules do-configure-bash \
|
||||
bash_src=. \
|
||||
build=bash \
|
||||
configure_args="$(conf_args)"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# build static bash
|
||||
|
||||
static-build:
|
||||
$(MAKE) -f debian/rules do-build-static \
|
||||
bash_src=. \
|
||||
build=static \
|
||||
configure_args="$(static_conf_args)"
|
||||
static-configure: stamps/before-build
|
||||
$(MAKE) -f debian/rules do-configure-static \
|
||||
bash_src=. \
|
||||
build=static \
|
||||
configure_args="$(static_conf_args)"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
bash-doc-build: stamps/stamp-build-bash-doc
|
||||
stamps/stamp-build-bash-doc:
|
||||
rm -fr doc/bash.info doc/bash.pdf doc/bash.html doc/bashref.info doc/bashref.pdf doc/bashref.html
|
||||
$(MAKE) -C build-bash/doc info html MAN2HTML=/usr/bin/man2html
|
||||
$(MAKE) -C build-bash/doc bash.pdf bashref.pdf
|
||||
touch stamps/stamp-build-bash-doc
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
check: stamps/stamp-check
|
||||
stamps/stamp-check: bash-build
|
||||
@echo BEGIN test
|
||||
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
|
||||
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
|
||||
-sh debian/locale-gen
|
||||
LOCPATH=$(CURDIR)/locales \
|
||||
time $(MAKE) -C build-bash test 2>&1 | tee build-bash/test-protocol
|
||||
endif
|
||||
else
|
||||
@echo Suppress 'make' test, because this is cross build
|
||||
endif
|
||||
@echo END test
|
||||
touch stamps/stamp-check
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -rf stamps build-*
|
||||
rm -f debian/README.Debian
|
||||
rm -rf locales
|
||||
rm -f clear_console
|
||||
rm -fr doc/bash.info doc/bash.pdf doc/bash.html doc/bashref.info doc/bashref.pdf doc/bashref.html
|
||||
dh_autotools-dev_restoreconfig
|
||||
dh_clean
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
install: bash-install
|
||||
|
||||
bash-install: bash-build stamps/stamp-install-bash
|
||||
stamps/stamp-install-bash: stamps/before-build stamps/stamp-build-bash
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep -p$(p) -p$(p_doc) -p$(p_bins)
|
||||
dh_installdirs -p$(p) \
|
||||
usr/bin \
|
||||
etc/skel \
|
||||
usr/share/doc/$(p)
|
||||
dh_installdirs -p$(p_doc) \
|
||||
usr/share/doc/$(p)
|
||||
dh_installdirs -p$(p_bins) \
|
||||
usr/share/doc/$(p)/examples/loadables
|
||||
|
||||
ifeq ($(with_gfdl),yes)
|
||||
# XXXXX
|
||||
# cp -p build-bash/doc/*.info bash/doc/
|
||||
endif
|
||||
|
||||
: # install it
|
||||
$(MAKE) -C build-bash install \
|
||||
YACC="$(YACC)" \
|
||||
DESTDIR=$(CURDIR)/$(d)
|
||||
chmod 755 $(d)/usr/bin/bashbug
|
||||
$(ID) debian/bashbug.1 $(d)/usr/share/man/man1/
|
||||
ifneq ($(with_gfdl),yes)
|
||||
mkdir -p $(d)/usr/share/man/man1
|
||||
cp -p bash/doc/bash.1 $(d)/usr/share/man/man1/bash.1
|
||||
endif
|
||||
rm -f $(d)/usr/share/doc/bash/*.html
|
||||
rm -f $(d)/usr/share/info/*.info
|
||||
rm -f $(d)/usr/share/info/dir*
|
||||
|
||||
: # extra links
|
||||
ln -sf bash $(d)/usr/bin/rbash
|
||||
|
||||
: # skeleton files
|
||||
$(ID) debian/etc.bash.bashrc $(d)/etc/bash.bashrc
|
||||
$(ID) debian/skel.bashrc $(d)/etc/skel/.bashrc
|
||||
$(ID) debian/skel.profile $(d)/etc/skel/.profile
|
||||
$(ID) debian/skel.bash_logout $(d)/etc/skel/.bash_logout
|
||||
|
||||
: # clean_console
|
||||
ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux freebsd))
|
||||
$(IX) clear_console $(d)/usr/bin/
|
||||
$(ID) debian/clear_console.1 $(d)/usr/share/man/man1/
|
||||
endif
|
||||
|
||||
: # /etc/shells integration
|
||||
$(ID) -D debian/shells.d/bash $(d)/usr/share/debianutils/shells.d/bash
|
||||
|
||||
: # files for the bash-doc package
|
||||
|
||||
dh_installexamples -p$(p_doc) examples/*
|
||||
rm -rf $(d_doc)/usr/share/doc/$(p)/examples/loadables
|
||||
mkdir -p $(d_doc)/usr/share/doc/$(p_doc)
|
||||
ln -sf ../$(p)/examples $(d_doc)/usr/share/doc/$(p_doc)/examples
|
||||
|
||||
rm -rf $(d_doc)/usr/share/doc/$(p)/examples/obashdb
|
||||
cd $(d_doc)/usr/share/doc/$(p)/examples && chmod 755 \
|
||||
misc/aliasconv.*sh misc/cshtobash
|
||||
|
||||
cd $(d_doc)/usr/share/doc/$(p)/examples && chmod 644 \
|
||||
scripts/shprompt
|
||||
|
||||
: # files for the bash-builtins package
|
||||
mv $(d)/usr/include $(d_bins)/usr/.
|
||||
mv $(d)/usr/lib $(d_bins)/usr/.
|
||||
$(ID) examples/loadables/{README,*.c} \
|
||||
$(d_bins)/usr/share/doc/$(p)/examples/loadables
|
||||
$(ID) build-bash/examples/loadables/Makefile \
|
||||
$(d_bins)/usr/share/doc/$(p)/examples/loadables
|
||||
ln -sf bash $(d_bins)/usr/share/doc/$(p_bins)
|
||||
|
||||
sed -i \
|
||||
-e 's@-ffile-prefix-map=[^ ]*[ ]*@@g' \
|
||||
-e 's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \
|
||||
-e 's@^BUILD_DIR =.*@BUILD_DIR = /path/to/build-dir@' \
|
||||
$(d)/usr/bin/bashbug \
|
||||
$(d_bins)/usr/lib/bash/Makefile.inc \
|
||||
$(d_bins)/usr/share/doc/$(p)/examples/loadables/Makefile
|
||||
|
||||
# cat debian/README stamps/stamp-patch > debian/README.Debian
|
||||
cat debian/README > debian/README.Debian
|
||||
|
||||
touch stamps/stamp-install-bash
|
||||
|
||||
binary-doc: bash-install bash-doc-build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
mkdir -p $(d_doc)/usr/share/doc/$(p)
|
||||
ifeq ($(with_gfdl),yes)
|
||||
dh_installdocs -p$(p_doc)
|
||||
cp -p build-bash/doc/bashref.{html,pdf} $(d_doc)/usr/share/doc/$(p)/.
|
||||
mkdir -p $(d_doc)/usr/share/info
|
||||
cp -p build-bash/doc/bash.info $(d_doc)/usr/share/info/.
|
||||
dh_link -p$(p_doc) \
|
||||
/usr/share/doc/$(p)/bashref.html /usr/share/doc/$(p_doc)/bashref.html \
|
||||
/usr/share/doc/$(p)/bashref.pdf /usr/share/doc/$(p_doc)/bashref.pdf
|
||||
else
|
||||
dh_installdocs -p$(p_doc) -X.doc-base
|
||||
rm -f $(d_doc)/usr/share/doc-base/bashref
|
||||
endif
|
||||
rm -f $(d_doc)/usr/share/info/dir*
|
||||
cp -p build-bash/doc/bash.html build-bash/doc/bash.pdf \
|
||||
$(d_doc)/usr/share/doc/$(p)/
|
||||
dh_link -p$(p_doc) \
|
||||
/usr/share/doc/$(p)/bash.html /usr/share/doc/$(p_doc)/bash.html \
|
||||
/usr/share/doc/$(p)/bash.pdf /usr/share/doc/$(p_doc)/bash.pdf
|
||||
dh_installchangelogs -p$(p_doc) CWRU/changelog
|
||||
dh_compress -p$(p_doc) -Xexamples -X.pdf
|
||||
dh_fixperms -p$(p_doc)
|
||||
dh_installdeb -p$(p_doc)
|
||||
dh_gencontrol -p$(p_doc)
|
||||
dh_md5sums -p$(p_doc)
|
||||
dh_builddeb -p$(p_doc)
|
||||
|
||||
binary-bash: bash-install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs -p$(p)
|
||||
dh_installdocs -p$(p) \
|
||||
CHANGES NEWS COMPAT doc/INTRO POSIX \
|
||||
debian/{README.Debian,README.abs-guide,README.commands} \
|
||||
debian/inputrc.arrows
|
||||
install -D -m 644 debian/bash.overrides \
|
||||
debian/bash/usr/share/lintian/overrides/bash
|
||||
install -D -m 644 debian/bash-builtins.overrides \
|
||||
debian/bash-builtins/usr/share/lintian/overrides/bash-builtins
|
||||
dh_installman -p$(p) doc/rbash.1 debian/bash-builtins.7
|
||||
dh_installmenu -p$(p)
|
||||
dh_strip -p$(p)
|
||||
dh_compress -p$(p)
|
||||
dh_fixperms -p$(p)
|
||||
dh_shlibdeps -p$(p) -- -dPre-Depends $(d)/usr/bin/bash
|
||||
dh_installdeb -p$(p)
|
||||
dh_gencontrol -p$(p)
|
||||
dh_md5sums -p$(p)
|
||||
dh_builddeb -p$(p)
|
||||
|
||||
# Even though it contains only headers and example files,
|
||||
# bash-builtins is NOT arch-independent because the config.h* files
|
||||
# differ on different archs.
|
||||
binary-builtins: bash-install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_strip -p$(p_bins)
|
||||
dh_compress -p$(p_bins) -Xexamples
|
||||
dh_fixperms -p$(p_bins)
|
||||
dh_installdeb -p$(p_bins)
|
||||
dh_gencontrol -p$(p_bins)
|
||||
dh_md5sums -p$(p_bins)
|
||||
dh_builddeb -p$(p_bins)
|
||||
|
||||
binary-static: static-build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep -p$(p_stat)
|
||||
dh_installdirs -p$(p_stat) \
|
||||
usr/bin \
|
||||
usr/share/man/man1
|
||||
cp -p build-static/bash $(d_stat)/usr/bin/bash-static
|
||||
cp -p doc/bash.1 $(d_stat)/usr/share/man/man1/bash-static.1
|
||||
$(ID) -D debian/shells.d/bash-static $(d_stat)/usr/share/debianutils/shells.d/bash-static
|
||||
dh_installdocs -p$(p_stat)
|
||||
dh_installchangelogs -p$(p_stat)
|
||||
install -D -m 644 debian/bash-static.overrides \
|
||||
debian/bash-static/usr/share/lintian/overrides/bash-static
|
||||
dh_strip -p$(p_stat)
|
||||
dh_compress -p$(p_stat)
|
||||
dh_fixperms -p$(p_stat)
|
||||
dh_installdeb -p$(p_stat)
|
||||
dh_gencontrol -p$(p_stat) -- \
|
||||
'-Vglibc:Source=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W libc-bin)'
|
||||
dh_md5sums -p$(p_stat)
|
||||
dh_builddeb -p$(p_stat)
|
||||
|
||||
binary-indep: binary-doc
|
||||
binary-arch: binary-bash binary-builtins binary-static
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# common rules for all bash build variations
|
||||
|
||||
do-build-$(build): stamps/stamp-build-$(build)
|
||||
stamps/stamp-build-$(build): stamps/stamp-configure-$(build)
|
||||
dh_testdir
|
||||
ifneq (,$(profiled_build))
|
||||
$(MAKE) -C build-$(build) \
|
||||
CFLAGS='$(CFLAGS) -fprofile-generate' \
|
||||
YACC="$(YACC)" \
|
||||
TERMCAP_LIB="$(termcap_lib)" \
|
||||
deb_builddir=build-$(build)/ \
|
||||
$(debflags)
|
||||
-sh debian/locale-gen
|
||||
cp debian/run-my-gprof bash/tests/
|
||||
LOCPATH=$(CURDIR)/locales \
|
||||
time $(MAKE) -C build-$(build) TESTSCRIPT=run-my-gprof test 2>&1 \
|
||||
| tee build-bash/profile-protocol
|
||||
$(MAKE) -C build-$(build) clean
|
||||
rm -f build-$(build)/lib/malloc/malloc*.gc??
|
||||
$(MAKE) -C build-$(build) \
|
||||
CFLAGS='$(CFLAGS) -fprofile-use' \
|
||||
YACC="$(YACC)" \
|
||||
TERMCAP_LIB="$(termcap_lib)" \
|
||||
deb_builddir=build-$(build)/ \
|
||||
$(debflags)
|
||||
else
|
||||
$(MAKE) -C build-$(build) \
|
||||
YACC="$(YACC)" \
|
||||
TERMCAP_LIB="$(termcap_lib)" \
|
||||
deb_builddir=build-$(build)/ \
|
||||
$(debflags)
|
||||
endif
|
||||
ifeq ($(with_gfdl),yes)
|
||||
$(MAKE) -C build-$(build)/doc \
|
||||
bash.info
|
||||
endif
|
||||
touch stamps/stamp-build-$(build)
|
||||
|
||||
do-configure-$(build): stamps/stamp-configure-$(build)
|
||||
stamps/stamp-configure-$(build): stamps/before-build
|
||||
dh_testdir
|
||||
rm -rf build-$(build)
|
||||
mkdir build-$(build)
|
||||
cd build-$(build) && \
|
||||
CC="$(CC)" \
|
||||
CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
YACC="$(YACC)" \
|
||||
../$(bash_src)/configure $(configure_args)
|
||||
if ! grep -q '#define HAVE_DEV_STDIN 1' build-$(build)/config.h; then \
|
||||
echo "HAVE_DEV_STDIN not defined, abortig build"; \
|
||||
exit 1; \
|
||||
fi
|
||||
touch stamps/stamp-configure-$(build)
|
||||
|
||||
update-patches:
|
||||
export QUILT_PATCHES=$(patchdir); \
|
||||
export QUILT_REFRESH_ARGS="--no-timestamps --no-index -p ab"; \
|
||||
export QUILT_DIFF_ARGS="--no-timestamps --no-index -p ab"; \
|
||||
while quilt push; do quilt refresh; done
|
||||
|
||||
#unpack-$(bash_src): stamps/stamp-unpack-$(bash_src)
|
||||
#stamps/stamp-unpack-$(bash_src):
|
||||
# mkdir -p stamps
|
||||
# rm -rf bash-$(VERSION) $(bash_src)
|
||||
# rm -f stamps/stamp-patch-$(bash_src){,-*}
|
||||
# tar xf bash-$(VERSION)*.tar.xz
|
||||
# mv bash-$(VERSION) $(bash_src)
|
||||
# rm -f bash/y.tab.?
|
||||
# cp -p /usr/share/misc/config.* $(bash_src)/.
|
||||
# cp -p /usr/share/misc/config.* $(bash_src)/support/.
|
||||
# touch stamps/stamp-unpack-$(bash_src)
|
||||
|
||||
remove-non-dfsg-files:
|
||||
rm -f doc/article.*
|
||||
rm -f doc/FAQ
|
||||
rm -f doc/aosa-bash*.pdf
|
||||
rm -f doc/rose94.*
|
||||
|
||||
.NOTPARALLEL: build
|
||||
.PHONY: unpack binary binary-arch binary-indep clean \
|
||||
build bash-build static-build \
|
||||
check \
|
||||
bash-configure static-configure \
|
||||
binary-doc binary-bash binary-builtins binary-static \
|
||||
install bash-install
|
||||
|
||||
# Local Variables:
|
||||
# mode: makefile
|
||||
# end:
|
32
debian/run-my-gprof
vendored
Normal file
32
debian/run-my-gprof
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
#! /bin/sh
|
||||
|
||||
PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
|
||||
export PATH
|
||||
|
||||
# unset BASH_ENV only if it is set
|
||||
[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
|
||||
# ditto for SHELLOPTS
|
||||
#[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS
|
||||
|
||||
: ${THIS_SH:=../bash}
|
||||
export THIS_SH
|
||||
|
||||
${THIS_SH} ./version
|
||||
|
||||
rm -f /tmp/xx
|
||||
|
||||
echo Any output from any test, unless otherwise noted, indicates a possible anomaly
|
||||
|
||||
echo Running tests as test load ...
|
||||
|
||||
for x in run-*
|
||||
do
|
||||
case $x in
|
||||
$0|run-minimal|run-gprof|run-all) ;;
|
||||
run-jobs|run-gprof) echo SKIP $x ;;
|
||||
*.orig|*~) ;;
|
||||
*) echo $x ; sh $x ;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit 0
|
4
debian/shells.d/bash
vendored
Normal file
4
debian/shells.d/bash
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
/bin/bash
|
||||
/bin/rbash
|
||||
/usr/bin/bash
|
||||
/usr/bin/rbash
|
2
debian/shells.d/bash-static
vendored
Normal file
2
debian/shells.d/bash-static
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/bin/bash-static
|
||||
/usr/bin/bash-static
|
7
debian/skel.bash_logout
vendored
Normal file
7
debian/skel.bash_logout
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
# ~/.bash_logout: executed by bash(1) when login shell exits.
|
||||
|
||||
# when leaving the console clear the screen to increase privacy
|
||||
|
||||
if [ "$SHLVL" = 1 ]; then
|
||||
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||
fi
|
113
debian/skel.bashrc
vendored
Normal file
113
debian/skel.bashrc
vendored
Normal file
|
@ -0,0 +1,113 @@
|
|||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
#alias grep='grep --color=auto'
|
||||
#alias fgrep='fgrep --color=auto'
|
||||
#alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
#alias ll='ls -l'
|
||||
#alias la='ls -A'
|
||||
#alias l='ls -CF'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
27
debian/skel.profile
vendored
Normal file
27
debian/skel.profile
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
2
debian/source/lintian-overrides
vendored
Normal file
2
debian/source/lintian-overrides
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# No texinfo file has a gfdl with an invariant or cover text
|
||||
bash source: license-problem-gfdl-invariants
|
3
debian/watch
vendored
Normal file
3
debian/watch
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
version=4
|
||||
opts=repacksuffix=+dfsg,dversionmangle=auto \
|
||||
ftp://ftp.gnu.org/gnu/bash/bash-([\d\.]*).tar.gz debian uupdate
|
Loading…
Add table
Add a link
Reference in a new issue