Samples için pisi deposunu kullanalım!
This commit is contained in:
@@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pisi.actionsapi import gnuconfig
|
|
||||||
from pisi.actionsapi import kde
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
gnuconfig.gnuconfig_update()
|
|
||||||
|
|
||||||
# amarok does not respect kde coding standards, and makes a lot of
|
|
||||||
# assuptions regarding its installation directory. For this reason,
|
|
||||||
# it must be installed in the KDE install directory.
|
|
||||||
kde.configure('--with-arts --with-xine --with-gstreamer --with-opengl --with-libvisual --disable-amazon --disable-debug --without-debug')
|
|
||||||
|
|
||||||
def build():
|
|
||||||
kde.make()
|
|
||||||
|
|
||||||
def install():
|
|
||||||
kde.install()
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
||||||
|
|
||||||
<!DOCTYPE PSPEC SYSTEM
|
|
||||||
"http://www.uludag.org.tr/projeler/pisi/pisi-spec.dtd">
|
|
||||||
|
|
||||||
<PISI>
|
|
||||||
<Source>
|
|
||||||
<Name>amarok</Name>
|
|
||||||
<Homepage>http://amarok.kde.org/</Homepage>
|
|
||||||
<Packager>
|
|
||||||
<Name>Barış Metin</Name>
|
|
||||||
<Email>baris@uludag.org.tr</Email>
|
|
||||||
</Packager>
|
|
||||||
<License>GPL</License>
|
|
||||||
<IsA>applications:audio</IsA>
|
|
||||||
<PartOf>desktop:kde</PartOf>
|
|
||||||
<Summary>Amarok audio player</Summary>
|
|
||||||
<Description>Feature-rich audio player for KDE system.</Description>
|
|
||||||
<Archive type="tarbz2" sha1sum="660b576bcf5df6644dde03ba88d604c52191d593">
|
|
||||||
http://umn.dl.sourceforge.net/sourceforge/amarok/amarok-1.3-beta1.tar.bz2
|
|
||||||
</Archive>
|
|
||||||
<BuildDependencies>
|
|
||||||
<Dependency versionFrom="3.4.0">kdelibs</Dependency>
|
|
||||||
</BuildDependencies>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>06/25/2005</Date>
|
|
||||||
<Version>1.3-beta1</Version>
|
|
||||||
<Release>1</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Source>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>amarok</Name>
|
|
||||||
<Summary>Amarok audio player</Summary>
|
|
||||||
<Description>Feature-rich audio player for KDE system.</Description>
|
|
||||||
<RuntimeDependencies>
|
|
||||||
<Dependency>kdebase</Dependency>
|
|
||||||
</RuntimeDependencies>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="sharedLib">/usr/kde/3.4/lib</Path>
|
|
||||||
<Path fileType="data">/usr/kde/3.4/share</Path>
|
|
||||||
<Path fileType="localedata">/usr/kde/3.4/share/locale</Path>
|
|
||||||
<Path fileType="executable">/usr/kde/3.4/bin</Path>
|
|
||||||
</Files>
|
|
||||||
</Package>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>amarok-docs</Name>
|
|
||||||
<Summary>Documentation files for Amarok audio player</Summary>
|
|
||||||
<Description>Feature-rich audio player for KDE system.
|
|
||||||
This package provides documentation files for Amarok.
|
|
||||||
</Description>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="doc">/usr/kde/3.4/share/doc</Path>
|
|
||||||
</Files>
|
|
||||||
</Package>
|
|
||||||
|
|
||||||
</PISI>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pisi.actionsapi import gnuconfig
|
|
||||||
from pisi.actionsapi import autotools
|
|
||||||
from pisi.actionsapi import pisitools
|
|
||||||
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
gnuconfig.gnuconfig_update()
|
|
||||||
|
|
||||||
pisitools.dosed("configure", "s:-lcurses:-lncurses:")
|
|
||||||
|
|
||||||
autotools.configure("--with-nls --disable-profiling --without-gnu-malloc")
|
|
||||||
|
|
||||||
pisitools.dosed("Makefile", "/^TERMCAP_LIB/s:-lncurses:-Wl,-Bstatic -lncurses -Wl,-Bdynamic:")
|
|
||||||
|
|
||||||
def build():
|
|
||||||
autotools.make()
|
|
||||||
|
|
||||||
def install():
|
|
||||||
autotools.install()
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
--- jobs.c
|
|
||||||
+++ jobs.c Wed May 2 18:20:31 2001
|
|
||||||
@@ -1166,6 +1166,15 @@
|
|
||||||
pid_t mypid;
|
|
||||||
|
|
||||||
mypid = getpid ();
|
|
||||||
+
|
|
||||||
+ if (interrupt_state)
|
|
||||||
+ {
|
|
||||||
+ struct timeval tv;
|
|
||||||
+ struct rusage rx;
|
|
||||||
+ (void) gettimeofday(&tv, NULL);
|
|
||||||
+ (void) getrusage(RUSAGE_SELF, &rx);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
#if defined (BUFFERED_INPUT)
|
|
||||||
/* Close default_buffered_input if it's > 0. We don't close it if it's
|
|
||||||
0 because that's the file descriptor used when redirecting input,
|
|
||||||
--- quit.h
|
|
||||||
+++ quit.h Wed May 2 17:38:34 2001
|
|
||||||
@@ -21,8 +21,12 @@
|
|
||||||
#if !defined (_QUIT_H_)
|
|
||||||
#define _QUIT_H_
|
|
||||||
|
|
||||||
+#define __need_sig_atomic_t
|
|
||||||
+#include <signal.h>
|
|
||||||
+#undef __need_sig_atomic_t
|
|
||||||
+
|
|
||||||
/* Non-zero means SIGINT has already ocurred. */
|
|
||||||
-extern int interrupt_state;
|
|
||||||
+extern volatile sig_atomic_t interrupt_state;
|
|
||||||
|
|
||||||
extern void throw_to_top_level ();
|
|
||||||
|
|
||||||
--- sig.c
|
|
||||||
+++ sig.c Wed May 2 17:36:17 2001
|
|
||||||
@@ -57,7 +57,7 @@
|
|
||||||
extern int interactive, interactive_shell, login_shell, startup_state;
|
|
||||||
|
|
||||||
/* Non-zero after SIGINT. */
|
|
||||||
-int interrupt_state;
|
|
||||||
+volatile sig_atomic_t interrupt_state = 0;
|
|
||||||
|
|
||||||
/* The environment at the top-level R-E loop. We use this in
|
|
||||||
the case of error return. */
|
|
||||||
@@ -69,7 +69,7 @@
|
|
||||||
#endif /* JOB_CONTROL */
|
|
||||||
|
|
||||||
/* When non-zero, we throw_to_top_level (). */
|
|
||||||
-int interrupt_immediately = 0;
|
|
||||||
+volatile sig_atomic_t interrupt_immediately = 0;
|
|
||||||
|
|
||||||
static void initialize_shell_signals ();
|
|
||||||
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
--- builtins/fc.def
|
|
||||||
+++ builtins/fc.def 2001/08/28 11:20:53
|
|
||||||
@@ -371,6 +371,9 @@
|
|
||||||
{
|
|
||||||
unlink (fn);
|
|
||||||
free (fn);
|
|
||||||
+#ifdef DEBFIX
|
|
||||||
+ free (command);
|
|
||||||
+#endif
|
|
||||||
return (EXECUTION_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -383,6 +386,9 @@
|
|
||||||
/* Turn on the `v' flag while fc_execute_file runs so the commands
|
|
||||||
will be echoed as they are read by the parser. */
|
|
||||||
begin_unwind_frame ("fc builtin");
|
|
||||||
+#ifdef DEBFIX
|
|
||||||
+ add_unwind_protect ((Function *)xfree, command);
|
|
||||||
+#endif
|
|
||||||
add_unwind_protect ((Function *)xfree, fn);
|
|
||||||
add_unwind_protect (unlink, fn);
|
|
||||||
unwind_protect_int (echo_input_at_read);
|
|
||||||
--- variables.c.orig Wed Aug 21 12:10:57 2002
|
|
||||||
+++ variables.c Wed Aug 21 12:14:18 2002
|
|
||||||
@@ -1035,6 +1035,7 @@
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if !defined(linux)
|
|
||||||
/* The random number seed. You can change this by setting RANDOM. */
|
|
||||||
static unsigned long rseed = 1;
|
|
||||||
static int last_random_value;
|
|
||||||
@@ -1060,6 +1061,21 @@
|
|
||||||
last_random_value = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#else
|
|
||||||
+
|
|
||||||
+static int last_sbrand_pid;
|
|
||||||
+
|
|
||||||
+static int brand ()
|
|
||||||
+{
|
|
||||||
+ return random() & 32767;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void sbrand (unsigned long seed)
|
|
||||||
+{
|
|
||||||
+ srandom(seed);
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
static SHELL_VAR *
|
|
||||||
assign_random (self, value, unused)
|
|
||||||
SHELL_VAR *self;
|
|
||||||
@@ -1075,6 +1091,7 @@
|
|
||||||
{
|
|
||||||
int rv;
|
|
||||||
|
|
||||||
+#if !defined(linux)
|
|
||||||
/* Reset for command and process substitution. */
|
|
||||||
if (subshell_environment)
|
|
||||||
sbrand (rseed + getpid() + NOW);
|
|
||||||
@@ -1082,6 +1099,18 @@
|
|
||||||
do
|
|
||||||
rv = brand ();
|
|
||||||
while (rv == last_random_value);
|
|
||||||
+#else
|
|
||||||
+ if (subshell_environment)
|
|
||||||
+ {
|
|
||||||
+ int mypid = getpid();
|
|
||||||
+ if (mypid != last_sbrand_pid)
|
|
||||||
+ {
|
|
||||||
+ last_sbrand_pid = mypid;
|
|
||||||
+ sbrand (mypid + NOW);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ rv = brand();
|
|
||||||
+#endif
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1093,7 +1122,9 @@
|
|
||||||
char *p;
|
|
||||||
|
|
||||||
rv = get_random_number ();
|
|
||||||
+#if !defined(linux)
|
|
||||||
last_random_value = rv;
|
|
||||||
+#endif
|
|
||||||
p = itos (rv);
|
|
||||||
|
|
||||||
FREE (value_cell (var));
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
--- bash-3.0/redir.c.afs 2005-04-20 09:16:15.000000000 +0100
|
|
||||||
+++ bash-3.0/redir.c 2005-04-20 09:16:58.000000000 +0100
|
|
||||||
@@ -596,7 +596,9 @@
|
|
||||||
fd = open (filename, flags, mode);
|
|
||||||
#if defined (AFS)
|
|
||||||
if ((fd < 0) && (errno == EACCES))
|
|
||||||
- fd = open (filename, flags & ~O_CREAT, mode);
|
|
||||||
+ if ((fd = open (filename, flags & ~O_CREAT, mode)) < 0)
|
|
||||||
+ /* Restore previous errno. */
|
|
||||||
+ errno = EACCES;
|
|
||||||
#endif /* AFS */
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
> Machine Type: i686-pc-linux-gnu
|
|
||||||
>
|
|
||||||
> Bash Version: 3.0
|
|
||||||
> Patch Level: 0
|
|
||||||
> Release Status: release
|
|
||||||
>
|
|
||||||
> Description:
|
|
||||||
> GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu)
|
|
||||||
> (and
|
|
||||||
> GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
|
|
||||||
>
|
|
||||||
> dumps a core because of a null pointer "in make_bare_word
|
|
||||||
> at make_cmd.c:90" (see gdb output below)
|
|
||||||
|
|
||||||
Thanks for the report. Here's a quick fix:
|
|
||||||
|
|
||||||
*** arrayfunc.c~ Sat Nov 6 15:08:29 2004
|
|
||||||
--- arrayfunc.c Mon Jan 31 11:56:21 2005
|
|
||||||
***************
|
|
||||||
*** 709,713 ****
|
|
||||||
return ((char *)NULL);
|
|
||||||
}
|
|
||||||
! else if (var == 0)
|
|
||||||
return ((char *)NULL);
|
|
||||||
else if (array_p (var) == 0)
|
|
||||||
--- 709,713 ----
|
|
||||||
return ((char *)NULL);
|
|
||||||
}
|
|
||||||
! else if (var == 0 || value_cell (var) == 0)
|
|
||||||
return ((char *)NULL);
|
|
||||||
else if (array_p (var) == 0)
|
|
||||||
|
|
||||||
|
|
||||||
Chet
|
|
||||||
|
|
||||||
--
|
|
||||||
``The lyf so short, the craft so long to lerne.'' - Chaucer
|
|
||||||
( ``Discere est Dolere'' -- chet )
|
|
||||||
Live...Laugh...Love
|
|
||||||
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/
|
|
||||||
|
|
||||||
|
|
||||||
_______________________________________________
|
|
||||||
Bug-bash mailing list
|
|
||||||
Bug-bash@gnu.org
|
|
||||||
http://lists.gnu.org/mailman/listinfo/bug-bash
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
Sune Foldager writes:
|
|
||||||
On Darwin (Mac OS X), bash incorrectly assumed that it has been called over a network connection
|
|
||||||
(such as ssh, rsh etc.), when stdin stems from the pipe() system call. This is because bash's heuristic
|
|
||||||
code for determining if it's been started over a net connection is incorrect on Darwin kernels.
|
|
||||||
|
|
||||||
http://bugs.gentoo.org/show_bug.cgi?id=79124
|
|
||||||
|
|
||||||
--- /lib/sh/netconn.c
|
|
||||||
+++ /lib/sh/netconn.c
|
|
||||||
@@ -53,7 +53,8 @@
|
|
||||||
l = sizeof(sa);
|
|
||||||
rv = getpeername(fd, &sa, &l);
|
|
||||||
/* Solaris 2.5 getpeername() returns EINVAL if the fd is not a socket. */
|
|
||||||
- return ((rv < 0 && (errno == ENOTSOCK || errno == EINVAL)) ? 0 : 1);
|
|
||||||
+ /* Darwin 7.7.0 getpeername() returns ENOTCONN if the fd was created with pipe(). */
|
|
||||||
+ return ((rv < 0 && (errno == ENOTSOCK || errno == ENOTCONN || errno == EINVAL)) ? 0 : 1);
|
|
||||||
#else /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */
|
|
||||||
# if defined (SVR4) || defined (SVR4_2)
|
|
||||||
/* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
--- bash-3.0/lib/readline/bind.c.agriffis 2004-03-03 22:39:32.000000000 -0500
|
|
||||||
+++ bash-3.0/lib/readline/bind.c 2004-08-02 13:53:02.365731918 -0400
|
|
||||||
@@ -781,6 +781,7 @@
|
|
||||||
1. the filename used for the previous call
|
|
||||||
2. the value of the shell variable `INPUTRC'
|
|
||||||
3. ~/.inputrc
|
|
||||||
+ 4. /etc/inputrc
|
|
||||||
If the file existed and could be opened and read, 0 is returned,
|
|
||||||
otherwise errno is returned. */
|
|
||||||
int
|
|
||||||
@@ -789,17 +790,20 @@
|
|
||||||
{
|
|
||||||
/* Default the filename. */
|
|
||||||
if (filename == 0)
|
|
||||||
+ filename = last_readline_init_file;
|
|
||||||
+ if (filename == 0)
|
|
||||||
+ filename = sh_get_env_value ("INPUTRC");
|
|
||||||
+ if (filename == 0 || *filename == 0)
|
|
||||||
{
|
|
||||||
- filename = last_readline_init_file;
|
|
||||||
- if (filename == 0)
|
|
||||||
- filename = sh_get_env_value ("INPUTRC");
|
|
||||||
- if (filename == 0)
|
|
||||||
- filename = DEFAULT_INPUTRC;
|
|
||||||
+ /* If there's trouble reading DEFAULT_INPUTRC then fall back to
|
|
||||||
+ * the system inputrc
|
|
||||||
+ */
|
|
||||||
+ filename = DEFAULT_INPUTRC;
|
|
||||||
+ if (_rl_read_init_file (filename, 0) == 0)
|
|
||||||
+ return 0;
|
|
||||||
+ filename = "/etc/inputrc";
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (*filename == 0)
|
|
||||||
- filename = DEFAULT_INPUTRC;
|
|
||||||
-
|
|
||||||
#if defined (__MSDOS__)
|
|
||||||
if (_rl_read_init_file (filename, 0) == 0)
|
|
||||||
return 0;
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
--- expr.c
|
|
||||||
+++ expr.c 2004-07-30 16:39:48.000000000 +0200
|
|
||||||
@@ -406,8 +406,8 @@
|
|
||||||
value = expcond ();
|
|
||||||
if (curtok == EQ || curtok == OP_ASSIGN)
|
|
||||||
{
|
|
||||||
- int special, op;
|
|
||||||
- intmax_t lvalue;
|
|
||||||
+ int special, op = -1;
|
|
||||||
+ intmax_t lvalue = 0;
|
|
||||||
|
|
||||||
special = curtok == OP_ASSIGN;
|
|
||||||
|
|
||||||
Binary file not shown.
@@ -1,35 +0,0 @@
|
|||||||
--- bash-3.0/tests/jobs4.sub.jobs 2004-05-06 14:02:41.000000000 +0100
|
|
||||||
+++ bash-3.0/tests/jobs4.sub 2004-09-08 16:07:25.305385245 +0100
|
|
||||||
@@ -18,5 +18,5 @@
|
|
||||||
|
|
||||||
wait
|
|
||||||
|
|
||||||
-cat &
|
|
||||||
+sleep 100 &
|
|
||||||
kill -1 %% && echo i killed it || echo could not kill it
|
|
||||||
--- bash-3.0/jobs.c.jobs 2004-09-08 16:07:25.081427747 +0100
|
|
||||||
+++ bash-3.0/jobs.c 2004-09-08 16:18:06.698604033 +0100
|
|
||||||
@@ -2475,6 +2475,7 @@
|
|
||||||
PROCESS *child;
|
|
||||||
pid_t pid;
|
|
||||||
int call_set_current, last_stopped_job, job, children_exited, waitpid_flags;
|
|
||||||
+ static int wcontinued_not_supported = 0;
|
|
||||||
|
|
||||||
call_set_current = children_exited = 0;
|
|
||||||
last_stopped_job = NO_JOB;
|
|
||||||
@@ -2488,7 +2489,15 @@
|
|
||||||
: 0;
|
|
||||||
if (sigchld || block == 0)
|
|
||||||
waitpid_flags |= WNOHANG;
|
|
||||||
+ retry:
|
|
||||||
+ if (wcontinued_not_supported)
|
|
||||||
+ waitpid_flags &= ~WCONTINUED;
|
|
||||||
pid = WAITPID (-1, &status, waitpid_flags);
|
|
||||||
+ if (pid == -1 && errno == EINVAL)
|
|
||||||
+ {
|
|
||||||
+ wcontinued_not_supported = 1;
|
|
||||||
+ goto retry;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* The check for WNOHANG is to make sure we decrement sigchld only
|
|
||||||
if it was non-zero before we called waitpid. */
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
--- bash-3.0/locale.c.~1~ 2004-03-17 14:33:36.000000000 +0100
|
|
||||||
+++ bash-3.0/locale.c 2004-08-01 11:05:15.484280755 +0200
|
|
||||||
@@ -71,9 +71,10 @@ set_default_locale ()
|
|
||||||
textdomain (PACKAGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES and LC_NUMERIC
|
|
||||||
- if they are not specified in the environment, but LC_ALL is. This
|
|
||||||
- should be called from main() after parsing the environment. */
|
|
||||||
+/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC
|
|
||||||
+ and LC_TIME if they are not specified in the environment, but LC_ALL
|
|
||||||
+ is. This should be called from main() after parsing the
|
|
||||||
+ environment. */
|
|
||||||
void
|
|
||||||
set_default_locale_vars ()
|
|
||||||
{
|
|
||||||
@@ -109,6 +110,12 @@ set_default_locale_vars ()
|
|
||||||
setlocale (LC_NUMERIC, lc_all);
|
|
||||||
# endif /* LC_NUMERIC */
|
|
||||||
|
|
||||||
+# if defined (LC_TIME)
|
|
||||||
+ val = get_string_value ("LC_TIME");
|
|
||||||
+ if (val == 0 && lc_all && *lc_all)
|
|
||||||
+ setlocale (LC_TIME, lc_all);
|
|
||||||
+# endif /* LC_TIME */
|
|
||||||
+
|
|
||||||
#endif /* HAVE_SETLOCALE */
|
|
||||||
|
|
||||||
val = get_string_value ("TEXTDOMAIN");
|
|
||||||
@@ -213,6 +220,13 @@ set_locale_var (var, value)
|
|
||||||
return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0);
|
|
||||||
# endif /* LC_NUMERIC */
|
|
||||||
}
|
|
||||||
+ else if (var[3] == 'T' && var[4] == 'I') /* LC_TIME */
|
|
||||||
+ {
|
|
||||||
+# if defined (LC_TIME)
|
|
||||||
+ if (lc_all == 0 || *lc_all == '\0')
|
|
||||||
+ return (setlocale (LC_TIME, get_locale_var ("LC_TIME")) != 0);
|
|
||||||
+# endif /* LC_TIME */
|
|
||||||
+ }
|
|
||||||
#endif /* HAVE_SETLOCALE */
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
@@ -285,6 +299,9 @@ reset_locale_vars ()
|
|
||||||
# if defined (LC_NUMERIC)
|
|
||||||
setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC"));
|
|
||||||
# endif
|
|
||||||
+# if defined (LC_TIME)
|
|
||||||
+ setlocale (LC_TIME, get_locale_var ("LC_TIME"));
|
|
||||||
+# endif
|
|
||||||
|
|
||||||
locale_setblanks ();
|
|
||||||
|
|
||||||
--- bash-3.0/variables.c.~1~ 2004-07-04 19:57:26.000000000 +0200
|
|
||||||
+++ bash-3.0/variables.c 2004-08-01 11:07:47.331188616 +0200
|
|
||||||
@@ -3646,6 +3646,7 @@ static struct name_and_function special_
|
|
||||||
{ "LC_CTYPE", sv_locale },
|
|
||||||
{ "LC_MESSAGES", sv_locale },
|
|
||||||
{ "LC_NUMERIC", sv_locale },
|
|
||||||
+ { "LC_TIME", sv_locale },
|
|
||||||
|
|
||||||
{ "MAIL", sv_mail },
|
|
||||||
{ "MAILCHECK", sv_mail },
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
--- bash-3.0/doc/bash.1.manpage 2004-11-30 09:33:54.727381784 +0000
|
|
||||||
+++ bash-3.0/doc/bash.1 2004-11-30 09:34:06.799075585 +0000
|
|
||||||
@@ -3929,7 +3929,7 @@
|
|
||||||
.B SIGHUP
|
|
||||||
to all jobs when an interactive login shell exits.
|
|
||||||
.PP
|
|
||||||
-If \Bbash\fP is waiting for a command to complete and receives a signal
|
|
||||||
+If \fBbash\fP is waiting for a command to complete and receives a signal
|
|
||||||
for which a trap has been set, the trap will not be executed until
|
|
||||||
the command completes.
|
|
||||||
When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
--- redir.c
|
|
||||||
+++ redir.c 2005-01-28 15:22:21.950230271 +0100
|
|
||||||
@@ -169,12 +169,13 @@
|
|
||||||
how to undo the redirections later, if non-zero. If flags & RX_CLEXEC
|
|
||||||
is non-zero, file descriptors opened in do_redirection () have their
|
|
||||||
close-on-exec flag set. */
|
|
||||||
+static int close_before_dup2_err;
|
|
||||||
int
|
|
||||||
do_redirections (list, flags)
|
|
||||||
REDIRECT *list;
|
|
||||||
int flags;
|
|
||||||
{
|
|
||||||
- int error;
|
|
||||||
+ int error, ret = 0;
|
|
||||||
REDIRECT *temp;
|
|
||||||
|
|
||||||
if (flags & RX_UNDOABLE)
|
|
||||||
@@ -190,14 +191,21 @@
|
|
||||||
|
|
||||||
for (temp = list; temp; temp = temp->next)
|
|
||||||
{
|
|
||||||
+ close_before_dup2_err = 0;
|
|
||||||
error = do_redirection_internal (temp, flags);
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
redirection_error (temp, error);
|
|
||||||
return (error);
|
|
||||||
}
|
|
||||||
+ if (close_before_dup2_err)
|
|
||||||
+ {
|
|
||||||
+ redirection_error (temp, close_before_dup2_err);
|
|
||||||
+ ret = close_before_dup2_err;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
- return (0);
|
|
||||||
+
|
|
||||||
+ return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return non-zero if the redirection pointed to by REDIRECT has a
|
|
||||||
@@ -759,6 +767,8 @@
|
|
||||||
#if defined (BUFFERED_INPUT)
|
|
||||||
check_bash_input (redirector);
|
|
||||||
#endif
|
|
||||||
+ if ((fd != redirector) && (close(redirector) < 0) && (errno != EBADF))
|
|
||||||
+ close_before_dup2_err = errno;
|
|
||||||
|
|
||||||
if ((fd != redirector) && (dup2 (fd, redirector) < 0))
|
|
||||||
return (errno);
|
|
||||||
@@ -838,6 +848,9 @@
|
|
||||||
#if defined (BUFFERED_INPUT)
|
|
||||||
check_bash_input (redirector);
|
|
||||||
#endif
|
|
||||||
+ if ((fd != redirector) && (close(redirector) < 0) && (errno != EBADF))
|
|
||||||
+ close_before_dup2_err = errno;
|
|
||||||
+
|
|
||||||
if (fd != redirector && dup2 (fd, redirector) < 0)
|
|
||||||
{
|
|
||||||
r = errno;
|
|
||||||
@@ -880,6 +893,9 @@
|
|
||||||
#if defined (BUFFERED_INPUT)
|
|
||||||
check_bash_input (redirector);
|
|
||||||
#endif
|
|
||||||
+ if ((close(redirector) < 0) && (errno != EBADF))
|
|
||||||
+ close_before_dup2_err = errno;
|
|
||||||
+
|
|
||||||
/* This is correct. 2>&1 means dup2 (1, 2); */
|
|
||||||
if (dup2 (redir_fd, redirector) < 0)
|
|
||||||
return (errno);
|
|
||||||
--- execute_cmd.c
|
|
||||||
+++ execute_cmd.c 2005-01-28 16:09:10.383937390 +0100
|
|
||||||
@@ -119,7 +119,7 @@
|
|
||||||
static void do_piping __P((int, int));
|
|
||||||
static void bind_lastarg __P((char *));
|
|
||||||
static int shell_control_structure __P((enum command_type));
|
|
||||||
-static void cleanup_redirects __P((REDIRECT *));
|
|
||||||
+static int cleanup_redirects __P((REDIRECT *));
|
|
||||||
|
|
||||||
#if defined (JOB_CONTROL)
|
|
||||||
static int restore_signal_mask __P((sigset_t *));
|
|
||||||
@@ -393,12 +393,13 @@
|
|
||||||
|
|
||||||
/* A function to use to unwind_protect the redirection undo list
|
|
||||||
for loops. */
|
|
||||||
-static void
|
|
||||||
+static int
|
|
||||||
cleanup_redirects (list)
|
|
||||||
REDIRECT *list;
|
|
||||||
{
|
|
||||||
- do_redirections (list, RX_ACTIVE);
|
|
||||||
+ int ret = do_redirections (list, RX_ACTIVE);
|
|
||||||
dispose_redirects (list);
|
|
||||||
+ return (ret ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
@@ -603,7 +604,7 @@
|
|
||||||
redirection.) */
|
|
||||||
if (do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
|
|
||||||
{
|
|
||||||
- cleanup_redirects (redirection_undo_list);
|
|
||||||
+ (void)cleanup_redirects (redirection_undo_list);
|
|
||||||
redirection_undo_list = (REDIRECT *)NULL;
|
|
||||||
dispose_exec_redirects ();
|
|
||||||
return (EXECUTION_FAILURE);
|
|
||||||
@@ -2593,7 +2594,7 @@
|
|
||||||
int pipe_in, pipe_out, async;
|
|
||||||
pid_t old_last_command_subst_pid;
|
|
||||||
{
|
|
||||||
- int r;
|
|
||||||
+ int r, s;
|
|
||||||
|
|
||||||
if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async)
|
|
||||||
{
|
|
||||||
@@ -2632,10 +2633,10 @@
|
|
||||||
substitution. Otherwise, return EXECUTION_SUCCESS. */
|
|
||||||
|
|
||||||
r = do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE);
|
|
||||||
- cleanup_redirects (redirection_undo_list);
|
|
||||||
+ s = cleanup_redirects (redirection_undo_list);
|
|
||||||
redirection_undo_list = (REDIRECT *)NULL;
|
|
||||||
|
|
||||||
- if (r != 0)
|
|
||||||
+ if (r != 0 || s != 0)
|
|
||||||
return (EXECUTION_FAILURE);
|
|
||||||
else if (old_last_command_subst_pid != last_command_subst_pid)
|
|
||||||
return (last_command_exit_value);
|
|
||||||
@@ -3404,7 +3405,7 @@
|
|
||||||
|
|
||||||
if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
|
|
||||||
{
|
|
||||||
- cleanup_redirects (redirection_undo_list);
|
|
||||||
+ (void)cleanup_redirects (redirection_undo_list);
|
|
||||||
redirection_undo_list = (REDIRECT *)NULL;
|
|
||||||
dispose_exec_redirects ();
|
|
||||||
return (EX_REDIRFAIL); /* was EXECUTION_FAILURE */
|
|
||||||
@@ -3463,8 +3464,10 @@
|
|
||||||
|
|
||||||
if (redirection_undo_list)
|
|
||||||
{
|
|
||||||
- cleanup_redirects (redirection_undo_list);
|
|
||||||
+ int ret = cleanup_redirects (redirection_undo_list);
|
|
||||||
redirection_undo_list = (REDIRECT *)NULL;
|
|
||||||
+ if (result == 0)
|
|
||||||
+ result = ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (result);
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
diff -urb bash.orig/shell.c bash/shell.c
|
|
||||||
--- bash.orig/shell.c 2003-06-03 19:50:35.000000000 +0200
|
|
||||||
+++ bash/shell.c 2003-09-28 00:26:28.000000000 +0200
|
|
||||||
@@ -447,7 +447,7 @@
|
|
||||||
if (dump_translatable_strings)
|
|
||||||
read_but_dont_execute = 1;
|
|
||||||
|
|
||||||
- if (running_setuid && privileged_mode == 0)
|
|
||||||
+ if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
|
|
||||||
disable_priv_mode ();
|
|
||||||
|
|
||||||
/* Need to get the argument to a -c option processed in the
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
--- lib/readline/display.c.orig 2004-11-08 13:08:07.591703936 +0200
|
|
||||||
+++ lib/readline/display.c 2004-11-08 13:08:25.111040592 +0200
|
|
||||||
@@ -941,6 +941,7 @@
|
|
||||||
/* nleft == number of characters in the line buffer between the
|
|
||||||
start of the line and the cursor position. */
|
|
||||||
nleft = c_pos - pos;
|
|
||||||
+#if 0
|
|
||||||
|
|
||||||
/* Since _rl_backspace() doesn't know about invisible characters in the
|
|
||||||
prompt, and there's no good way to tell it, we compensate for
|
|
||||||
@@ -954,6 +955,8 @@
|
|
||||||
_rl_last_c_pos = nleft;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
|
||||||
_rl_move_cursor_relative (nleft, &invisible_line[pos]);
|
|
||||||
else if (nleft != _rl_last_c_pos)
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
--- bash-3.0/parse.y.pwd 2005-03-15 14:22:36.000000000 +0000
|
|
||||||
+++ bash-3.0/parse.y 2005-03-15 14:22:37.000000000 +0000
|
|
||||||
@@ -4103,7 +4103,7 @@
|
|
||||||
#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
|
|
||||||
#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
|
|
||||||
/* Abbreviate \W as ~ if $PWD == $HOME */
|
|
||||||
- if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0))
|
|
||||||
+ if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0))
|
|
||||||
{
|
|
||||||
if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
|
|
||||||
{
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
diff -urb bash.orig/config.h.in bash/config.h.in
|
|
||||||
--- bash.orig/config.h.in 2003-09-22 14:42:35.000000000 +0200
|
|
||||||
+++ bash/config.h.in 2003-09-28 00:27:15.000000000 +0200
|
|
||||||
@@ -606,6 +606,9 @@
|
|
||||||
/* Define if you have the putenv function. */
|
|
||||||
#undef HAVE_PUTENV
|
|
||||||
|
|
||||||
+/* Define if you have the random function. */
|
|
||||||
+#undef HAVE_RANDOM
|
|
||||||
+
|
|
||||||
/* Define if you have the readlink function. */
|
|
||||||
#undef HAVE_READLINK
|
|
||||||
|
|
||||||
@@ -696,6 +699,9 @@
|
|
||||||
/* Define if you have the strsignal function or macro. */
|
|
||||||
#undef HAVE_STRSIGNAL
|
|
||||||
|
|
||||||
+/* Define if you have the srandom function. */
|
|
||||||
+#undef HAVE_SRANDOM
|
|
||||||
+
|
|
||||||
/* Define if you have the sysconf function. */
|
|
||||||
#undef HAVE_SYSCONF
|
|
||||||
|
|
||||||
diff -urb bash.orig/variables.c bash/variables.c
|
|
||||||
--- bash.orig/variables.c 2003-07-31 16:28:57.000000000 +0200
|
|
||||||
+++ bash/variables.c 2003-09-28 00:27:15.000000000 +0200
|
|
||||||
@@ -1098,16 +1098,22 @@
|
|
||||||
static unsigned long rseed = 1;
|
|
||||||
static int last_random_value;
|
|
||||||
|
|
||||||
-/* A linear congruential random number generator based on the example
|
|
||||||
- one in the ANSI C standard. This one isn't very good, but a more
|
|
||||||
- complicated one is overkill. */
|
|
||||||
+/* Use the random number genrator provided by the standard C library,
|
|
||||||
+ else use a linear congruential random number generator based on the
|
|
||||||
+ ANSI C standard. This one isn't very good (the values are alternately
|
|
||||||
+ odd and even, for example), but a more complicated one is overkill. */
|
|
||||||
|
|
||||||
/* Returns a pseudo-random number between 0 and 32767. */
|
|
||||||
static int
|
|
||||||
brand ()
|
|
||||||
{
|
|
||||||
+#if defined(HAVE_RANDOM)
|
|
||||||
+ rseed = (unsigned int) (labs(random()) & 32767);
|
|
||||||
+ return rseed;
|
|
||||||
+#else
|
|
||||||
rseed = rseed * 1103515245 + 12345;
|
|
||||||
return ((unsigned int)((rseed >> 16) & 32767)); /* was % 32768 */
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the random number generator seed to SEED. */
|
|
||||||
@@ -1115,8 +1121,12 @@
|
|
||||||
sbrand (seed)
|
|
||||||
unsigned long seed;
|
|
||||||
{
|
|
||||||
+#if defined(HAVE_SRANDOM)
|
|
||||||
+ srandom(seed);
|
|
||||||
+#else
|
|
||||||
rseed = seed;
|
|
||||||
last_random_value = 0;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static SHELL_VAR *
|
|
||||||
--- bash/configure.in~ 2004-03-02 00:04:29.000000000 +0100
|
|
||||||
+++ bash/configure.in 2004-03-02 00:05:48.000000000 +0100
|
|
||||||
@@ -667,6 +667,9 @@
|
|
||||||
|
|
||||||
AC_FUNC_MKTIME
|
|
||||||
|
|
||||||
+dnl checks for random functions
|
|
||||||
+AC_CHECK_FUNCS(random srandom)
|
|
||||||
+
|
|
||||||
dnl
|
|
||||||
dnl Checks for lib/intl and related code (uses some of the output from
|
|
||||||
dnl AM_GNU_GETTEXT)
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
Description:
|
|
||||||
When using 'read -u 3' or the like, and the pipe-buf already contains
|
|
||||||
more than one line, the first line is returned, and bytes up to the next
|
|
||||||
multiple of 128 are skipped.
|
|
||||||
|
|
||||||
http://lists.gnu.org/archive/html/bug-bash/2005-03/msg00168.html
|
|
||||||
http://lists.gnu.org/archive/html/bug-bash/2005-03/msg00173.html
|
|
||||||
http://bugs.gentoo.org/show_bug.cgi?id=87093
|
|
||||||
|
|
||||||
--- builtins/read.def
|
|
||||||
+++ builtins/read.def
|
|
||||||
@@ -276,7 +276,7 @@
|
|
||||||
input_is_tty = isatty (fd);
|
|
||||||
if (input_is_tty == 0)
|
|
||||||
#ifndef __CYGWIN__
|
|
||||||
- input_is_pipe = (lseek (0, 0L, SEEK_CUR) < 0) && (errno == ESPIPE);
|
|
||||||
+ input_is_pipe = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE);
|
|
||||||
#else
|
|
||||||
input_is_pipe = 1;
|
|
||||||
#endif
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
> Hmm, a better patch for this seems to be:
|
|
||||||
|
|
||||||
I installed this patch a while back:
|
|
||||||
|
|
||||||
*** ../bash-3.0-patched/lib/readline/display.c Wed Sep 8 11:07:51 2004
|
|
||||||
--- lib/readline/display.c Fri Nov 12 13:31:42 2004
|
|
||||||
***************
|
|
||||||
*** 336,340 ****
|
|
||||||
|
|
||||||
local_prompt = local_prompt_prefix = (char *)0;
|
|
||||||
! prompt_last_invisible = prompt_visible_length = 0;
|
|
||||||
|
|
||||||
if (prompt == 0 || *prompt == 0)
|
|
||||||
--- 341,346 ----
|
|
||||||
|
|
||||||
local_prompt = local_prompt_prefix = (char *)0;
|
|
||||||
! prompt_last_invisible = prompt_invis_chars_first_line = 0;
|
|
||||||
! prompt_visible_length = prompt_physical_chars = 0;
|
|
||||||
|
|
||||||
if (prompt == 0 || *prompt == 0)
|
|
||||||
|
|
||||||
--
|
|
||||||
``The lyf so short, the craft so long to lerne.'' - Chaucer
|
|
||||||
( ``Discere est Dolere'' -- chet )
|
|
||||||
Live...Laugh...Love
|
|
||||||
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--- lib/readline/terminal.c.orig 2004-11-05 23:02:43.644054384 +0200
|
|
||||||
+++ lib/readline/terminal.c 2004-11-05 23:04:09.357024032 +0200
|
|
||||||
@@ -148,6 +148,10 @@
|
|
||||||
/* Insert key */
|
|
||||||
static char *_rl_term_kI;
|
|
||||||
|
|
||||||
+/* The key sequence sent by the Delete key, if any. */
|
|
||||||
+static char *_rl_term_kD;
|
|
||||||
+
|
|
||||||
+
|
|
||||||
/* Cursor control */
|
|
||||||
static char *_rl_term_vs; /* very visible */
|
|
||||||
static char *_rl_term_ve; /* normal */
|
|
||||||
@@ -314,6 +318,7 @@
|
|
||||||
{ "ic", &_rl_term_ic },
|
|
||||||
{ "im", &_rl_term_im },
|
|
||||||
{ "@", &_rl_term_kH }, /* home down ?? */
|
|
||||||
+ { "kD", &_rl_term_kD },
|
|
||||||
{ "kI", &_rl_term_kI }, /* insert */
|
|
||||||
{ "kd", &_rl_term_kd },
|
|
||||||
{ "ke", &_rl_term_ke }, /* end keypad mode */
|
|
||||||
@@ -492,6 +497,7 @@
|
|
||||||
|
|
||||||
rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
|
|
||||||
rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
|
|
||||||
+ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete); /* Delete */
|
|
||||||
|
|
||||||
_rl_keymap = xkeymap;
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
--- lib/readline/readline.h.orig 2004-11-05 23:05:22.918840936 +0200
|
|
||||||
+++ lib/readline/readline.h 2004-11-05 23:05:47.657080152 +0200
|
|
||||||
@@ -33,6 +33,7 @@
|
|
||||||
# include "keymaps.h"
|
|
||||||
# include "tilde.h"
|
|
||||||
#else
|
|
||||||
+# include <stdio.h>
|
|
||||||
# include <readline/rlstdc.h>
|
|
||||||
# include <readline/rltypedefs.h>
|
|
||||||
# include <readline/keymaps.h>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
--- lib/readline/shell.c~ 2004-10-17 13:07:37.000000000 +0200
|
|
||||||
+++ lib/readline/shell.c 2004-10-17 13:06:48.000000000 +0200
|
|
||||||
@@ -122,7 +122,7 @@
|
|
||||||
{
|
|
||||||
char *b;
|
|
||||||
|
|
||||||
-#if defined (HAVE_PUTENV)
|
|
||||||
+#if 0
|
|
||||||
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
|
|
||||||
sprintf (b, "LINES=%d", lines);
|
|
||||||
putenv (b);
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
Don't barf on handled signals inside of scripts. Makes for nicer output.
|
|
||||||
|
|
||||||
patch by Martin Schlemmer <azarah@gentoo.org>
|
|
||||||
|
|
||||||
--- jobs.c
|
|
||||||
+++ jobs.c
|
|
||||||
@@ -2893,11 +2893,11 @@
|
|
||||||
}
|
|
||||||
else if (IS_FOREGROUND (job))
|
|
||||||
{
|
|
||||||
-#if !defined (DONT_REPORT_SIGPIPE)
|
|
||||||
- if (termsig && WIFSIGNALED (s) && termsig != SIGINT)
|
|
||||||
-#else
|
|
||||||
- if (termsig && WIFSIGNALED (s) && termsig != SIGINT && termsig != SIGPIPE)
|
|
||||||
-#endif
|
|
||||||
+ if (termsig && WIFSIGNALED (s) && termsig != SIGINT &&
|
|
||||||
+#if defined (DONT_REPORT_SIGPIPE)
|
|
||||||
+ termsig != SIGPIPE &&
|
|
||||||
+#endif
|
|
||||||
+ signal_is_trapped (termsig) == 0)
|
|
||||||
{
|
|
||||||
fprintf (stderr, "%s", j_strsignal (termsig));
|
|
||||||
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
--- bash-3.0/builtins/ulimit.def 2004-08-27 17:29:19.662577512 +0100
|
|
||||||
+++ bash-3.0/builtins/ulimit.def 2004-08-31 12:56:27.693244884 +0100
|
|
||||||
@@ -35,14 +35,17 @@
|
|
||||||
-c the maximum size of core files created
|
|
||||||
-d the maximum size of a process's data segment
|
|
||||||
-f the maximum size of files created by the shell
|
|
||||||
+ -i the maximum number of pending signals
|
|
||||||
-l the maximum size a process may lock into memory
|
|
||||||
-m the maximum resident set size
|
|
||||||
-n the maximum number of open file descriptors
|
|
||||||
-p the pipe buffer size
|
|
||||||
+ -q the maximum number of bytes in POSIX message queues
|
|
||||||
-s the maximum stack size
|
|
||||||
-t the maximum amount of cpu time in seconds
|
|
||||||
-u the maximum number of user processes
|
|
||||||
-v the size of virtual memory
|
|
||||||
+ -x the maximum number of file locks
|
|
||||||
|
|
||||||
If LIMIT is given, it is the new value of the specified resource;
|
|
||||||
the special LIMIT values `soft', `hard', and `unlimited' stand for
|
|
||||||
@@ -200,6 +203,9 @@
|
|
||||||
{ 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" },
|
|
||||||
#endif
|
|
||||||
{ 'f', RLIMIT_FILESIZE, 1024, "file size", "blocks" },
|
|
||||||
+#ifdef RLIMIT_SIGPENDING
|
|
||||||
+ { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL},
|
|
||||||
+#endif
|
|
||||||
#ifdef RLIMIT_MEMLOCK
|
|
||||||
{ 'l', RLIMIT_MEMLOCK, 1024, "max locked memory", "kbytes" },
|
|
||||||
#endif
|
|
||||||
@@ -208,6 +214,9 @@
|
|
||||||
#endif /* RLIMIT_RSS */
|
|
||||||
{ 'n', RLIMIT_OPENFILES, 1, "open files", (char *)NULL},
|
|
||||||
{ 'p', RLIMIT_PIPESIZE, 512, "pipe size", "512 bytes" },
|
|
||||||
+#ifdef RLIMIT_MSGQUEUE
|
|
||||||
+ { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" },
|
|
||||||
+#endif
|
|
||||||
#ifdef RLIMIT_STACK
|
|
||||||
{ 's', RLIMIT_STACK, 1024, "stack size", "kbytes" },
|
|
||||||
#endif
|
|
||||||
@@ -221,6 +230,9 @@
|
|
||||||
#ifdef RLIMIT_SWAP
|
|
||||||
{ 'w', RLIMIT_SWAP, 1024, "swap size", "kbytes" },
|
|
||||||
#endif
|
|
||||||
+#ifdef RLIMIT_LOCKS
|
|
||||||
+ { 'x', RLIMIT_LOCKS, 1, "file locks", (char *)NULL},
|
|
||||||
+#endif
|
|
||||||
{ -1, -1, -1, (char *)NULL, (char *)NULL }
|
|
||||||
};
|
|
||||||
#define NCMDS (sizeof(limits) / sizeof(limits[0]))
|
|
||||||
@@ -647,11 +659,11 @@
|
|
||||||
|
|
||||||
for (i = 0; limits[i].option > 0; i++)
|
|
||||||
{
|
|
||||||
- if (get_limit (i, &softlim, &hardlim) < 0)
|
|
||||||
+ if (get_limit (i, &softlim, &hardlim) == 0)
|
|
||||||
+ printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
|
|
||||||
+ else if (errno != EINVAL)
|
|
||||||
builtin_error ("%s: cannot get limit: %s", limits[i].description,
|
|
||||||
strerror (errno));
|
|
||||||
- else
|
|
||||||
- printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -670,7 +682,7 @@
|
|
||||||
else
|
|
||||||
sprintf (unitstr, "(-%c) ", limits[limind].option);
|
|
||||||
|
|
||||||
- printf ("%-18s %16s", limits[limind].description, unitstr);
|
|
||||||
+ printf ("%-20s %16s", limits[limind].description, unitstr);
|
|
||||||
}
|
|
||||||
if (curlim == RLIM_INFINITY)
|
|
||||||
puts ("unlimited");
|
|
||||||
@@ -1,261 +0,0 @@
|
|||||||
--- bash-3.0/subst.c.multibyteifs 2004-08-20 15:22:48.366497771 +0100
|
|
||||||
+++ bash-3.0/subst.c 2004-08-20 18:13:30.833624616 +0100
|
|
||||||
@@ -124,7 +124,12 @@
|
|
||||||
SHELL_VAR *ifs_var;
|
|
||||||
char *ifs_value;
|
|
||||||
unsigned char ifs_cmap[UCHAR_MAX + 1];
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+unsigned char ifs_firstc[MB_LEN_MAX];
|
|
||||||
+size_t ifs_firstc_len;
|
|
||||||
+#else
|
|
||||||
unsigned char ifs_firstc;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Extern functions and variables from different files. */
|
|
||||||
extern int last_command_exit_value, last_command_exit_signal;
|
|
||||||
@@ -862,8 +867,14 @@
|
|
||||||
char *charlist;
|
|
||||||
{
|
|
||||||
register int i = *sindex;
|
|
||||||
+ size_t slen;
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ size_t clen;
|
|
||||||
+ wchar_t *wcharlist = NULL;
|
|
||||||
+#endif
|
|
||||||
int c;
|
|
||||||
char *temp;
|
|
||||||
+ DECLARE_MBSTATE;
|
|
||||||
|
|
||||||
if (charlist[0] == '\'' && charlist[1] == '\0')
|
|
||||||
{
|
|
||||||
@@ -872,18 +883,65 @@
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
- for (i = *sindex; c = string[i]; i++)
|
|
||||||
+ slen = strlen (string + *sindex) + *sindex;
|
|
||||||
+ i = *sindex;
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ clen = strlen (charlist);
|
|
||||||
+#endif
|
|
||||||
+ while ((c = string[i]))
|
|
||||||
{
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ size_t mblength;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
if (c == CTLESC)
|
|
||||||
{
|
|
||||||
- i++;
|
|
||||||
+ i += 2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ mblength = mblen (string + i, slen - i);
|
|
||||||
+ if (mblength > 1)
|
|
||||||
+ {
|
|
||||||
+ wchar_t wc;
|
|
||||||
+ size_t mblength = mbtowc (&wc, string + i, slen - i);
|
|
||||||
+ if (MB_INVALIDCH (mblength))
|
|
||||||
+ {
|
|
||||||
+ if (MEMBER (c, charlist))
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ if (!wcharlist)
|
|
||||||
+ {
|
|
||||||
+ size_t len = mbstowcs (wcharlist, charlist, 0);
|
|
||||||
+ if (len == -1)
|
|
||||||
+ len = 0;
|
|
||||||
+ wcharlist = xmalloc (1 + sizeof (wchar_t) * len);
|
|
||||||
+ mbstowcs (wcharlist, charlist, len);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (wcschr (wcharlist, wc))
|
|
||||||
+ {
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
if (MEMBER (c, charlist))
|
|
||||||
break;
|
|
||||||
+
|
|
||||||
+ ADVANCE_CHAR (string, slen, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ if (wcharlist)
|
|
||||||
+ free (wcharlist);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
temp = substring (string, *sindex, i);
|
|
||||||
*sindex = i;
|
|
||||||
|
|
||||||
@@ -1456,11 +1514,36 @@
|
|
||||||
d2 = 0;
|
|
||||||
if (delims)
|
|
||||||
{
|
|
||||||
- d2 = (char *)xmalloc (strlen (delims) + 1);
|
|
||||||
- for (i = ts = 0; delims[i]; i++)
|
|
||||||
+ size_t slength = strlen (delims);
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ size_t mblength = 1;
|
|
||||||
+ DECLARE_MBSTATE;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ d2 = (char *)xmalloc (slength + 1);
|
|
||||||
+ i = ts = 0;
|
|
||||||
+ while (delims[i])
|
|
||||||
{
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ mbstate_t state_bak = state;
|
|
||||||
+ mblength = mbrlen (delims + i, slength, &state);
|
|
||||||
+
|
|
||||||
+ if (MB_INVALIDCH (mblength))
|
|
||||||
+ state = state_bak;
|
|
||||||
+ else if (mblength != 1)
|
|
||||||
+ {
|
|
||||||
+ memcpy (d2 + ts, delims + i, mblength);
|
|
||||||
+ ts += mblength;
|
|
||||||
+ i += mblength;
|
|
||||||
+ slength -= mblength;
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
if (whitespace(delims[i]) == 0)
|
|
||||||
d2[ts++] = delims[i];
|
|
||||||
+ i++;
|
|
||||||
+ slength--;
|
|
||||||
}
|
|
||||||
d2[ts] = '\0';
|
|
||||||
}
|
|
||||||
@@ -1654,10 +1737,19 @@
|
|
||||||
string_list_dollar_star (list)
|
|
||||||
WORD_LIST *list;
|
|
||||||
{
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ char sep[MB_CUR_MAX + 1];
|
|
||||||
+#else
|
|
||||||
char sep[2];
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ memcpy (sep, ifs_firstc, ifs_firstc_len);
|
|
||||||
+ sep[ifs_firstc_len] = '\0';
|
|
||||||
+#else
|
|
||||||
sep[0] = ifs_firstc;
|
|
||||||
sep[1] = '\0';
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
return (string_list_internal (list, sep));
|
|
||||||
}
|
|
||||||
@@ -1676,14 +1768,41 @@
|
|
||||||
WORD_LIST *list;
|
|
||||||
int quoted;
|
|
||||||
{
|
|
||||||
- char *ifs, sep[2];
|
|
||||||
+ char *ifs;
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ char sep[MB_CUR_MAX + 1];
|
|
||||||
+#else
|
|
||||||
+ char sep[2];
|
|
||||||
+#endif
|
|
||||||
WORD_LIST *tlist;
|
|
||||||
|
|
||||||
/* XXX this could just be ifs = ifs_value; */
|
|
||||||
ifs = ifs_var ? value_cell (ifs_var) : (char *)0;
|
|
||||||
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ if (ifs && *ifs)
|
|
||||||
+ {
|
|
||||||
+ size_t mblength = mblen (ifs, strnlen (ifs, MB_CUR_MAX));
|
|
||||||
+ if (MB_INVALIDCH (mblength))
|
|
||||||
+ {
|
|
||||||
+ sep[0] = *ifs;
|
|
||||||
+ sep[1] = '\0';
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ memcpy (sep, ifs, mblength);
|
|
||||||
+ sep[mblength] = '\0';
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ sep[0] = ' ';
|
|
||||||
+ sep[1] = '\0';
|
|
||||||
+ }
|
|
||||||
+#else
|
|
||||||
sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs;
|
|
||||||
sep[1] = '\0';
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
tlist = ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (ifs && *ifs == 0))
|
|
||||||
? quote_list (list)
|
|
||||||
@@ -1732,6 +1851,7 @@
|
|
||||||
WORD_DESC *t;
|
|
||||||
char *current_word, *s;
|
|
||||||
int sindex, sh_style_split, whitesep;
|
|
||||||
+ size_t slen = 0;
|
|
||||||
|
|
||||||
if (!string || !*string)
|
|
||||||
return ((WORD_LIST *)NULL);
|
|
||||||
@@ -1805,7 +1925,12 @@
|
|
||||||
|
|
||||||
/* Move past the current separator character. */
|
|
||||||
if (string[sindex])
|
|
||||||
- sindex++;
|
|
||||||
+ {
|
|
||||||
+ DECLARE_MBSTATE;
|
|
||||||
+ if (!slen)
|
|
||||||
+ slen = strlen (string);
|
|
||||||
+ ADVANCE_CHAR (string, slen, sindex);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* Now skip sequences of space, tab, or newline characters if they are
|
|
||||||
in the list of separators. */
|
|
||||||
@@ -6796,7 +6921,21 @@
|
|
||||||
ifs_cmap[uc] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ if (!ifs_value)
|
|
||||||
+ {
|
|
||||||
+ ifs_firstc[0] = '\0';
|
|
||||||
+ ifs_firstc_len = 1;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ size_t ifs_len = strnlen (ifs_value, MB_CUR_MAX);
|
|
||||||
+ ifs_firstc_len = mblen (ifs_value, ifs_len);
|
|
||||||
+ memcpy (ifs_firstc, ifs_value, ifs_firstc_len);
|
|
||||||
+ }
|
|
||||||
+#else
|
|
||||||
ifs_firstc = ifs_value ? *ifs_value : 0;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
char *
|
|
||||||
--- bash-3.0/subst.h.multibyteifs 2004-08-20 15:51:08.301074583 +0100
|
|
||||||
+++ bash-3.0/subst.h 2004-08-20 15:51:39.070206473 +0100
|
|
||||||
@@ -231,7 +231,12 @@
|
|
||||||
extern SHELL_VAR *ifs_var;
|
|
||||||
extern char *ifs_value;
|
|
||||||
extern unsigned char ifs_cmap[];
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+extern unsigned char ifs_firstc[];
|
|
||||||
+extern size_t ifs_firstc_len;
|
|
||||||
+#else
|
|
||||||
extern unsigned char ifs_firstc;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Evaluates to 1 if C is a character in $IFS. */
|
|
||||||
#define isifs(c) (ifs_cmap[(unsigned char)(c)] != 0)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
--- lib/readline/display.c
|
|
||||||
+++ lib/readline/display.c 2004-07-30 17:02:51.000000000 +0200
|
|
||||||
@@ -1387,7 +1387,7 @@
|
|
||||||
insert_some_chars (nfd, lendiff, col_lendiff);
|
|
||||||
_rl_last_c_pos += col_lendiff;
|
|
||||||
}
|
|
||||||
- else if (*ols == 0 && lendiff > 0)
|
|
||||||
+ else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && (*ols == 0 && lendiff > 0))
|
|
||||||
{
|
|
||||||
/* At the end of a line the characters do not have to
|
|
||||||
be "inserted". They can just be placed on the screen. */
|
|
||||||
--- lib/readline/histexpand.c
|
|
||||||
+++ lib/readline/histexpand.c 2004-07-30 17:02:10.000000000 +0200
|
|
||||||
@@ -206,6 +206,7 @@
|
|
||||||
|
|
||||||
/* Only a closing `?' or a newline delimit a substring search string. */
|
|
||||||
for (local_index = i; c = string[i]; i++)
|
|
||||||
+ {
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
|
||||||
{
|
|
||||||
@@ -221,8 +222,8 @@
|
|
||||||
i += v - 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
#endif /* HANDLE_MULTIBYTE */
|
|
||||||
if ((!substring_okay && (whitespace (c) || c == ':' ||
|
|
||||||
(history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
|
|
||||||
@@ -230,6 +231,7 @@
|
|
||||||
string[i] == '\n' ||
|
|
||||||
(substring_okay && string[i] == '?'))
|
|
||||||
break;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
which = i - local_index;
|
|
||||||
temp = (char *)xmalloc (1 + which);
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-001
|
|
||||||
|
|
||||||
Bug-Reported-by: Karlheinz Nolte <kn@k-nolte.de>
|
|
||||||
Bug-Reference-ID: <20040801200058.GA3311@mars.home.k-nolte.de>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00009.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
The following script triggers the segfault.
|
|
||||||
This was found by Costa Tsaousis the author of FireHOL.
|
|
||||||
He wrotes:
|
|
||||||
|
|
||||||
"I think I have found the bug. The script bellow crashes at the
|
|
||||||
third echo (UNSET). It seems to be a problem of the "unset" BASH
|
|
||||||
function when erasing arrays. It leaves something behind so that if
|
|
||||||
the array just unset is referenced, it produces a segmentation fault.
|
|
||||||
According to the documentation the first and the third expansions
|
|
||||||
should be exactly the same."
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/arrayfunc.c Fri Dec 19 00:03:09 2003
|
|
||||||
--- arrayfunc.c Sun Aug 1 20:43:00 2004
|
|
||||||
***************
|
|
||||||
*** 612,616 ****
|
|
||||||
|
|
||||||
free (t);
|
|
||||||
! return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
--- 612,616 ----
|
|
||||||
|
|
||||||
free (t);
|
|
||||||
! return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
*** ../bash-3.0/subst.c Sun Jul 4 13:56:13 2004
|
|
||||||
--- subst.c Thu Aug 12 13:36:17 2004
|
|
||||||
***************
|
|
||||||
*** 4983,4987 ****
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
! else if ((v = find_variable (varname)) && array_p (v))
|
|
||||||
{
|
|
||||||
vtype = VT_ARRAYMEMBER;
|
|
||||||
--- 5003,5007 ----
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
! else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && array_p (v))
|
|
||||||
{
|
|
||||||
vtype = VT_ARRAYMEMBER;
|
|
||||||
|
|
||||||
*** ../bash-3.0/variables.c Sun Jul 4 13:57:26 2004
|
|
||||||
--- variables.c Wed Aug 4 15:28:04 2004
|
|
||||||
***************
|
|
||||||
*** 1420,1428 ****
|
|
||||||
|
|
||||||
# if defined (DEBUGGER)
|
|
||||||
! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, (att_invisible|att_noassign));
|
|
||||||
! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, (att_invisible|att_noassign));
|
|
||||||
# endif /* DEBUGGER */
|
|
||||||
! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, (att_invisible|att_noassign));
|
|
||||||
! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, (att_invisible|att_noassign));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
--- 1420,1428 ----
|
|
||||||
|
|
||||||
# if defined (DEBUGGER)
|
|
||||||
! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign);
|
|
||||||
! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign);
|
|
||||||
# endif /* DEBUGGER */
|
|
||||||
! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign);
|
|
||||||
! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
***************
|
|
||||||
*** 1600,1604 ****
|
|
||||||
old_var = find_variable (name);
|
|
||||||
if (old_var && local_p (old_var) && old_var->context == variable_context)
|
|
||||||
! return (old_var);
|
|
||||||
|
|
||||||
was_tmpvar = old_var && tempvar_p (old_var);
|
|
||||||
--- 1600,1607 ----
|
|
||||||
old_var = find_variable (name);
|
|
||||||
if (old_var && local_p (old_var) && old_var->context == variable_context)
|
|
||||||
! {
|
|
||||||
! VUNSETATTR (old_var, att_invisible);
|
|
||||||
! return (old_var);
|
|
||||||
! }
|
|
||||||
|
|
||||||
was_tmpvar = old_var && tempvar_p (old_var);
|
|
||||||
*** ../bash-3.0/pcomplete.c Thu Jan 8 10:36:17 2004
|
|
||||||
--- pcomplete.c Tue Aug 3 23:15:41 2004
|
|
||||||
***************
|
|
||||||
*** 864,867 ****
|
|
||||||
--- 864,869 ----
|
|
||||||
v = convert_var_to_array (v);
|
|
||||||
v = assign_array_var_from_word_list (v, lwords);
|
|
||||||
+
|
|
||||||
+ VUNSETATTR (v, att_invisible);
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 1022,1025 ****
|
|
||||||
--- 1024,1029 ----
|
|
||||||
if (array_p (v) == 0)
|
|
||||||
v = convert_var_to_array (v);
|
|
||||||
+
|
|
||||||
+ VUNSETATTR (v, att_invisible);
|
|
||||||
|
|
||||||
a = array_cell (v);
|
|
||||||
*** ../bash-3.0/array.c Thu May 6 08:24:13 2004
|
|
||||||
--- array.c Wed Aug 25 15:50:42 2004
|
|
||||||
***************
|
|
||||||
*** 452,456 ****
|
|
||||||
array_dispose_element(new);
|
|
||||||
free(element_value(ae));
|
|
||||||
! ae->value = savestring(v);
|
|
||||||
return(0);
|
|
||||||
} else if (element_index(ae) > i) {
|
|
||||||
--- 454,458 ----
|
|
||||||
array_dispose_element(new);
|
|
||||||
free(element_value(ae));
|
|
||||||
! ae->value = v ? savestring(v) : (char *)NULL;
|
|
||||||
return(0);
|
|
||||||
} else if (element_index(ae) > i) {
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 0
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 1
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
*** ../bash-3.0/tests/dbg-support.tests Tue Mar 25 15:33:03 2003
|
|
||||||
--- tests/dbg-support.tests Tue Aug 3 23:09:29 2004
|
|
||||||
***************
|
|
||||||
*** 63,68 ****
|
|
||||||
trap 'print_return_trap $LINENO' RETURN
|
|
||||||
|
|
||||||
! # Funcname is now an array. Vanilla Bash 2.05 doesn't have FUNCNAME array.
|
|
||||||
! echo "FUNCNAME" ${FUNCNAME[0]}
|
|
||||||
|
|
||||||
# We should trace into the below.
|
|
||||||
--- 63,68 ----
|
|
||||||
trap 'print_return_trap $LINENO' RETURN
|
|
||||||
|
|
||||||
! # Funcname is now an array, but you still can't see it outside a function
|
|
||||||
! echo "FUNCNAME" ${FUNCNAME[0]:-main}
|
|
||||||
|
|
||||||
# We should trace into the below.
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-002
|
|
||||||
|
|
||||||
Bug-Reported-by: "Ralf S. Engelschall" <rse@engelschall.com>
|
|
||||||
Bug-Reference-ID: <20040728082038.GA31398@engelschall.com>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00262.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
After upgrading the OpenPKG "bash" package to 3.0, we had to discover
|
|
||||||
that the prompt handling on Bash 3.0 / Readline 5.0 is broken if a
|
|
||||||
multiline prompt (a string containing newlines) is used. The effect is
|
|
||||||
that on the first input line (where the last line of the prompt is the
|
|
||||||
prefix) the input line is wrapped N characters before the last column
|
|
||||||
where N seems to be exactly the length (including newlines) of the
|
|
||||||
prompt ($PS1) minus the characters on the last line of the prompt.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/lib/readline/display.c Thu May 27 22:57:51 2004
|
|
||||||
--- lib/readline/display.c Wed Jul 28 13:48:04 2004
|
|
||||||
***************
|
|
||||||
*** 352,356 ****
|
|
||||||
&prompt_last_invisible,
|
|
||||||
(int *)NULL,
|
|
||||||
! (int *)NULL);
|
|
||||||
c = *t; *t = '\0';
|
|
||||||
/* The portion of the prompt string up to and including the
|
|
||||||
--- 352,356 ----
|
|
||||||
&prompt_last_invisible,
|
|
||||||
(int *)NULL,
|
|
||||||
! &prompt_physical_chars);
|
|
||||||
c = *t; *t = '\0';
|
|
||||||
/* The portion of the prompt string up to and including the
|
|
||||||
***************
|
|
||||||
*** 359,363 ****
|
|
||||||
(int *)NULL,
|
|
||||||
&prompt_invis_chars_first_line,
|
|
||||||
! &prompt_physical_chars);
|
|
||||||
*t = c;
|
|
||||||
return (prompt_prefix_length);
|
|
||||||
--- 359,363 ----
|
|
||||||
(int *)NULL,
|
|
||||||
&prompt_invis_chars_first_line,
|
|
||||||
! (int *)NULL);
|
|
||||||
*t = c;
|
|
||||||
return (prompt_prefix_length);
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 1
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 2
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-003
|
|
||||||
|
|
||||||
Bug-Reported-by: Egmont Koblinger <egmont@uhulinux.hu>
|
|
||||||
Bug-Reference-ID: <Pine.LNX.4.58L0.0407290044500.12603@sziami.cs.bme.hu>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00279.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Bash no longer accepts the `trap signum' syntax when in POSIX mode. This
|
|
||||||
patch restores a measure of backwards compatibility.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/builtins/trap.def Thu May 27 22:26:19 2004
|
|
||||||
--- builtins/trap.def Thu Aug 5 08:55:43 2004
|
|
||||||
***************
|
|
||||||
*** 24,28 ****
|
|
||||||
$BUILTIN trap
|
|
||||||
$FUNCTION trap_builtin
|
|
||||||
! $SHORT_DOC trap [-lp] [[arg] signal_spec ...]
|
|
||||||
The command ARG is to be read and executed when the shell receives
|
|
||||||
signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC
|
|
||||||
--- 24,28 ----
|
|
||||||
$BUILTIN trap
|
|
||||||
$FUNCTION trap_builtin
|
|
||||||
! $SHORT_DOC trap [-lp] [arg signal_spec ...]
|
|
||||||
The command ARG is to be read and executed when the shell receives
|
|
||||||
signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC
|
|
||||||
***************
|
|
||||||
*** 88,92 ****
|
|
||||||
WORD_LIST *list;
|
|
||||||
{
|
|
||||||
! int list_signal_names, display, result, opt;
|
|
||||||
|
|
||||||
list_signal_names = display = 0;
|
|
||||||
--- 88,92 ----
|
|
||||||
WORD_LIST *list;
|
|
||||||
{
|
|
||||||
! int list_signal_names, display, result, opt, first_signal;
|
|
||||||
|
|
||||||
list_signal_names = display = 0;
|
|
||||||
***************
|
|
||||||
*** 119,130 ****
|
|
||||||
{
|
|
||||||
char *first_arg;
|
|
||||||
! int operation, sig;
|
|
||||||
|
|
||||||
operation = SET;
|
|
||||||
first_arg = list->word->word;
|
|
||||||
/* When in posix mode, the historical behavior of looking for a
|
|
||||||
missing first argument is disabled. To revert to the original
|
|
||||||
signal handling disposition, use `-' as the first argument. */
|
|
||||||
! if (posixly_correct == 0 && first_arg && *first_arg &&
|
|
||||||
(*first_arg != '-' || first_arg[1]) &&
|
|
||||||
signal_object_p (first_arg, opt) && list->next == 0)
|
|
||||||
--- 119,135 ----
|
|
||||||
{
|
|
||||||
char *first_arg;
|
|
||||||
! int operation, sig, first_signal;
|
|
||||||
|
|
||||||
operation = SET;
|
|
||||||
first_arg = list->word->word;
|
|
||||||
+ first_signal = first_arg && *first_arg && all_digits (first_arg) && signal_object_p (first_arg, opt);
|
|
||||||
+
|
|
||||||
+ /* Backwards compatibility */
|
|
||||||
+ if (first_signal)
|
|
||||||
+ operation = REVERT;
|
|
||||||
/* When in posix mode, the historical behavior of looking for a
|
|
||||||
missing first argument is disabled. To revert to the original
|
|
||||||
signal handling disposition, use `-' as the first argument. */
|
|
||||||
! else if (posixly_correct == 0 && first_arg && *first_arg &&
|
|
||||||
(*first_arg != '-' || first_arg[1]) &&
|
|
||||||
signal_object_p (first_arg, opt) && list->next == 0)
|
|
||||||
*** ../bash-3.0/doc/bashref.texi Sat Jun 26 14:26:07 2004
|
|
||||||
--- doc/bashref.texi Fri Aug 27 12:33:46 2004
|
|
||||||
***************
|
|
||||||
*** 5954,5958 ****
|
|
||||||
The @code{trap} builtin doesn't check the first argument for a possible
|
|
||||||
signal specification and revert the signal handling to the original
|
|
||||||
! disposition if it is. If users want to reset the handler for a given
|
|
||||||
signal to the original disposition, they should use @samp{-} as the
|
|
||||||
first argument.
|
|
||||||
--- 5967,5972 ----
|
|
||||||
The @code{trap} builtin doesn't check the first argument for a possible
|
|
||||||
signal specification and revert the signal handling to the original
|
|
||||||
! disposition if it is, unless that argument consists solely of digits and
|
|
||||||
! is a valid signal number. If users want to reset the handler for a given
|
|
||||||
signal to the original disposition, they should use @samp{-} as the
|
|
||||||
first argument.
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 2
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 3
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
*** ../bash-3.0/tests/errors.right Thu May 27 22:26:03 2004
|
|
||||||
--- tests/errors.right Sat Aug 7 22:35:10 2004
|
|
||||||
***************
|
|
||||||
*** 86,90 ****
|
|
||||||
./errors.tests: line 216: trap: NOSIG: invalid signal specification
|
|
||||||
./errors.tests: line 219: trap: -s: invalid option
|
|
||||||
! trap: usage: trap [-lp] [[arg] signal_spec ...]
|
|
||||||
./errors.tests: line 225: return: can only `return' from a function or sourced script
|
|
||||||
./errors.tests: line 229: break: 0: loop count out of range
|
|
||||||
--- 86,90 ----
|
|
||||||
./errors.tests: line 216: trap: NOSIG: invalid signal specification
|
|
||||||
./errors.tests: line 219: trap: -s: invalid option
|
|
||||||
! trap: usage: trap [-lp] [arg signal_spec ...]
|
|
||||||
./errors.tests: line 225: return: can only `return' from a function or sourced script
|
|
||||||
./errors.tests: line 229: break: 0: loop count out of range
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-004
|
|
||||||
|
|
||||||
Bug-Reported-by: Stephane Chazelas <stephane_chazelas@yahoo.fr>
|
|
||||||
Bug-Reference-ID: <20040902131957.GC1860@frhdtmp102861.morse.corp.wan>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00291.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Calculation of lengths and offsets for parameter string length and substring
|
|
||||||
expansion does not correctly account for multibyte characters.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/subst.c Sun Jul 4 13:56:13 2004
|
|
||||||
--- subst.c Thu Aug 12 13:36:17 2004
|
|
||||||
***************
|
|
||||||
*** 4692,4695 ****
|
|
||||||
--- 4692,4715 ----
|
|
||||||
}
|
|
||||||
|
|
||||||
+ #if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ size_t
|
|
||||||
+ mbstrlen (s)
|
|
||||||
+ const char *s;
|
|
||||||
+ {
|
|
||||||
+ size_t clen, nc;
|
|
||||||
+ mbstate_t mbs;
|
|
||||||
+
|
|
||||||
+ nc = 0;
|
|
||||||
+ memset (&mbs, 0, sizeof (mbs));
|
|
||||||
+ while ((clen = mbrlen(s, MB_CUR_MAX, &mbs)) != 0 && (MB_INVALIDCH(clen) == 0))
|
|
||||||
+ {
|
|
||||||
+ s += clen;
|
|
||||||
+ nc++;
|
|
||||||
+ }
|
|
||||||
+ return nc;
|
|
||||||
+ }
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+
|
|
||||||
/* Handle the parameter brace expansion that requires us to return the
|
|
||||||
length of a parameter. */
|
|
||||||
***************
|
|
||||||
*** 4747,4758 ****
|
|
||||||
{
|
|
||||||
t = get_dollar_var_value (arg_index);
|
|
||||||
! number = STRLEN (t);
|
|
||||||
FREE (t);
|
|
||||||
}
|
|
||||||
#if defined (ARRAY_VARS)
|
|
||||||
! else if ((var = find_variable (name + 1)) && array_p (var))
|
|
||||||
{
|
|
||||||
t = array_reference (array_cell (var), 0);
|
|
||||||
! number = STRLEN (t);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
--- 4767,4778 ----
|
|
||||||
{
|
|
||||||
t = get_dollar_var_value (arg_index);
|
|
||||||
! number = MB_STRLEN (t);
|
|
||||||
FREE (t);
|
|
||||||
}
|
|
||||||
#if defined (ARRAY_VARS)
|
|
||||||
! else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && array_p (var))
|
|
||||||
{
|
|
||||||
t = array_reference (array_cell (var), 0);
|
|
||||||
! number = MB_STRLEN (t);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
***************
|
|
||||||
*** 4767,4771 ****
|
|
||||||
dispose_words (list);
|
|
||||||
|
|
||||||
! number = STRLEN (t);
|
|
||||||
FREE (t);
|
|
||||||
}
|
|
||||||
--- 4787,4791 ----
|
|
||||||
dispose_words (list);
|
|
||||||
|
|
||||||
! number = MB_STRLEN (t);
|
|
||||||
FREE (t);
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 4872,4876 ****
|
|
||||||
case VT_VARIABLE:
|
|
||||||
case VT_ARRAYMEMBER:
|
|
||||||
! len = strlen (value);
|
|
||||||
break;
|
|
||||||
case VT_POSPARMS:
|
|
||||||
--- 4892,4896 ----
|
|
||||||
case VT_VARIABLE:
|
|
||||||
case VT_ARRAYMEMBER:
|
|
||||||
! len = MB_STRLEN (value);
|
|
||||||
break;
|
|
||||||
case VT_POSPARMS:
|
|
||||||
*** ../bash-3.0/include/shmbutil.h Mon Apr 19 09:59:42 2004
|
|
||||||
--- include/shmbutil.h Thu Sep 2 15:20:47 2004
|
|
||||||
***************
|
|
||||||
*** 32,35 ****
|
|
||||||
--- 32,37 ----
|
|
||||||
extern size_t xdupmbstowcs __P((wchar_t **, char ***, const char *));
|
|
||||||
|
|
||||||
+ extern size_t mbstrlen __P((const char *));
|
|
||||||
+
|
|
||||||
extern char *xstrchr __P((const char *, int));
|
|
||||||
|
|
||||||
***************
|
|
||||||
*** 39,42 ****
|
|
||||||
--- 41,47 ----
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+ #define MBSLEN(s) (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0)
|
|
||||||
+ #define MB_STRLEN(s) ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s))
|
|
||||||
+
|
|
||||||
#else /* !HANDLE_MULTIBYTE */
|
|
||||||
|
|
||||||
***************
|
|
||||||
*** 54,57 ****
|
|
||||||
--- 59,64 ----
|
|
||||||
#define MB_NULLWCH(x) (0)
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+ #define MB_STRLEN(s) (STRLEN(s))
|
|
||||||
|
|
||||||
#endif /* !HANDLE_MULTIBYTE */
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 3
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 4
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-005
|
|
||||||
|
|
||||||
Bug-Reported-by: schwab@suse.de
|
|
||||||
Bug-Reference-ID: <20040801085535.E83D41DB3FFE9@sykes.suse.de>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00004.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Moving upwards in the history (with previous-history) and back again
|
|
||||||
clobbers the last history line.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/lib/readline/misc.c Wed Jul 7 08:56:32 2004
|
|
||||||
--- lib/readline/misc.c Sat Aug 7 22:38:53 2004
|
|
||||||
***************
|
|
||||||
*** 277,286 ****
|
|
||||||
_rl_saved_line_for_history->data = (char *)rl_undo_list;
|
|
||||||
}
|
|
||||||
- else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line) == 0)
|
|
||||||
- {
|
|
||||||
- free (_rl_saved_line_for_history->line);
|
|
||||||
- _rl_saved_line_for_history->line = savestring (rl_line_buffer);
|
|
||||||
- _rl_saved_line_for_history->data = (char *)rl_undo_list; /* XXX possible memleak */
|
|
||||||
- }
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
--- 277,280 ----
|
|
||||||
*** ../bash-3.0/lib/readline/vi_mode.c Tue Jul 13 14:08:27 2004
|
|
||||||
--- lib/readline/vi_mode.c Tue Aug 17 00:12:09 2004
|
|
||||||
***************
|
|
||||||
*** 273,280 ****
|
|
||||||
--- 273,282 ----
|
|
||||||
{
|
|
||||||
case '?':
|
|
||||||
+ _rl_free_saved_history_line ();
|
|
||||||
rl_noninc_forward_search (count, key);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '/':
|
|
||||||
+ _rl_free_saved_history_line ();
|
|
||||||
rl_noninc_reverse_search (count, key);
|
|
||||||
break;
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 4
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 5
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,165 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-006
|
|
||||||
|
|
||||||
Bug-Reported-by: alexander@skwar.name
|
|
||||||
Tomohiro KUBOTA <debian@tmail.plala.or.jp>
|
|
||||||
Bug-Reference-ID: <20040801124721.C69B8A2547A@server.bei.digitalprojects.com>
|
|
||||||
<16688.41450.433668.480445@gargle.gargle.HOWL>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00006.html
|
|
||||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257540
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Prompts with multibyte characters or invisible characters following a line
|
|
||||||
wrap are displayed incorrectly.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/lib/readline/display.c Thu May 27 22:57:51 2004
|
|
||||||
--- lib/readline/display.c Mon Aug 30 11:55:02 2004
|
|
||||||
***************
|
|
||||||
*** 202,206 ****
|
|
||||||
{
|
|
||||||
char *r, *ret, *p;
|
|
||||||
! int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
|
|
||||||
|
|
||||||
/* Short-circuit if we can. */
|
|
||||||
--- 202,206 ----
|
|
||||||
{
|
|
||||||
char *r, *ret, *p;
|
|
||||||
! int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
|
|
||||||
|
|
||||||
/* Short-circuit if we can. */
|
|
||||||
***************
|
|
||||||
*** 223,226 ****
|
|
||||||
--- 223,227 ----
|
|
||||||
|
|
||||||
invfl = 0; /* invisible chars in first line of prompt */
|
|
||||||
+ invflset = 0; /* we only want to set invfl once */
|
|
||||||
|
|
||||||
for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
|
|
||||||
***************
|
|
||||||
*** 250,254 ****
|
|
||||||
*r++ = *p++;
|
|
||||||
if (!ignoring)
|
|
||||||
! rl += ind - pind;
|
|
||||||
else
|
|
||||||
ninvis += ind - pind;
|
|
||||||
--- 251,258 ----
|
|
||||||
*r++ = *p++;
|
|
||||||
if (!ignoring)
|
|
||||||
! {
|
|
||||||
! rl += ind - pind;
|
|
||||||
! physchars += _rl_col_width (pmt, pind, ind);
|
|
||||||
! }
|
|
||||||
else
|
|
||||||
ninvis += ind - pind;
|
|
||||||
***************
|
|
||||||
*** 260,273 ****
|
|
||||||
*r++ = *p;
|
|
||||||
if (!ignoring)
|
|
||||||
! rl++; /* visible length byte counter */
|
|
||||||
else
|
|
||||||
ninvis++; /* invisible chars byte counter */
|
|
||||||
}
|
|
||||||
|
|
||||||
! if (rl >= _rl_screenwidth)
|
|
||||||
! invfl = ninvis;
|
|
||||||
!
|
|
||||||
! if (ignoring == 0)
|
|
||||||
! physchars++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--- 264,280 ----
|
|
||||||
*r++ = *p;
|
|
||||||
if (!ignoring)
|
|
||||||
! {
|
|
||||||
! rl++; /* visible length byte counter */
|
|
||||||
! physchars++;
|
|
||||||
! }
|
|
||||||
else
|
|
||||||
ninvis++; /* invisible chars byte counter */
|
|
||||||
}
|
|
||||||
|
|
||||||
! if (invflset == 0 && rl >= _rl_screenwidth)
|
|
||||||
! {
|
|
||||||
! invfl = ninvis;
|
|
||||||
! invflset = 1;
|
|
||||||
! }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 418,422 ****
|
|
||||||
register char *line;
|
|
||||||
int c_pos, inv_botlin, lb_botlin, lb_linenum;
|
|
||||||
! int newlines, lpos, temp, modmark;
|
|
||||||
char *prompt_this_line;
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
--- 425,429 ----
|
|
||||||
register char *line;
|
|
||||||
int c_pos, inv_botlin, lb_botlin, lb_linenum;
|
|
||||||
! int newlines, lpos, temp, modmark, n0, num;
|
|
||||||
char *prompt_this_line;
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
***************
|
|
||||||
*** 574,577 ****
|
|
||||||
--- 581,585 ----
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
memset (_rl_wrapped_line, 0, vis_lbsize);
|
|
||||||
+ num = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
***************
|
|
||||||
*** 592,596 ****
|
|
||||||
--- 600,619 ----
|
|
||||||
prompts that exceed two physical lines?
|
|
||||||
Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
|
|
||||||
+ #if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ n0 = num;
|
|
||||||
+ temp = local_prompt ? strlen (local_prompt) : 0;
|
|
||||||
+ while (num < temp)
|
|
||||||
+ {
|
|
||||||
+ if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth)
|
|
||||||
+ {
|
|
||||||
+ num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ num++;
|
|
||||||
+ }
|
|
||||||
+ temp = num +
|
|
||||||
+ #else
|
|
||||||
temp = ((newlines + 1) * _rl_screenwidth) +
|
|
||||||
+ #endif /* !HANDLE_MULTIBYTE */
|
|
||||||
((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
|
|
||||||
: ((newlines == 1) ? wrap_offset : 0))
|
|
||||||
***************
|
|
||||||
*** 598,602 ****
|
|
||||||
--- 621,629 ----
|
|
||||||
|
|
||||||
inv_lbreaks[++newlines] = temp;
|
|
||||||
+ #if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ lpos -= _rl_col_width (local_prompt, n0, num);
|
|
||||||
+ #else
|
|
||||||
lpos -= _rl_screenwidth;
|
|
||||||
+ #endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 5
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 6
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-007
|
|
||||||
|
|
||||||
Bug-Reported-by: Oliver Kiddle <okiddle@yahoo.co.uk>
|
|
||||||
Tim Waugh <twaugh@redhat.com>
|
|
||||||
Bug-Reference-ID: <10454.1091313247@athlon>
|
|
||||||
<20040804100140.GX8175@redhat.com>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00313.html
|
|
||||||
http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00056.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Two bugs:
|
|
||||||
|
|
||||||
How does it decide what characters are allowed. The following really
|
|
||||||
looks like a bug to me:
|
|
||||||
$ echo {<C4>..D}
|
|
||||||
That's accepted and produces output that seems to wrap round to ^A and
|
|
||||||
then goes up to D. Note that I'm using an ISO-8859-1 locale. If that
|
|
||||||
works at all, it should surely descend.
|
|
||||||
|
|
||||||
This short script:
|
|
||||||
|
|
||||||
var=baz
|
|
||||||
echo foo{bar,${var}.}
|
|
||||||
echo foo{bar,${var}}
|
|
||||||
|
|
||||||
gives the following output with bash-3.0:
|
|
||||||
|
|
||||||
./test: line 2: foo${var.}: bad substitution
|
|
||||||
foobar} foobaz
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/braces.c Thu Dec 4 11:09:52 2003
|
|
||||||
--- braces.c Wed Aug 4 14:34:33 2004
|
|
||||||
***************
|
|
||||||
*** 341,346 ****
|
|
||||||
if (lhs_t == ST_CHAR)
|
|
||||||
{
|
|
||||||
! lhs_v = lhs[0];
|
|
||||||
! rhs_v = rhs[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
--- 341,346 ----
|
|
||||||
if (lhs_t == ST_CHAR)
|
|
||||||
{
|
|
||||||
! lhs_v = (unsigned char)lhs[0];
|
|
||||||
! rhs_v = (unsigned char)rhs[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
***************
|
|
||||||
*** 403,406 ****
|
|
||||||
--- 403,407 ----
|
|
||||||
pass_next = 1;
|
|
||||||
i++;
|
|
||||||
+ level++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 6
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 7
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-008
|
|
||||||
|
|
||||||
Bug-Reported-by: uberlord@rsm.demon.co.uk
|
|
||||||
Bug-Reference-ID: <1092327965.4233.1.camel@uberlaptop.ubernet>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00144.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
> Description:
|
|
||||||
> Bash 3 breaks array expansion
|
|
||||||
>
|
|
||||||
> Repeat-By:
|
|
||||||
> #!/bin/bash
|
|
||||||
> x=(one two)
|
|
||||||
> echo ${x[@]:1}
|
|
||||||
> # prints nothing in bash 3
|
|
||||||
> # prints two in bash 2
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/subst.c Sun Jul 4 13:56:13 2004
|
|
||||||
--- subst.c Thu Aug 12 13:36:17 2004
|
|
||||||
***************
|
|
||||||
*** 4892,4896 ****
|
|
||||||
*e1p += len;
|
|
||||||
|
|
||||||
! if (*e1p >= len || *e1p < 0)
|
|
||||||
return (-1);
|
|
||||||
|
|
||||||
--- 4912,4916 ----
|
|
||||||
*e1p += len;
|
|
||||||
|
|
||||||
! if (*e1p > len || *e1p < 0)
|
|
||||||
return (-1);
|
|
||||||
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 7
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 8
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-009
|
|
||||||
|
|
||||||
Bug-Reported-by: Tim Waugh <twaugh@redhat.com>
|
|
||||||
Bug-Reference-ID: <20040810083805.GT2177@redhat.com>
|
|
||||||
Bug-Reference-URL: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129526b
|
|
||||||
http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00116.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
-->
|
|
||||||
Steps to Reproduce:
|
|
||||||
1. Launch a bash shell
|
|
||||||
2. Set editing mode to 'vi' with 'set -o vi'
|
|
||||||
3. Type any command, but don't hit return
|
|
||||||
4. Enter vi-command mode by hitting the escape key
|
|
||||||
5. Go to the end of line with the '$' command
|
|
||||||
6. Type 'r' to change the last character
|
|
||||||
7. Type any character (other than what the character already is)
|
|
||||||
|
|
||||||
The last two characters are inexplicably swapped
|
|
||||||
after the last character is changed.
|
|
||||||
<--
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/lib/readline/vi_mode.c Tue Jul 13 14:08:27 2004
|
|
||||||
--- lib/readline/vi_mode.c Tue Aug 17 00:12:09 2004
|
|
||||||
***************
|
|
||||||
*** 691,695 ****
|
|
||||||
wchar_t wc;
|
|
||||||
char mb[MB_LEN_MAX+1];
|
|
||||||
! int mblen;
|
|
||||||
mbstate_t ps;
|
|
||||||
|
|
||||||
--- 693,697 ----
|
|
||||||
wchar_t wc;
|
|
||||||
char mb[MB_LEN_MAX+1];
|
|
||||||
! int mblen, p;
|
|
||||||
mbstate_t ps;
|
|
||||||
|
|
||||||
***************
|
|
||||||
*** 714,722 ****
|
|
||||||
if (wc)
|
|
||||||
{
|
|
||||||
mblen = wcrtomb (mb, wc, &ps);
|
|
||||||
if (mblen >= 0)
|
|
||||||
mb[mblen] = '\0';
|
|
||||||
rl_begin_undo_group ();
|
|
||||||
! rl_delete (1, 0);
|
|
||||||
rl_insert_text (mb);
|
|
||||||
rl_end_undo_group ();
|
|
||||||
--- 716,727 ----
|
|
||||||
if (wc)
|
|
||||||
{
|
|
||||||
+ p = rl_point;
|
|
||||||
mblen = wcrtomb (mb, wc, &ps);
|
|
||||||
if (mblen >= 0)
|
|
||||||
mb[mblen] = '\0';
|
|
||||||
rl_begin_undo_group ();
|
|
||||||
! rl_vi_delete (1, 0);
|
|
||||||
! if (rl_point < p) /* Did we retreat at EOL? */
|
|
||||||
! rl_point++; /* XXX - should we advance more than 1 for mbchar? */
|
|
||||||
rl_insert_text (mb);
|
|
||||||
rl_end_undo_group ();
|
|
||||||
***************
|
|
||||||
*** 1311,1320 ****
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
|
||||||
! while (_rl_insert_char (1, c))
|
|
||||||
! {
|
|
||||||
! RL_SETSTATE (RL_STATE_MOREINPUT);
|
|
||||||
! c = rl_read_key ();
|
|
||||||
! RL_UNSETSTATE (RL_STATE_MOREINPUT);
|
|
||||||
! }
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
--- 1316,1329 ----
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
|
||||||
! {
|
|
||||||
! if (rl_point < p) /* Did we retreat at EOL? */
|
|
||||||
! rl_point++;
|
|
||||||
! while (_rl_insert_char (1, c))
|
|
||||||
! {
|
|
||||||
! RL_SETSTATE (RL_STATE_MOREINPUT);
|
|
||||||
! c = rl_read_key ();
|
|
||||||
! RL_UNSETSTATE (RL_STATE_MOREINPUT);
|
|
||||||
! }
|
|
||||||
! }
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 8
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 9
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-010
|
|
||||||
|
|
||||||
Bug-Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
||||||
Bug-Reference-ID: <E1Bo8Sq-0004u5-00@bouh>
|
|
||||||
Bug-Reference-URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261142
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
When trying to auto-complete ~/../``/, I just get:
|
|
||||||
malloc: bashline.c:1340: assertion botched
|
|
||||||
free: start and end chunk sizes differ
|
|
||||||
last command: kill -9 %2
|
|
||||||
Stopping myself...
|
|
||||||
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/bashline.c Mon Jul 5 23:22:12 2004
|
|
||||||
--- bashline.c Thu Sep 2 16:00:12 2004
|
|
||||||
***************
|
|
||||||
*** 101,104 ****
|
|
||||||
--- 101,105 ----
|
|
||||||
|
|
||||||
/* Helper functions for Readline. */
|
|
||||||
+ static int bash_directory_expansion __P((char **));
|
|
||||||
static int bash_directory_completion_hook __P((char **));
|
|
||||||
static int filename_completion_ignore __P((char **));
|
|
||||||
***************
|
|
||||||
*** 293,297 ****
|
|
||||||
at = strchr (rl_completer_word_break_characters, '@');
|
|
||||||
if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
|
|
||||||
! return;
|
|
||||||
|
|
||||||
/* We have something to do. Do it. */
|
|
||||||
--- 294,298 ----
|
|
||||||
at = strchr (rl_completer_word_break_characters, '@');
|
|
||||||
if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
|
|
||||||
! return old_value;
|
|
||||||
|
|
||||||
/* We have something to do. Do it. */
|
|
||||||
***************
|
|
||||||
*** 1407,1414 ****
|
|
||||||
if (*hint_text == '~')
|
|
||||||
{
|
|
||||||
! int l, tl, vl;
|
|
||||||
vl = strlen (val);
|
|
||||||
tl = strlen (hint_text);
|
|
||||||
l = vl - hint_len; /* # of chars added */
|
|
||||||
temp = (char *)xmalloc (l + 2 + tl);
|
|
||||||
strcpy (temp, hint_text);
|
|
||||||
--- 1408,1424 ----
|
|
||||||
if (*hint_text == '~')
|
|
||||||
{
|
|
||||||
! int l, tl, vl, dl;
|
|
||||||
! char *rd;
|
|
||||||
vl = strlen (val);
|
|
||||||
tl = strlen (hint_text);
|
|
||||||
+ #if 0
|
|
||||||
l = vl - hint_len; /* # of chars added */
|
|
||||||
+ #else
|
|
||||||
+ rd = savestring (filename_hint);
|
|
||||||
+ bash_directory_expansion (&rd);
|
|
||||||
+ dl = strlen (rd);
|
|
||||||
+ l = vl - dl; /* # of chars added */
|
|
||||||
+ free (rd);
|
|
||||||
+ #endif
|
|
||||||
temp = (char *)xmalloc (l + 2 + tl);
|
|
||||||
strcpy (temp, hint_text);
|
|
||||||
***************
|
|
||||||
*** 2188,2191 ****
|
|
||||||
--- 2198,2222 ----
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Simulate the expansions that will be performed by
|
|
||||||
+ rl_filename_completion_function. This must be called with the address of
|
|
||||||
+ a pointer to malloc'd memory. */
|
|
||||||
+ static int
|
|
||||||
+ bash_directory_expansion (dirname)
|
|
||||||
+ char **dirname;
|
|
||||||
+ {
|
|
||||||
+ char *d;
|
|
||||||
+
|
|
||||||
+ d = savestring (*dirname);
|
|
||||||
+
|
|
||||||
+ if (rl_directory_rewrite_hook)
|
|
||||||
+ (*rl_directory_rewrite_hook) (&d);
|
|
||||||
+
|
|
||||||
+ if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d))
|
|
||||||
+ {
|
|
||||||
+ free (*dirname);
|
|
||||||
+ *dirname = d;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* Handle symbolic link references and other directory name
|
|
||||||
expansions while hacking completion. */
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 9
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 10
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-011
|
|
||||||
|
|
||||||
Bug-Reported-by: Egmont Koblinger <egmont@uhulinux.hu>
|
|
||||||
Bug-Reference-ID: <Pine.LNX.4.58L0.0407282151140.8088@sziami.cs.bme.hu>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00277.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
I've just upgraded to readline 5.0 and bash 3.0 and tried them with UTF-8
|
|
||||||
encoding. I found line editing to be quite buggy:
|
|
||||||
|
|
||||||
I type an accented letter, let's say <E1>. Then <E1> appears. I press the left
|
|
||||||
arrow, the cursor goes back, it is now over <E1>. I press <E9>. Now <E9><E1> is
|
|
||||||
visible, which is correct, but the cursor is past the two letters, though
|
|
||||||
it should be over <E1>. Here only the first Left arrow takes affect, moves
|
|
||||||
the cursor over <E1>, but the 2nd time I press Left, it just beeps, doesn't
|
|
||||||
move to the first char (<E9>). Now a Right arrow doesn't move the cursor, but
|
|
||||||
causes further Left and Right arrows to work as expected. To go on,
|
|
||||||
similar bug occurs nearly every time that I insert an accented letter
|
|
||||||
before or amongs other ones (but not at the end of the line). When the
|
|
||||||
command line has about ten or twenty accented letters (and no or hardly
|
|
||||||
any non-accented ones), line editing becomes a total chaos, where
|
|
||||||
sometimes inserting another accented letter causes the cursor to jump many
|
|
||||||
characters to the right, and pressing the Left arrow sometimes causes the
|
|
||||||
cursor to jump back lots of characters at once.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/lib/readline/mbutil.c Wed Jan 14 09:44:52 2004
|
|
||||||
--- lib/readline/mbutil.c Wed Aug 18 22:25:57 2004
|
|
||||||
***************
|
|
||||||
*** 127,135 ****
|
|
||||||
{
|
|
||||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
|
||||||
! while (wcwidth (wc) == 0)
|
|
||||||
{
|
|
||||||
point += tmp;
|
|
||||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
|
||||||
! if (tmp == (size_t)(0) || tmp == (size_t)(-1) || tmp == (size_t)(-2))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
--- 127,135 ----
|
|
||||||
{
|
|
||||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
|
||||||
! while (tmp > 0 && wcwidth (wc) == 0)
|
|
||||||
{
|
|
||||||
point += tmp;
|
|
||||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
|
||||||
! if (MB_NULLWCH (tmp) || MB_INVALIDCH (tmp))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 10
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 11
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-012
|
|
||||||
|
|
||||||
Bug-Reported-by: ben@ncipher.com
|
|
||||||
Bug-Reference-ID: <E1BxQYe-0002p1-00@berdoo.ncipher.com>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00215.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
When using the pipefail option, the following command:
|
|
||||||
echo foo | false
|
|
||||||
produces an exit status of 0, ignoring the exit status of false.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/jobs.c Fri Apr 23 16:28:25 2004
|
|
||||||
--- jobs.c Wed Aug 18 11:15:07 2004
|
|
||||||
***************
|
|
||||||
*** 1779,1784 ****
|
|
||||||
{
|
|
||||||
fail = 0;
|
|
||||||
! for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next)
|
|
||||||
! if (p->status != EXECUTION_SUCCESS) fail = p->status;
|
|
||||||
return fail;
|
|
||||||
}
|
|
||||||
--- 1779,1789 ----
|
|
||||||
{
|
|
||||||
fail = 0;
|
|
||||||
! p = jobs[job]->pipe;
|
|
||||||
! do
|
|
||||||
! {
|
|
||||||
! if (p->status != EXECUTION_SUCCESS) fail = p->status;
|
|
||||||
! p = p->next;
|
|
||||||
! }
|
|
||||||
! while (p != jobs[job]->pipe);
|
|
||||||
return fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 11
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 12
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-013
|
|
||||||
|
|
||||||
Bug-Reported-by: Len Lattanzi <llattanzi@apple.com>
|
|
||||||
Bug-Reference-ID: <556CE1CE-E1AC-11D8-A2D9-00039383EC60@apple.com>
|
|
||||||
Bug-Reference-URL:
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
vi-mode filename completion/glob expansion should understand and perform
|
|
||||||
tilde expansion.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0/bashline.c Mon Jul 5 23:22:12 2004
|
|
||||||
--- bashline.c Thu Sep 2 16:00:12 2004
|
|
||||||
***************
|
|
||||||
*** 2514,2518 ****
|
|
||||||
static int ind;
|
|
||||||
int glen;
|
|
||||||
! char *ret;
|
|
||||||
|
|
||||||
if (state == 0)
|
|
||||||
--- 2545,2549 ----
|
|
||||||
static int ind;
|
|
||||||
int glen;
|
|
||||||
! char *ret, *ttext;
|
|
||||||
|
|
||||||
if (state == 0)
|
|
||||||
***************
|
|
||||||
*** 2524,2538 ****
|
|
||||||
FREE (globtext);
|
|
||||||
|
|
||||||
if (rl_explicit_arg)
|
|
||||||
{
|
|
||||||
! globorig = savestring (text);
|
|
||||||
! glen = strlen (text);
|
|
||||||
globtext = (char *)xmalloc (glen + 2);
|
|
||||||
! strcpy (globtext, text);
|
|
||||||
globtext[glen] = '*';
|
|
||||||
globtext[glen+1] = '\0';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
! globtext = globorig = savestring (text);
|
|
||||||
|
|
||||||
matches = shell_glob_filename (globtext);
|
|
||||||
--- 2555,2574 ----
|
|
||||||
FREE (globtext);
|
|
||||||
|
|
||||||
+ ttext = bash_tilde_expand (text, 0);
|
|
||||||
+
|
|
||||||
if (rl_explicit_arg)
|
|
||||||
{
|
|
||||||
! globorig = savestring (ttext);
|
|
||||||
! glen = strlen (ttext);
|
|
||||||
globtext = (char *)xmalloc (glen + 2);
|
|
||||||
! strcpy (globtext, ttext);
|
|
||||||
globtext[glen] = '*';
|
|
||||||
globtext[glen+1] = '\0';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
! globtext = globorig = savestring (ttext);
|
|
||||||
!
|
|
||||||
! if (ttext != text)
|
|
||||||
! free (ttext);
|
|
||||||
|
|
||||||
matches = shell_glob_filename (globtext);
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 12
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 13
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-014
|
|
||||||
|
|
||||||
Bug-Reported-by: agriffis@gentoo.org
|
|
||||||
Bug-Reference-ID: <20040929024759.A437FEB1E0@piment.flatmonk.org>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00250.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
#
|
|
||||||
# BROKEN case: variable with braces inside quotes
|
|
||||||
#
|
|
||||||
|
|
||||||
$ D=W
|
|
||||||
$ echo "${D}"{illy,onka} => W{illy,onka}
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0-patched/braces.c Wed Sep 8 11:07:53 2004
|
|
||||||
--- braces.c Fri Sep 17 18:42:36 2004
|
|
||||||
***************
|
|
||||||
*** 403,407 ****
|
|
||||||
pass_next = 1;
|
|
||||||
i++;
|
|
||||||
! level++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
--- 403,408 ----
|
|
||||||
pass_next = 1;
|
|
||||||
i++;
|
|
||||||
! if (quoted == 0)
|
|
||||||
! level++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
*** ../bash-3.0-patched/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 13
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 14
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-015
|
|
||||||
|
|
||||||
Bug-Reported-by: opengeometry@yahoo.ca
|
|
||||||
Bug-Reference-ID: <200410202012.i9KKCTEB001860@node1.opengeometry.net>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-10/msg00297.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Shell variable can start with number and can even be printed with
|
|
||||||
'declare', as in
|
|
||||||
1=aaa
|
|
||||||
1a=bbb
|
|
||||||
declare -p 1 1a
|
|
||||||
|
|
||||||
But, they can't be removed, as in
|
|
||||||
unset 1 1a --> ...: not a valid identifier
|
|
||||||
|
|
||||||
Bash-2.05b correctly gives me error, however.
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0-patched/general.c Wed Apr 14 23:20:13 2004
|
|
||||||
--- general.c Wed Oct 20 16:59:59 2004
|
|
||||||
***************
|
|
||||||
*** 268,272 ****
|
|
||||||
|
|
||||||
#if defined (ARRAY_VARS)
|
|
||||||
! if ((legal_variable_starter (c) == 0) && (flags && c != '[')) /* ] */
|
|
||||||
#else
|
|
||||||
if (legal_variable_starter (c) == 0)
|
|
||||||
--- 268,272 ----
|
|
||||||
|
|
||||||
#if defined (ARRAY_VARS)
|
|
||||||
! if ((legal_variable_starter (c) == 0) && (flags == 0 || c != '[')) /* ] */
|
|
||||||
#else
|
|
||||||
if (legal_variable_starter (c) == 0)
|
|
||||||
|
|
||||||
*** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
|
|
||||||
--- patchlevel.h Thu Sep 2 15:04:32 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 14
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 15
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
BASH PATCH REPORT
|
|
||||||
=================
|
|
||||||
|
|
||||||
Bash-Release: 3.0
|
|
||||||
Patch-ID: bash30-016
|
|
||||||
|
|
||||||
Bug-Reported-by: William Park <opengeometry@yahoo.ca>
|
|
||||||
Bug-Reference-ID: <200411012217.iA1MHxL7031818@node1.opengeometry.net>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-11/msg00017.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Offset from the end of array in ${var: -n} is still off by 1. Eg.
|
|
||||||
x=( {0..9} )
|
|
||||||
echo ${x[*]: -1} --> 8 9
|
|
||||||
|
|
||||||
Patch:
|
|
||||||
|
|
||||||
*** ../bash-3.0-patched/subst.c Wed Sep 8 11:07:55 2004
|
|
||||||
--- subst.c Tue Nov 9 16:26:59 2004
|
|
||||||
***************
|
|
||||||
*** 4900,4905 ****
|
|
||||||
case VT_ARRAYVAR:
|
|
||||||
a = (ARRAY *)value;
|
|
||||||
! /* For arrays, the first value deals with array indices. */
|
|
||||||
! len = array_max_index (a); /* arrays index from 0 to n - 1 */
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
--- 4900,4906 ----
|
|
||||||
case VT_ARRAYVAR:
|
|
||||||
a = (ARRAY *)value;
|
|
||||||
! /* For arrays, the first value deals with array indices. Negative
|
|
||||||
! offsets count from one past the array's maximum index. */
|
|
||||||
! len = array_max_index (a) + (*e1p < 0); /* arrays index from 0 to n - 1 */
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
*** ../bash-3.0-patched/tests/array.tests Sat Oct 4 23:25:00 2003
|
|
||||||
--- tests/array.tests Tue Nov 9 16:36:29 2004
|
|
||||||
***************
|
|
||||||
*** 323,327 ****
|
|
||||||
echo positive offset - expect five seven
|
|
||||||
echo ${av[@]:5:2}
|
|
||||||
! echo negative offset - expect five seven
|
|
||||||
echo ${av[@]: -2:2}
|
|
||||||
|
|
||||||
--- 323,327 ----
|
|
||||||
echo positive offset - expect five seven
|
|
||||||
echo ${av[@]:5:2}
|
|
||||||
! echo negative offset to unset element - expect seven
|
|
||||||
echo ${av[@]: -2:2}
|
|
||||||
|
|
||||||
*** ../bash-3.0-patched/tests/array.right Sat Oct 4 23:25:10 2003
|
|
||||||
--- tests/array.right Tue Nov 9 16:37:25 2004
|
|
||||||
***************
|
|
||||||
*** 171,176 ****
|
|
||||||
positive offset - expect five seven
|
|
||||||
five seven
|
|
||||||
! negative offset - expect five seven
|
|
||||||
! five seven
|
|
||||||
positive offset 2 - expect seven
|
|
||||||
seven
|
|
||||||
--- 171,176 ----
|
|
||||||
positive offset - expect five seven
|
|
||||||
five seven
|
|
||||||
! negative offset to unset element - expect seven
|
|
||||||
! seven
|
|
||||||
positive offset 2 - expect seven
|
|
||||||
seven
|
|
||||||
*** ../bash-3.0-patched/patchlevel.h Tue Oct 26 17:13:29 2004
|
|
||||||
--- patchlevel.h Tue Nov 9 16:31:24 2004
|
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 15
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 16
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
||||||
|
|
||||||
<!DOCTYPE PISI SYSTEM "http://www.uludag.org.tr/projeler/pisi/pisi-spec.dtd">
|
|
||||||
|
|
||||||
<PISI>
|
|
||||||
<Source>
|
|
||||||
<Name>bash</Name>
|
|
||||||
<Homepage>http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html</Homepage>
|
|
||||||
<Packager>
|
|
||||||
<Name>Barış Metin</Name>
|
|
||||||
<Email>baris@uludag.org.tr</Email>
|
|
||||||
</Packager>
|
|
||||||
<License>GPL-2</License>
|
|
||||||
<IsA>category</IsA>
|
|
||||||
<PartOf>component</PartOf>
|
|
||||||
<Summary xml:lang="en">The standard GNU Bourne again shell</Summary>
|
|
||||||
<Description xml:lang="en">The standard GNU Bourne again shell</Description>
|
|
||||||
<Archive type="targz" sha1sum="3acf1ff4910d4bc863620c7533cbf4858370017b">ftp://ftp.gnu.org/pub/gnu/bash/bash-3.0.tar.gz</Archive>
|
|
||||||
<Patches>
|
|
||||||
<Patch compressionType="bz2" level="1">bash-3.0-gentoo.diff.bz2</Patch>
|
|
||||||
<Patch>bash30-001</Patch>
|
|
||||||
<Patch>bash30-002</Patch>
|
|
||||||
<Patch>bash30-003</Patch>
|
|
||||||
<Patch>bash30-004</Patch>
|
|
||||||
<Patch>bash30-005</Patch>
|
|
||||||
<Patch>bash30-006</Patch>
|
|
||||||
<Patch>bash30-007</Patch>
|
|
||||||
<Patch>bash30-008</Patch>
|
|
||||||
<Patch>bash30-009</Patch>
|
|
||||||
<Patch>bash30-010</Patch>
|
|
||||||
<Patch>bash30-011</Patch>
|
|
||||||
<Patch>bash30-012</Patch>
|
|
||||||
<Patch>bash30-013</Patch>
|
|
||||||
<Patch>bash30-014</Patch>
|
|
||||||
<Patch>bash30-015</Patch>
|
|
||||||
<Patch>bash30-016</Patch>
|
|
||||||
<Patch level="1">bash-3.0-etc-inputrc.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-darwin-conn.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-afs.patch</Patch>
|
|
||||||
<Patch>bash-3.0-crash.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-jobs.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-manpage.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-pwd.patch</Patch>
|
|
||||||
<Patch>bash-3.0-read-e-segfault.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-ulimit.patch</Patch>
|
|
||||||
<Patch>bash-3.0-read-builtin-pipe.patch</Patch>
|
|
||||||
<Patch>bash-3.0-trap-fg-signals.patch</Patch>
|
|
||||||
<Patch>bash-2.05-2.4.4.patch</Patch>
|
|
||||||
<Patch>bash-2.05a-security.patch</Patch>
|
|
||||||
<Patch>bash-3.0-evalexp.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-locale.patch</Patch>
|
|
||||||
<Patch>bash-3.0-nfs_redir.patch</Patch>
|
|
||||||
<Patch>bash-3.0-utf8.patch</Patch>
|
|
||||||
<Patch>bash-3.0-prompt.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-update-multibyte-ifs.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-random.patch</Patch>
|
|
||||||
<Patch level="1">bash-3.0-privmode.patch</Patch>
|
|
||||||
<Patch>bash-3.0-rl-setenv.patch</Patch>
|
|
||||||
<Patch>bash-3.0-rl-del-backspace-policy.patch</Patch>
|
|
||||||
<Patch>bash-3.0-rl-header.patch</Patch>
|
|
||||||
</Patches>
|
|
||||||
<BuildDependencies>
|
|
||||||
<Dependency versionFrom="5.2">ncurses</Dependency>
|
|
||||||
<Dependency>patch</Dependency>
|
|
||||||
</BuildDependencies>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>2005-07-04</Date>
|
|
||||||
<Version>3.0</Version>
|
|
||||||
<Release>11</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Source>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>bash</Name>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="config">/etc</Path>
|
|
||||||
<Path fileType="binary">/bin</Path>
|
|
||||||
<Path fileType="binary">/usr/bin</Path>
|
|
||||||
<Path fileType="doc">/usr/share/doc</Path>
|
|
||||||
<Path fileType="doc">/usr/share/info</Path>
|
|
||||||
<Path fileType="doc">/usr/share/man</Path>
|
|
||||||
<Path fileType="localedata">/usr/share/locale</Path>
|
|
||||||
</Files>
|
|
||||||
</Package>
|
|
||||||
|
|
||||||
</PISI>
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pisi.actionsapi import gnuconfig
|
|
||||||
from pisi.actionsapi import autotools
|
|
||||||
from pisi.actionsapi import libtoolize
|
|
||||||
from pisi.actionsapi import pisitools
|
|
||||||
from pisi.actionsapi import utils
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
utils.chmod('configure')
|
|
||||||
gnuconfig.gnuconfig_update()
|
|
||||||
libtoolize.libtoolize()
|
|
||||||
autotools.configure()
|
|
||||||
|
|
||||||
def build():
|
|
||||||
autotools.make()
|
|
||||||
|
|
||||||
def install():
|
|
||||||
autotools.install()
|
|
||||||
pisitools.dodoc('AUTHORS', 'ChangeLog', 'INSTALL' ,'NEWS', 'TODO', 'README')
|
|
||||||
@@ -1,975 +0,0 @@
|
|||||||
--- fam-2.7.0/src/DNotify.c++ 2004-01-30 00:00:00.000000000 +0100
|
|
||||||
+++ fam-2.7.0.dnotify/src/DNotify.c++ 2004-01-30 00:00:00.000000000 +0100
|
|
||||||
@@ -0,0 +1,582 @@
|
|
||||||
+// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved.
|
|
||||||
+// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved.
|
|
||||||
+//
|
|
||||||
+// This program is free software; you can redistribute it and/or modify it
|
|
||||||
+// under the terms of version 2 of the GNU General Public License as
|
|
||||||
+// published by the Free Software Foundation.
|
|
||||||
+//
|
|
||||||
+// This program is distributed in the hope that it would be useful, but
|
|
||||||
+// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any
|
|
||||||
+// license provided herein, whether implied or otherwise, is limited to
|
|
||||||
+// this program in accordance with the express provisions of the GNU
|
|
||||||
+// General Public License. Patent licenses, if any, provided herein do not
|
|
||||||
+// apply to combinations of this program with other product or programs, or
|
|
||||||
+// any other product whatsoever. This program is distributed without any
|
|
||||||
+// warranty that the program is delivered free of the rightful claim of any
|
|
||||||
+// third person by way of infringement or the like. 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 the Free Software Foundation, Inc., 59
|
|
||||||
+// Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+#define _GNU_SOURCE
|
|
||||||
+#include <fcntl.h>
|
|
||||||
+
|
|
||||||
+#include <string.h>
|
|
||||||
+#include <signal.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+#include <libgen.h>
|
|
||||||
+
|
|
||||||
+#include "DNotify.h"
|
|
||||||
+
|
|
||||||
+#include "Interest.h"
|
|
||||||
+#include "Log.h"
|
|
||||||
+#include "Scheduler.h"
|
|
||||||
+#include <memory>
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+int DNotify::pipe_write_fd = -2;
|
|
||||||
+int DNotify::pipe_read_fd = -2;
|
|
||||||
+volatile sig_atomic_t DNotify::queue_overflowed = 0;
|
|
||||||
+volatile sig_atomic_t DNotify::queue_changed = 0;
|
|
||||||
+int DNotify::change_queue[QUEUESIZE];
|
|
||||||
+volatile int DNotify::queue_head = 0; // Only modified by read handler
|
|
||||||
+volatile int DNotify::queue_tail = 0; // Only modified by signal handler
|
|
||||||
+DNotify::EventHandler DNotify::ehandler;
|
|
||||||
+
|
|
||||||
+DNotify::DirWatch *DNotify::dir_hash[DIR_HASHSIZE];
|
|
||||||
+DNotify::FileWatch *DNotify::file_hash[FILE_HASHSIZE];
|
|
||||||
+
|
|
||||||
+struct DNotify::FileWatch
|
|
||||||
+{
|
|
||||||
+ DirWatch *dir_watch;
|
|
||||||
+ dev_t file_dev;
|
|
||||||
+ ino_t file_ino;
|
|
||||||
+ FileWatch *next; // The DirWatch.watches list
|
|
||||||
+ FileWatch *hash_link;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct DNotify::DirWatch
|
|
||||||
+{
|
|
||||||
+ int fd;
|
|
||||||
+ dev_t dir_dev;
|
|
||||||
+ ino_t dir_ino;
|
|
||||||
+
|
|
||||||
+ DirWatch *hash_link;
|
|
||||||
+ FileWatch *watches;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct DNotify::ChangeEventData
|
|
||||||
+{
|
|
||||||
+ dev_t file_dev;
|
|
||||||
+ ino_t file_ino;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+DNotify::DNotify(EventHandler h)
|
|
||||||
+{
|
|
||||||
+ assert(ehandler == NULL);
|
|
||||||
+ ehandler = h;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+DNotify::~DNotify()
|
|
||||||
+{
|
|
||||||
+ if (pipe_read_fd >= 0)
|
|
||||||
+ {
|
|
||||||
+ // Tell the scheduler.
|
|
||||||
+
|
|
||||||
+ (void) Scheduler::remove_read_handler(pipe_read_fd);
|
|
||||||
+
|
|
||||||
+ // Close the pipe.
|
|
||||||
+
|
|
||||||
+ if (close(pipe_read_fd) < 0)
|
|
||||||
+ Log::perror("can't pipe read end");
|
|
||||||
+ else
|
|
||||||
+ Log::debug("closed pipe read end");
|
|
||||||
+
|
|
||||||
+ if (close(pipe_write_fd) < 0)
|
|
||||||
+ Log::perror("can't pipe write end");
|
|
||||||
+ else
|
|
||||||
+ Log::debug("closed pipe write end");
|
|
||||||
+ pipe_read_fd = -1;
|
|
||||||
+ }
|
|
||||||
+ ehandler = NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+DNotify::overflow_signal_handler(int sig, siginfo_t *si, void *data)
|
|
||||||
+{
|
|
||||||
+ char c = 'x';
|
|
||||||
+
|
|
||||||
+ {
|
|
||||||
+ char *str = "*************** overflow sigqueue ***********************\n";
|
|
||||||
+ write (STDERR_FILENO, str, strlen(str));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!queue_overflowed)
|
|
||||||
+ {
|
|
||||||
+ queue_overflowed = 1;
|
|
||||||
+ // Trigger the read handler
|
|
||||||
+ write(pipe_write_fd, &c, 1);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+DNotify::signal_handler(int sig, siginfo_t *si, void *data)
|
|
||||||
+{
|
|
||||||
+ int left;
|
|
||||||
+ char c = 'x';
|
|
||||||
+
|
|
||||||
+ if (queue_head <= queue_tail)
|
|
||||||
+ left = (QUEUESIZE + queue_head) - queue_tail;
|
|
||||||
+ else
|
|
||||||
+ left = queue_head - queue_tail;
|
|
||||||
+
|
|
||||||
+ // Must leave at least one item unused to see difference
|
|
||||||
+ // Betweeen empty and full
|
|
||||||
+ if (left <= 1)
|
|
||||||
+ {
|
|
||||||
+ queue_overflowed = 1;
|
|
||||||
+ {
|
|
||||||
+ char *str = "*************** overflow famqueue ****************\n";
|
|
||||||
+ write (STDERR_FILENO, str, strlen(str));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ change_queue[queue_tail] = si->si_fd;
|
|
||||||
+ queue_tail = (queue_tail + 1) % QUEUESIZE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!queue_changed)
|
|
||||||
+ {
|
|
||||||
+ queue_changed = 1;
|
|
||||||
+ // Trigger the read handler
|
|
||||||
+ write(pipe_write_fd, &c, 1);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+bool
|
|
||||||
+DNotify::is_active()
|
|
||||||
+{
|
|
||||||
+ if (pipe_read_fd == -2)
|
|
||||||
+ {
|
|
||||||
+ int filedes[2];
|
|
||||||
+ int res;
|
|
||||||
+
|
|
||||||
+ res = pipe (filedes);
|
|
||||||
+ if (res >= 0)
|
|
||||||
+ { Log::debug("opened pipe");
|
|
||||||
+ pipe_read_fd = filedes[0];
|
|
||||||
+ pipe_write_fd = filedes[1];
|
|
||||||
+
|
|
||||||
+ // Setup signal handler:
|
|
||||||
+ struct sigaction act;
|
|
||||||
+
|
|
||||||
+ act.sa_sigaction = signal_handler;
|
|
||||||
+ sigemptyset(&act.sa_mask);
|
|
||||||
+ act.sa_flags = SA_SIGINFO;
|
|
||||||
+ sigaction(SIGRTMIN, &act, NULL);
|
|
||||||
+
|
|
||||||
+ // When the RT queue overflows we get a SIGIO
|
|
||||||
+ act.sa_sigaction = overflow_signal_handler;
|
|
||||||
+ sigemptyset(&act.sa_mask);
|
|
||||||
+ sigaction(SIGIO, &act, NULL);
|
|
||||||
+
|
|
||||||
+ (void) Scheduler::install_read_handler(pipe_read_fd, read_handler, NULL);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return pipe_read_fd >= 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+DNotify::DirWatch *
|
|
||||||
+DNotify::lookup_dirwatch (int fd)
|
|
||||||
+{
|
|
||||||
+ DirWatch **p;
|
|
||||||
+ DirWatch *w;
|
|
||||||
+
|
|
||||||
+ p = dir_hashchain (fd);
|
|
||||||
+
|
|
||||||
+ while (*p)
|
|
||||||
+ {
|
|
||||||
+ w = *p;
|
|
||||||
+
|
|
||||||
+ if (w->fd == fd)
|
|
||||||
+ return w;
|
|
||||||
+
|
|
||||||
+ p = &w->hash_link;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return *p;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// This colud be made faster by using another hash table.
|
|
||||||
+// But it's not that bad, since it is only used by express/revoke
|
|
||||||
+DNotify::DirWatch *
|
|
||||||
+DNotify::lookup_dirwatch (dev_t dir_dev, ino_t dir_ino)
|
|
||||||
+{
|
|
||||||
+ DirWatch *p;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ for (i=0;i<DIR_HASHSIZE;i++)
|
|
||||||
+ {
|
|
||||||
+ p = dir_hash[i];
|
|
||||||
+
|
|
||||||
+ while (p)
|
|
||||||
+ {
|
|
||||||
+ if (p->dir_dev == dir_dev && p->dir_ino == dir_ino)
|
|
||||||
+ return p;
|
|
||||||
+
|
|
||||||
+ p = p->hash_link;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+DNotify::FileWatch *
|
|
||||||
+DNotify::lookup_filewatch (dev_t dev, ino_t ino)
|
|
||||||
+{
|
|
||||||
+ FileWatch **p;
|
|
||||||
+ FileWatch *w;
|
|
||||||
+
|
|
||||||
+ p = file_hashchain (dev, ino);
|
|
||||||
+
|
|
||||||
+ while (*p)
|
|
||||||
+ {
|
|
||||||
+ w = *p;
|
|
||||||
+
|
|
||||||
+ if (w->file_dev == dev && w->file_ino == ino)
|
|
||||||
+ return w;
|
|
||||||
+
|
|
||||||
+ p = &w->hash_link;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return *p;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// Make sure w is not already in the hash table before calling
|
|
||||||
+// this function.
|
|
||||||
+void
|
|
||||||
+DNotify::hash_dirwatch(DirWatch *w)
|
|
||||||
+{
|
|
||||||
+ DirWatch **p;
|
|
||||||
+ p = dir_hashchain (w->fd);
|
|
||||||
+ w->hash_link = *p;
|
|
||||||
+ *p = w;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// Make sure w is not already in the hash table before calling
|
|
||||||
+// this function.
|
|
||||||
+void
|
|
||||||
+DNotify::hash_filewatch(FileWatch *w)
|
|
||||||
+{
|
|
||||||
+ FileWatch **p;
|
|
||||||
+ p = file_hashchain (w->file_dev, w->file_ino);
|
|
||||||
+ w->hash_link = *p;
|
|
||||||
+ *p = w;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+DNotify::unhash_dirwatch(DirWatch *w)
|
|
||||||
+{
|
|
||||||
+ DirWatch **p;
|
|
||||||
+
|
|
||||||
+ p = dir_hashchain (w->fd);
|
|
||||||
+
|
|
||||||
+ while (*p)
|
|
||||||
+ {
|
|
||||||
+ if (*p == w)
|
|
||||||
+ {
|
|
||||||
+ *p = w->hash_link;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ p = &(*p)->hash_link;
|
|
||||||
+ }
|
|
||||||
+ w->hash_link = NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+DNotify::unhash_filewatch(FileWatch *w)
|
|
||||||
+{
|
|
||||||
+ FileWatch **p;
|
|
||||||
+
|
|
||||||
+ p = file_hashchain (w->file_dev, w->file_ino);
|
|
||||||
+
|
|
||||||
+ while (*p)
|
|
||||||
+ {
|
|
||||||
+ if (*p == w)
|
|
||||||
+ {
|
|
||||||
+ *p = w->hash_link;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ p = &(*p)->hash_link;
|
|
||||||
+ }
|
|
||||||
+ w->hash_link = NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+DNotify::Status
|
|
||||||
+DNotify::watch_dir(const char *notify_dir, dev_t file_dev, ino_t file_ino)
|
|
||||||
+{
|
|
||||||
+ struct stat stat;
|
|
||||||
+ dev_t dir_dev;
|
|
||||||
+ ino_t dir_ino;
|
|
||||||
+ DirWatch *dwatch;
|
|
||||||
+ FileWatch *fw;
|
|
||||||
+
|
|
||||||
+ if (lstat (notify_dir, &stat) == -1)
|
|
||||||
+ return BAD;
|
|
||||||
+
|
|
||||||
+ dwatch = lookup_dirwatch(stat.st_dev, stat.st_ino);
|
|
||||||
+ if (!dwatch)
|
|
||||||
+ {
|
|
||||||
+ Log::debug ("New DirWatch for %s (%x %x)\n",
|
|
||||||
+ notify_dir, (int)stat.st_dev, (int)stat.st_ino);
|
|
||||||
+ dwatch = new DirWatch;
|
|
||||||
+ dwatch->watches = NULL;
|
|
||||||
+ dwatch->hash_link = NULL;
|
|
||||||
+ dwatch->dir_dev = stat.st_dev;
|
|
||||||
+ dwatch->dir_ino = stat.st_ino;
|
|
||||||
+
|
|
||||||
+ dwatch->fd = open(notify_dir, O_RDONLY);
|
|
||||||
+ fcntl (dwatch->fd, F_SETSIG, SIGRTMIN);
|
|
||||||
+ if (fcntl (dwatch->fd, F_NOTIFY,
|
|
||||||
+ (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB)
|
|
||||||
+ | DN_MULTISHOT) == -1) {
|
|
||||||
+ return BAD;
|
|
||||||
+ }
|
|
||||||
+ hash_dirwatch (dwatch);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ fw = lookup_filewatch (file_dev, file_ino);
|
|
||||||
+ if (fw && fw->dir_watch == dwatch)
|
|
||||||
+ return OK;
|
|
||||||
+
|
|
||||||
+ // No old FileWatch, need to add one:
|
|
||||||
+ Log::debug("New FileWatch for %x %x\n", (int)file_dev, (int)file_ino);
|
|
||||||
+ fw = new FileWatch;
|
|
||||||
+ fw->next = dwatch->watches;
|
|
||||||
+ dwatch->watches = fw;
|
|
||||||
+ fw->file_dev = file_dev;
|
|
||||||
+ fw->file_ino = file_ino;
|
|
||||||
+ fw->dir_watch = dwatch;
|
|
||||||
+ hash_filewatch(fw);
|
|
||||||
+ return OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+char *
|
|
||||||
+dirname_dup (const char *name)
|
|
||||||
+{
|
|
||||||
+ char *copy = strdup(name);
|
|
||||||
+ char *res = dirname(copy);
|
|
||||||
+ res = strdup(res);
|
|
||||||
+ free (copy);
|
|
||||||
+ return res;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+DNotify::Status
|
|
||||||
+DNotify::express(const char *name, struct stat *status)
|
|
||||||
+{
|
|
||||||
+ struct stat stat;
|
|
||||||
+ char *notify_dir;
|
|
||||||
+ int res;
|
|
||||||
+ Status s;
|
|
||||||
+ dev_t dev;
|
|
||||||
+ ino_t ino;
|
|
||||||
+
|
|
||||||
+ Log::debug("express() name: %s\n", name);
|
|
||||||
+
|
|
||||||
+ if (!is_active())
|
|
||||||
+ return BAD;
|
|
||||||
+
|
|
||||||
+ if (::lstat (name, &stat) == -1)
|
|
||||||
+ return BAD;
|
|
||||||
+
|
|
||||||
+ dev = stat.st_dev;
|
|
||||||
+ ino = stat.st_ino;
|
|
||||||
+
|
|
||||||
+ if ((stat.st_mode & S_IFMT) != S_IFDIR)
|
|
||||||
+ notify_dir = dirname_dup (name);
|
|
||||||
+ else
|
|
||||||
+ notify_dir = (char *)name;
|
|
||||||
+
|
|
||||||
+ s = watch_dir (notify_dir, dev, ino);
|
|
||||||
+ if (notify_dir != name)
|
|
||||||
+ free (notify_dir);
|
|
||||||
+ if (s)
|
|
||||||
+ return s;
|
|
||||||
+
|
|
||||||
+ // Check for a race condition; if someone removed or changed the
|
|
||||||
+ // file at the same time that we are expressing interest in it,
|
|
||||||
+ // revoke the interest so we don't get notifications about changes
|
|
||||||
+ // to a recycled inode that we don't otherwise care about.
|
|
||||||
+ //
|
|
||||||
+ struct stat st;
|
|
||||||
+ if (status == NULL) {
|
|
||||||
+ status = &st;
|
|
||||||
+ }
|
|
||||||
+ if (::lstat(name, status) == -1) {
|
|
||||||
+ Log::perror("stat on \"%s\" failed", name);
|
|
||||||
+ revoke(name, stat.st_dev, stat.st_ino);
|
|
||||||
+ return BAD;
|
|
||||||
+ }
|
|
||||||
+ if (status->st_dev != stat.st_dev
|
|
||||||
+ || status->st_ino != stat.st_ino) {
|
|
||||||
+ Log::error("File \"%s\" changed between express and stat",
|
|
||||||
+ name);
|
|
||||||
+ revoke(name, stat.st_dev, stat.st_ino);
|
|
||||||
+ return BAD;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Log::debug("told dnotify to monitor \"%s\" = dev %d/%d, ino %d", name,
|
|
||||||
+ major(status->st_dev), minor(status->st_dev),
|
|
||||||
+ status->st_ino);
|
|
||||||
+ return OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+DNotify::Status
|
|
||||||
+DNotify::revoke(const char *name, dev_t dev, ino_t ino)
|
|
||||||
+{
|
|
||||||
+ FileWatch *fwatch;
|
|
||||||
+ DirWatch *dwatch;
|
|
||||||
+
|
|
||||||
+ Log::debug("revoke() name: %s, dev: %x, ino: %x\n", name, dev, ino);
|
|
||||||
+
|
|
||||||
+ if (!is_active())
|
|
||||||
+ return BAD;
|
|
||||||
+
|
|
||||||
+ // Lookup FileWatch by dev:ino, and its DirWatch.
|
|
||||||
+ fwatch = lookup_filewatch (dev, ino);
|
|
||||||
+ if (fwatch == NULL)
|
|
||||||
+ return BAD;
|
|
||||||
+
|
|
||||||
+ dwatch = fwatch->dir_watch;
|
|
||||||
+
|
|
||||||
+ // delete FileWatch, if last FileWatch: close fd, delete DirWatch
|
|
||||||
+ Log::debug ("Destroying FileWatch for (%x %x)\n",
|
|
||||||
+ (int)fwatch->file_dev, (int)fwatch->file_ino);
|
|
||||||
+ FileWatch **p;
|
|
||||||
+ for (p=&dwatch->watches; *p; p=&(*p)->next)
|
|
||||||
+ {
|
|
||||||
+ if (*p == fwatch)
|
|
||||||
+ {
|
|
||||||
+ *p = (*p)->next;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ unhash_filewatch(fwatch);
|
|
||||||
+ delete fwatch;
|
|
||||||
+ if (dwatch->watches == NULL)
|
|
||||||
+ {
|
|
||||||
+ Log::debug ("Destroying DirWatch for (%x %x)\n",
|
|
||||||
+ (int)dwatch->dir_dev, (int)dwatch->dir_ino);
|
|
||||||
+ close(dwatch->fd);
|
|
||||||
+ unhash_dirwatch(dwatch);
|
|
||||||
+ delete dwatch;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+DNotify::all_watches_changed(void)
|
|
||||||
+{
|
|
||||||
+ int i;
|
|
||||||
+ FileWatch *fw;
|
|
||||||
+
|
|
||||||
+ for (i=0; i<FILE_HASHSIZE; i++)
|
|
||||||
+ {
|
|
||||||
+ fw = file_hash[i];
|
|
||||||
+ while (fw)
|
|
||||||
+ {
|
|
||||||
+ (*ehandler)(fw->file_dev, fw->file_ino, CHANGE);
|
|
||||||
+
|
|
||||||
+ fw = fw->hash_link;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+DNotify::read_handler(int fd, void *)
|
|
||||||
+{
|
|
||||||
+ static char readbuf[5000];
|
|
||||||
+ DirWatch *dw;
|
|
||||||
+ FileWatch *fw;
|
|
||||||
+ int snap_queue_tail;
|
|
||||||
+ int last_fd;
|
|
||||||
+
|
|
||||||
+ int rc = read(fd, readbuf, sizeof readbuf);
|
|
||||||
+ queue_changed = 0;
|
|
||||||
+ if (rc < 0)
|
|
||||||
+ Log::perror("pipe read");
|
|
||||||
+ else if (queue_overflowed)
|
|
||||||
+ {
|
|
||||||
+ // There is a *slight* race condition here. Between reading
|
|
||||||
+ // the queue_overflow flag and resetting it. But it doesn't
|
|
||||||
+ // matter, since I'm gonna handle the overflow after reseting
|
|
||||||
+ // anyway.
|
|
||||||
+ queue_overflowed = false;
|
|
||||||
+
|
|
||||||
+ // We're soon gonna check all watches anyway, so
|
|
||||||
+ // get rid of the current queue
|
|
||||||
+ queue_head = queue_tail;
|
|
||||||
+
|
|
||||||
+ all_watches_changed ();
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ // Don't read events that happen later than
|
|
||||||
+ // the initial read. (Otherwise skipping fd's
|
|
||||||
+ // might miss some changes).
|
|
||||||
+ snap_queue_tail = queue_tail;
|
|
||||||
+ last_fd = -1;
|
|
||||||
+ while (queue_head != snap_queue_tail)
|
|
||||||
+ {
|
|
||||||
+ fd = change_queue[queue_head];
|
|
||||||
+ queue_head = (queue_head + 1) % QUEUESIZE;
|
|
||||||
+
|
|
||||||
+ // Skip multiple changes to the same fd
|
|
||||||
+ if (fd != last_fd)
|
|
||||||
+ {
|
|
||||||
+ dw = lookup_dirwatch (fd);
|
|
||||||
+ if (dw)
|
|
||||||
+ {
|
|
||||||
+ int n_watches, i;
|
|
||||||
+ ChangeEventData *data;
|
|
||||||
+
|
|
||||||
+ Log::debug("dnotify said dev %d/%d, ino %ld changed",
|
|
||||||
+ major(dw->dir_dev), minor(dw->dir_dev), dw->dir_ino);
|
|
||||||
+
|
|
||||||
+ n_watches = 0;
|
|
||||||
+ for (fw=dw->watches; fw; fw=fw->next)
|
|
||||||
+ n_watches++;
|
|
||||||
+
|
|
||||||
+ data = new ChangeEventData[n_watches];
|
|
||||||
+
|
|
||||||
+ i = 0;
|
|
||||||
+ for (fw=dw->watches; fw; fw=fw->next)
|
|
||||||
+ {
|
|
||||||
+ data[i].file_dev = fw->file_dev;
|
|
||||||
+ data[i].file_ino = fw->file_ino;
|
|
||||||
+ i++;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < n_watches; i++)
|
|
||||||
+ {
|
|
||||||
+ (*ehandler)(data[i].file_dev, data[i].file_ino, CHANGE);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ delete[] data;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ last_fd = fd;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
--- fam-2.7.0/src/DNotify.h 2004-01-30 00:00:00.000000000 +0100
|
|
||||||
+++ fam-2.7.0.dnotify/src/DNotify.h 2004-01-30 00:00:00.000000000 +0100
|
|
||||||
@@ -0,0 +1,98 @@
|
|
||||||
+// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved.
|
|
||||||
+// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved.
|
|
||||||
+//
|
|
||||||
+// This program is free software; you can redistribute it and/or modify it
|
|
||||||
+// under the terms of version 2 of the GNU General Public License as
|
|
||||||
+// published by the Free Software Foundation.
|
|
||||||
+//
|
|
||||||
+// This program is distributed in the hope that it would be useful, but
|
|
||||||
+// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any
|
|
||||||
+// license provided herein, whether implied or otherwise, is limited to
|
|
||||||
+// this program in accordance with the express provisions of the GNU
|
|
||||||
+// General Public License. Patent licenses, if any, provided herein do not
|
|
||||||
+// apply to combinations of this program with other product or programs, or
|
|
||||||
+// any other product whatsoever. This program is distributed without any
|
|
||||||
+// warranty that the program is delivered free of the rightful claim of any
|
|
||||||
+// third person by way of infringement or the like. 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 the Free Software Foundation, Inc., 59
|
|
||||||
+// Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+#ifndef DNotify_included
|
|
||||||
+#define DNotify_included
|
|
||||||
+
|
|
||||||
+#include "config.h"
|
|
||||||
+#include "Monitor.h"
|
|
||||||
+#include <signal.h>
|
|
||||||
+
|
|
||||||
+// DNotify is an object encapsulating the dnotify linux fcntl.
|
|
||||||
+// It "emulates" the IMon interface.
|
|
||||||
+// There can only be one instantiation of the DNotify object.
|
|
||||||
+//
|
|
||||||
+// The user of this object uses express() and revoke() to
|
|
||||||
+// express/revoke interest in a file. There is also
|
|
||||||
+// a callback, the EventHandler. When an dnotify event comes in,
|
|
||||||
+// the EventHandler is called.
|
|
||||||
+//
|
|
||||||
+// The user of the DNotify object is the Interest class.
|
|
||||||
+
|
|
||||||
+class DNotify : public Monitor {
|
|
||||||
+public:
|
|
||||||
+ DNotify(EventHandler h);
|
|
||||||
+ ~DNotify();
|
|
||||||
+
|
|
||||||
+ static bool is_active();
|
|
||||||
+
|
|
||||||
+ virtual Status express(const char *name, struct stat *stat_return);
|
|
||||||
+ virtual Status revoke(const char *name, dev_t dev, ino_t ino);
|
|
||||||
+
|
|
||||||
+private:
|
|
||||||
+ struct FileWatch;
|
|
||||||
+ struct DirWatch;
|
|
||||||
+ struct ChangeEventData;
|
|
||||||
+
|
|
||||||
+ // Class Variables
|
|
||||||
+ enum { QUEUESIZE = 1024 };
|
|
||||||
+ static int pipe_write_fd;
|
|
||||||
+ static int pipe_read_fd;
|
|
||||||
+ static int change_queue[QUEUESIZE];
|
|
||||||
+ static volatile sig_atomic_t DNotify::queue_overflowed;
|
|
||||||
+ static volatile sig_atomic_t DNotify::queue_changed;
|
|
||||||
+ static volatile int queue_head; // Only modified by read handler
|
|
||||||
+ static volatile int queue_tail; // Only modified by signal handler
|
|
||||||
+ static EventHandler ehandler;
|
|
||||||
+ static void overflow_signal_handler(int sig, siginfo_t *si, void *data);
|
|
||||||
+ static void signal_handler(int sig, siginfo_t *si, void *data);
|
|
||||||
+ static void read_handler(int fd, void *closure);
|
|
||||||
+
|
|
||||||
+ enum { DIR_HASHSIZE = 367 };
|
|
||||||
+ static DirWatch *dir_hash[DIR_HASHSIZE];
|
|
||||||
+ enum { FILE_HASHSIZE = 823 };
|
|
||||||
+ static FileWatch *file_hash[FILE_HASHSIZE];
|
|
||||||
+
|
|
||||||
+ static DirWatch **dir_hashchain(int fd)
|
|
||||||
+ { return &dir_hash[(unsigned) (fd) % DIR_HASHSIZE]; }
|
|
||||||
+ static FileWatch **file_hashchain(dev_t d, ino_t i)
|
|
||||||
+ { return &file_hash[(unsigned) (d+i) % FILE_HASHSIZE]; }
|
|
||||||
+
|
|
||||||
+ static DirWatch *lookup_dirwatch (int fd);
|
|
||||||
+ static DirWatch *lookup_dirwatch (dev_t dir_dev, ino_t dir_ino);
|
|
||||||
+ static FileWatch *lookup_filewatch (dev_t file_dev, ino_t file_ino);
|
|
||||||
+ static void hash_dirwatch(DirWatch *w);
|
|
||||||
+ static void hash_filewatch(FileWatch *w);
|
|
||||||
+ static void unhash_dirwatch(DirWatch *w);
|
|
||||||
+ static void unhash_filewatch(FileWatch *w);
|
|
||||||
+ static Status watch_dir(const char *notify_dir, dev_t file_dev, ino_t file_ino);
|
|
||||||
+
|
|
||||||
+ static void all_watches_changed(void);
|
|
||||||
+
|
|
||||||
+ DNotify(const DNotify&); // Do not copy
|
|
||||||
+ DNotify & operator = (const DNotify&); // or assign.
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+#endif /* !IMon_included */
|
|
||||||
+
|
|
||||||
+
|
|
||||||
--- fam-2.7.0/src/Interest.c++ 2004-01-30 00:00:00.000000000 +0100
|
|
||||||
+++ fam-2.7.0.dnotify/src/Interest.c++ 2004-01-30 00:00:00.000000000 +0100
|
|
||||||
@@ -42,12 +42,21 @@
|
|
||||||
#include "Event.h"
|
|
||||||
#include "FileSystem.h"
|
|
||||||
#include "IMon.h"
|
|
||||||
+#include "DNotify.h"
|
|
||||||
#include "Log.h"
|
|
||||||
#include "Pollster.h"
|
|
||||||
#include "timeval.h"
|
|
||||||
|
|
||||||
Interest *Interest::hashtable[];
|
|
||||||
-IMon Interest::imon(imon_handler);
|
|
||||||
+
|
|
||||||
+#ifdef USE_DNOTIFY
|
|
||||||
+static DNotify dnotify(Interest::monitor_handler);
|
|
||||||
+Monitor * Interest::monitor = &dnotify;
|
|
||||||
+#else
|
|
||||||
+static IMon imon(Interest::monitor_handler);
|
|
||||||
+Monitor * Interest::monitor = &imon;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
bool Interest::xtab_verification = true;
|
|
||||||
|
|
||||||
Interest::Interest(const char *name, FileSystem *fs, in_addr host, ExportVerification ev)
|
|
||||||
@@ -60,10 +69,10 @@
|
|
||||||
mypath_exported_to_host(ev == NO_VERIFY_EXPORTED)
|
|
||||||
{
|
|
||||||
memset(&old_stat, 0, sizeof(old_stat));
|
|
||||||
- IMon::Status s = IMon::BAD;
|
|
||||||
|
|
||||||
- s = imon.express(name, &old_stat);
|
|
||||||
- if (s != IMon::OK)
|
|
||||||
+ Monitor::Status s = Monitor::BAD;
|
|
||||||
+ s = monitor->express(name, &old_stat);
|
|
||||||
+ if (s != Monitor::OK)
|
|
||||||
{ int rc = lstat(name, &old_stat);
|
|
||||||
if (rc < 0)
|
|
||||||
{ Log::info("can't lstat %s", name);
|
|
||||||
@@ -100,7 +109,7 @@
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- if (exported_to_host()) fs->ll_monitor(this, s == IMon::OK);
|
|
||||||
+ if (exported_to_host()) fs->ll_monitor(this, s == Monitor::OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
Interest::~Interest()
|
|
||||||
@@ -128,7 +137,7 @@
|
|
||||||
pp = &p->hashlink; // move to next element
|
|
||||||
}
|
|
||||||
if (!found_same)
|
|
||||||
- (void) imon.revoke(name(), dev, ino);
|
|
||||||
+ (void) monitor->revoke(name(), dev, ino);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -147,7 +156,7 @@
|
|
||||||
|
|
||||||
// Express interest.
|
|
||||||
IMon::Status s = IMon::BAD;
|
|
||||||
- s = imon.express(name(), NULL);
|
|
||||||
+ s = monitor->express(name(), NULL);
|
|
||||||
if (s != IMon::OK) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -248,23 +257,23 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
-Interest::imon_handler(dev_t device, ino_t inumber, int event)
|
|
||||||
+Interest::monitor_handler(dev_t device, ino_t inumber, int event)
|
|
||||||
{
|
|
||||||
assert(device || inumber);
|
|
||||||
|
|
||||||
for (Interest *p = *hashchain(device, inumber), *next = p; p; p = next)
|
|
||||||
{ next = p->hashlink;
|
|
||||||
if (p->ino == inumber && p->dev == device)
|
|
||||||
- { if (event == IMon::EXEC)
|
|
||||||
+ { if (event == Monitor::EXEC)
|
|
||||||
{ p->cur_exec_state = EXECUTING;
|
|
||||||
(void) p->report_exec_state();
|
|
||||||
}
|
|
||||||
- else if (event == IMon::EXIT)
|
|
||||||
+ else if (event == Monitor::EXIT)
|
|
||||||
{ p->cur_exec_state = NOT_EXECUTING;
|
|
||||||
(void) p->report_exec_state();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
- { assert(event == IMon::CHANGE);
|
|
||||||
+ { assert(event == Monitor::CHANGE);
|
|
||||||
p->scan();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--- fam-2.7.0/config.h.in 2003-01-20 01:40:15.000000000 +0100
|
|
||||||
+++ fam-2.7.0.dnotify/config.h.in 2004-01-30 13:50:33.000000000 +0100
|
|
||||||
@@ -180,3 +180,6 @@
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#undef uid_t
|
|
||||||
+
|
|
||||||
+/* Define to 1 if you have F_NOTIFY fcntl */
|
|
||||||
+#undef USE_DNOTIFY
|
|
||||||
--- fam-2.7.0/configure.ac 2003-11-26 20:47:59.000000000 +0100
|
|
||||||
+++ fam-2.7.0.dnotify/configure.ac 2004-01-30 13:50:33.000000000 +0100
|
|
||||||
@@ -34,7 +34,26 @@
|
|
||||||
AC_HEADER_DIRENT
|
|
||||||
AC_CHECK_HEADERS([fcntl.h limits.h linux/imon.h netinet/in.h rpc/rpc.h rpcsvc/mount.h stddef.h stdlib.h string.h syslog.h sys/imon.h sys/param.h sys/select.h sys/statvfs.h sys/syssgi.h sys/time.h sys/types.h sys/un.h unistd.h])
|
|
||||||
|
|
||||||
-if test "$have_sys_imon_h"; then
|
|
||||||
+# Test for the linux dnotify fcntl
|
|
||||||
+AC_MSG_CHECKING([for dnotify fcntl support])
|
|
||||||
+AC_TRY_COMPILE([
|
|
||||||
+#define _GNU_SOURCE
|
|
||||||
+#include <fcntl.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+],
|
|
||||||
+[ int fd = 1;
|
|
||||||
+ fcntl (fd, F_NOTIFY, (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB)
|
|
||||||
+ |DN_MULTISHOT);
|
|
||||||
+], have_dnotify=yes, have_dnotify=no)
|
|
||||||
+
|
|
||||||
+use_dnotify=false
|
|
||||||
+AC_MSG_RESULT($have_dnotify)
|
|
||||||
+
|
|
||||||
+if test "$have_dnotify"; then
|
|
||||||
+ MONITOR_FUNCS=IMonNone
|
|
||||||
+ AC_DEFINE([USE_DNOTIFY], [], [Use dnotify])
|
|
||||||
+ use_dnotify=true
|
|
||||||
+elif test "$have_sys_imon_h"; then
|
|
||||||
MONITOR_FUNCS=IMonIRIX
|
|
||||||
elif test "$have_linux_imon_h"; then
|
|
||||||
MONITOR_FUNCS=IMonLinux
|
|
||||||
@@ -42,6 +62,7 @@
|
|
||||||
MONITOR_FUNCS=IMonNone
|
|
||||||
fi
|
|
||||||
AC_SUBST(MONITOR_FUNCS)
|
|
||||||
+AM_CONDITIONAL(USE_DNOTIFY, $use_dnotify)
|
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
AC_HEADER_STDBOOL
|
|
||||||
--- fam-2.7.0/src/IMon.h 2004-01-30 00:00:00.000000000 +0200
|
|
||||||
+++ fam-2.7.0.dnotify/src/IMon.h 2004-01-30 00:00:00.000000000 +0200
|
|
||||||
@@ -24,10 +24,7 @@
|
|
||||||
#define IMon_included
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
-#include <sys/stat.h>
|
|
||||||
-#include <sys/types.h>
|
|
||||||
-
|
|
||||||
-#include "Boolean.h"
|
|
||||||
+#include "Monitor.h"
|
|
||||||
|
|
||||||
struct stat;
|
|
||||||
|
|
||||||
@@ -41,25 +38,18 @@
|
|
||||||
//
|
|
||||||
// The user of the IMon object is the Interest class.
|
|
||||||
|
|
||||||
-class IMon {
|
|
||||||
+class IMon : public Monitor {
|
|
||||||
|
|
||||||
public:
|
|
||||||
-
|
|
||||||
- enum Status { OK = 0, BAD = -1 };
|
|
||||||
- enum Event { EXEC, EXIT, CHANGE };
|
|
||||||
-
|
|
||||||
- typedef void (*EventHandler)(dev_t, ino_t, int event);
|
|
||||||
-
|
|
||||||
IMon(EventHandler h);
|
|
||||||
~IMon();
|
|
||||||
|
|
||||||
static bool is_active();
|
|
||||||
|
|
||||||
- Status express(const char *name, struct stat *stat_return);
|
|
||||||
- Status revoke(const char *name, dev_t dev, ino_t ino);
|
|
||||||
+ virtual Status express(const char *name, struct stat *stat_return);
|
|
||||||
+ virtual Status revoke(const char *name, dev_t dev, ino_t ino);
|
|
||||||
|
|
||||||
private:
|
|
||||||
-
|
|
||||||
// Class Variables
|
|
||||||
|
|
||||||
static int imonfd;
|
|
||||||
--- fam-2.7.0/src/Interest.h 2004-01-30 00:00:00.000000000 +0200
|
|
||||||
+++ fam-2.7.0.dnotify/src/Interest.h 2004-01-30 00:00:00.000000000 +0200
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
|
|
||||||
class Event;
|
|
||||||
class FileSystem;
|
|
||||||
-class IMon;
|
|
||||||
+class Monitor;
|
|
||||||
struct stat;
|
|
||||||
|
|
||||||
// Interest -- abstract base class for filesystem entities of interest.
|
|
||||||
@@ -74,7 +74,7 @@
|
|
||||||
|
|
||||||
// Public Class Method
|
|
||||||
|
|
||||||
- static void imon_handler(dev_t, ino_t, int event);
|
|
||||||
+ static void monitor_handler(dev_t, ino_t, int event);
|
|
||||||
|
|
||||||
static void enable_xtab_verification(bool enable);
|
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@
|
|
||||||
|
|
||||||
// Class Variables
|
|
||||||
|
|
||||||
- static IMon imon;
|
|
||||||
+ static Monitor *monitor;
|
|
||||||
static Interest *hashtable[HASHSIZE];
|
|
||||||
static bool xtab_verification;
|
|
||||||
|
|
||||||
--- fam-2.7.0/src/Makefile.am 2003-01-19 13:00:17.000000000 +0100
|
|
||||||
+++ fam-2.7.0.dnotify/src/Makefile.am 2004-01-30 13:50:38.000000000 +0100
|
|
||||||
@@ -71,7 +71,11 @@
|
|
||||||
main.c++ \
|
|
||||||
timeval.c++ \
|
|
||||||
timeval.h \
|
|
||||||
- @MONITOR_FUNCS@.c++
|
|
||||||
+ Monitor.h \
|
|
||||||
+ DNotify.h \
|
|
||||||
+ DNotify.c++ \
|
|
||||||
+ @MONITOR_FUNCS@.c++
|
|
||||||
|
|
||||||
-EXTRA_famd_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
|
|
||||||
+EXTRA_famd_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++ DNotify.c++ \
|
|
||||||
+ DNotify.h Monitor.h
|
|
||||||
|
|
||||||
--- fam-2.7.0/src/Monitor.h 2004-01-30 00:00:00.000000000 +0200
|
|
||||||
+++ fam-2.7.0.dnotify/src/Monitor.h 2004-01-30 00:00:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,57 @@
|
|
||||||
+// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved.
|
|
||||||
+// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved.
|
|
||||||
+//
|
|
||||||
+// This program is free software; you can redistribute it and/or modify it
|
|
||||||
+// under the terms of version 2 of the GNU General Public License as
|
|
||||||
+// published by the Free Software Foundation.
|
|
||||||
+//
|
|
||||||
+// This program is distributed in the hope that it would be useful, but
|
|
||||||
+// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any
|
|
||||||
+// license provided herein, whether implied or otherwise, is limited to
|
|
||||||
+// this program in accordance with the express provisions of the GNU
|
|
||||||
+// General Public License. Patent licenses, if any, provided herein do not
|
|
||||||
+// apply to combinations of this program with other product or programs, or
|
|
||||||
+// any other product whatsoever. This program is distributed without any
|
|
||||||
+// warranty that the program is delivered free of the rightful claim of any
|
|
||||||
+// third person by way of infringement or the like. 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 the Free Software Foundation, Inc., 59
|
|
||||||
+// Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+#ifndef Monitor_included
|
|
||||||
+#define Monitor_included
|
|
||||||
+
|
|
||||||
+#include "config.h"
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+
|
|
||||||
+struct stat;
|
|
||||||
+
|
|
||||||
+// Monitor is an abstract baseclass for differend file monitoring
|
|
||||||
+// systems. The original system used was IMon, and the Montor API
|
|
||||||
+// is heavily influenced by that.
|
|
||||||
+// There can only be one instantiation of the Monitor object.
|
|
||||||
+//
|
|
||||||
+// The user of this object uses express() and revoke() to
|
|
||||||
+// express/revoke interest in a file to imon. There is also
|
|
||||||
+// a callback, the EventHandler. When an event comes in,
|
|
||||||
+// the EventHandler is called.
|
|
||||||
+//
|
|
||||||
+// The main implementers of the Monitor class is IMon and DNotify
|
|
||||||
+
|
|
||||||
+class Monitor {
|
|
||||||
+public:
|
|
||||||
+
|
|
||||||
+ enum Status { OK = 0, BAD = -1 };
|
|
||||||
+ enum Event { EXEC, EXIT, CHANGE };
|
|
||||||
+
|
|
||||||
+ typedef void (*EventHandler)(dev_t, ino_t, int event);
|
|
||||||
+
|
|
||||||
+ virtual Status express(const char *name, struct stat *stat_return) = 0;
|
|
||||||
+ virtual Status revoke(const char *name, dev_t dev, ino_t ino) = 0;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+#endif /* !Monitor_included */
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
||||||
|
|
||||||
<!DOCTYPE PSPEC SYSTEM
|
|
||||||
"http://www.uludag.org.tr/projeler/pisi/pisi-spec.dtd">
|
|
||||||
|
|
||||||
<PISI>
|
|
||||||
|
|
||||||
<Source>
|
|
||||||
<Name>fam</Name>
|
|
||||||
<Homepage>http://oss.sgi.com/projects/fam/</Homepage>
|
|
||||||
<Packager>
|
|
||||||
<Name>Kırmızı kafalar</Name>
|
|
||||||
<Email>hotmail@redhat.com</Email>
|
|
||||||
</Packager>
|
|
||||||
<License>As-Is</License>
|
|
||||||
<IsA>library:util</IsA>
|
|
||||||
<PartOf>rpm:archive</PartOf>
|
|
||||||
<Description>FAM, the File Alteration Monitor</Description>
|
|
||||||
<Archive type="targz" sha1sum="6c2316f02acf89a41c42ffc3d7fd9cf5eada83a8">ftp://oss.sgi.com/projects/fam/download/stable/fam-2.7.0.tar.gz</Archive>
|
|
||||||
<Patches>
|
|
||||||
<Patch level="1">fam-2.7.0-dnotify.patch</Patch>
|
|
||||||
</Patches>
|
|
||||||
<BuildDependencies>
|
|
||||||
<Dependency versionFrom="1.8"> make </Dependency>
|
|
||||||
</BuildDependencies>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>06/10/2005</Date>
|
|
||||||
<Version>2.7.0</Version>
|
|
||||||
<Release>2</Release>
|
|
||||||
</Update>
|
|
||||||
<Update>
|
|
||||||
<Date>05/05/2005</Date>
|
|
||||||
<Version>2.7.0</Version>
|
|
||||||
<Release>1</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Source>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>fam</Name>
|
|
||||||
<Summary xml:lang="en">FAM, the File Alteration Monito</Summary>
|
|
||||||
<RuntimeDependencies>
|
|
||||||
<Dependency>portmap</Dependency>
|
|
||||||
</RuntimeDependencies>
|
|
||||||
<Description>FAM, the File Alteration Monito</Description>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="binary">/usr/bin</Path>
|
|
||||||
<Path fileType="confit">/etc/</Path>
|
|
||||||
<Path fileType="sharedLib">/usr/lib</Path>
|
|
||||||
<Path fileType="doc">/usr/share/man</Path>
|
|
||||||
<Path fileType="doc">/usr/share/doc/libfame-0.9.0</Path>
|
|
||||||
<Path fileType="header">/usr/include</Path>
|
|
||||||
<Path fileType="header">/usr/share/aclocal</Path>
|
|
||||||
</Files>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>06/14/2005</Date>
|
|
||||||
<Version>2.7.0</Version>
|
|
||||||
<Release>2</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Package>
|
|
||||||
</PISI>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pisi.actionsapi import autotools
|
|
||||||
from pisi.actionsapi import pisitools
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
pisitools.dosed('Makefile', 's:CFLAGS += -g:CFLAGS += -g -mcpu=i686 -O2 -pipe -fomit-frame-pointer:', '/CVSROOT =/d')
|
|
||||||
|
|
||||||
def build():
|
|
||||||
autotools.make()
|
|
||||||
|
|
||||||
def install():
|
|
||||||
pisitools.dosbin('logrotate')
|
|
||||||
pisitools.doman('logrotate.8')
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.2 2004/07/18 01:58:24 dragonheart Exp $
|
|
||||||
#
|
|
||||||
# Logrotate default configuration file for Gentoo Linux
|
|
||||||
#
|
|
||||||
# See "man logrotate" for details
|
|
||||||
|
|
||||||
# rotate log files weekly
|
|
||||||
weekly
|
|
||||||
#daily
|
|
||||||
|
|
||||||
# keep 4 weeks worth of backlogs
|
|
||||||
rotate 4
|
|
||||||
|
|
||||||
# create new (empty) log files after rotating old ones
|
|
||||||
create
|
|
||||||
|
|
||||||
# uncomment this if you want your log files compressed
|
|
||||||
compress
|
|
||||||
|
|
||||||
# packages can drop log rotation information into this directory
|
|
||||||
include /etc/logrotate.d
|
|
||||||
|
|
||||||
notifempty
|
|
||||||
nomail
|
|
||||||
noolddir
|
|
||||||
|
|
||||||
# no packages own lastlog or wtmp -- we'll rotate them here
|
|
||||||
/var/log/wtmp {
|
|
||||||
monthly
|
|
||||||
create 0664 root utmp
|
|
||||||
rotate 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# system-specific logs may be also be configured here.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
/usr/sbin/logrotate /etc/logrotate.conf
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
||||||
|
|
||||||
<!DOCTYPE PSPEC SYSTEM "http://www.uludag.org.tr/projeler/pisi/pisi-spec.dtd">
|
|
||||||
|
|
||||||
<PISI>
|
|
||||||
<Source>
|
|
||||||
<Name>logrotate</Name>
|
|
||||||
<Homepage>http://packages.debian.org/unstable/admin/logrotate.html</Homepage>
|
|
||||||
<Packager>
|
|
||||||
<Name>PACKAGER</Name>
|
|
||||||
<Email>PACKAGER_EMAIL</Email>
|
|
||||||
</Packager>
|
|
||||||
<License>GPL-2</License>
|
|
||||||
<IsA>system:util:logging</IsA>
|
|
||||||
<IsA>app:console</IsA>
|
|
||||||
<PartOf>PARTOF</PartOf>
|
|
||||||
<Description>Rotates, compresses, and mails system logs</Description>
|
|
||||||
<Archive type="targz"
|
|
||||||
sha1sum="84ce324a78ee071536c39e95d3086e53d7fe7ccb">
|
|
||||||
ftp://ftp.linux.org.tr/pub/mirrors/gentoo/distfiles/logrotate_3.6.5.orig.tar.gz
|
|
||||||
</Archive>
|
|
||||||
<BuildDependencies>
|
|
||||||
|
|
||||||
<Dependency>>=sys-apps/portage-2.0.47-r10</Dependency>
|
|
||||||
<Dependency>>=dev-libs/popt-1.5</Dependency>
|
|
||||||
<Dependency>>=sys-apps/sed-4</Dependency>
|
|
||||||
<Dependency>selinux?</Dependency>
|
|
||||||
<Dependency>sys-libs/libselinux</Dependency>
|
|
||||||
<Dependency>!bootstrap?</Dependency>
|
|
||||||
<Dependency>sys-devel/patch</Dependency>
|
|
||||||
<Dependency>userland_GNU?</Dependency>
|
|
||||||
<Dependency>sys-apps/shadow</Dependency>
|
|
||||||
|
|
||||||
</BuildDependencies>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>2005-06-28</Date>
|
|
||||||
<Version>3.6.5</Version>
|
|
||||||
<Release>1</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Source>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>logrotate</Name>
|
|
||||||
<Summary xml:lang="en">Rotates, compresses, and mails system logs</Summary>
|
|
||||||
<RuntimeDependencies>
|
|
||||||
|
|
||||||
<Dependency>>=sys-apps/portage-2.0.47-r10</Dependency>
|
|
||||||
<Dependency>>=dev-libs/popt-1.5</Dependency>
|
|
||||||
<Dependency>>=sys-apps/sed-4</Dependency>
|
|
||||||
<Dependency>selinux?</Dependency>
|
|
||||||
<Dependency>sys-libs/libselinux</Dependency>
|
|
||||||
<Dependency>selinux?</Dependency>
|
|
||||||
<Dependency>sec-policy/selinux-logrotate</Dependency>
|
|
||||||
|
|
||||||
</RuntimeDependencies>
|
|
||||||
<Description>Rotates, compresses, and mails system logs</Description>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="binary">/usr/sbin</Path>
|
|
||||||
<Path fileType="doc">/usr/share/doc</Path>
|
|
||||||
<Path fileType="doc">/usr/share/man</Path>
|
|
||||||
</Files>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>2005-06-28</Date>
|
|
||||||
<Version>3.6.5</Version>
|
|
||||||
<Release>1</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Package>
|
|
||||||
|
|
||||||
</PISI>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pisi.actionsapi import gnuconfig
|
|
||||||
from pisi.actionsapi import autotools
|
|
||||||
|
|
||||||
WorkDir='popt-1.7'
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
gnuconfig.gnuconfig_update()
|
|
||||||
# libtoolize.libtoolize()
|
|
||||||
autotools.configure( '--with-nls' )
|
|
||||||
|
|
||||||
def build():
|
|
||||||
autotools.make()
|
|
||||||
|
|
||||||
def install():
|
|
||||||
autotools.install()
|
|
||||||
Binary file not shown.
@@ -1,80 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
||||||
|
|
||||||
<!DOCTYPE PSPEC SYSTEM
|
|
||||||
"http://www.uludag.org.tr/projeler/pisi/pisi-spec.dtd">
|
|
||||||
|
|
||||||
<PISI>
|
|
||||||
|
|
||||||
<Source>
|
|
||||||
<Name>popt</Name>
|
|
||||||
<Homepage>http://www.rpm.org/</Homepage>
|
|
||||||
<Packager>
|
|
||||||
<Name>Kırmızı kafalar</Name>
|
|
||||||
<Email>hotmail@redhat.com</Email>
|
|
||||||
</Packager>
|
|
||||||
<License>As-Is</License>
|
|
||||||
<IsA>library:util:optparser</IsA>
|
|
||||||
<PartOf>rpm:archive</PartOf>
|
|
||||||
<Summary>Popt command line option parser</Summary>
|
|
||||||
<Description>Command line option parsing library.
|
|
||||||
While it is similiar to getopt(3), it contains a number of enhancements, including:
|
|
||||||
|
|
||||||
1) popt is fully reentrant
|
|
||||||
2) popt can parse arbitrary argv[] style arrays while
|
|
||||||
getopt(2) makes this quite difficult
|
|
||||||
3) popt allows users to alias command line arguments
|
|
||||||
4) popt provides convience functions for parsing strings
|
|
||||||
into argv[] style arrays
|
|
||||||
</Description>
|
|
||||||
<Archive type="targz" sha1sum="66f3c77b87a160951b180447f4a6dce68ad2f71b">
|
|
||||||
ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/popt-1.7.tar.gz
|
|
||||||
</Archive>
|
|
||||||
<Patches>
|
|
||||||
<Patch compressionType="gz" level="1">popt-1.7-uclibc.patch.gz</Patch>
|
|
||||||
</Patches>
|
|
||||||
<BuildDependencies>
|
|
||||||
<Dependency versionFrom="1.8"> make </Dependency>
|
|
||||||
</BuildDependencies>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>06/14/2005</Date>
|
|
||||||
<Version>1.7</Version>
|
|
||||||
<Release>3</Release>
|
|
||||||
</Update>
|
|
||||||
<Update>
|
|
||||||
<Date>06/10/2005</Date>
|
|
||||||
<Version>1.7</Version>
|
|
||||||
<Release>2</Release>
|
|
||||||
</Update>
|
|
||||||
<Update>
|
|
||||||
<Date>05/05/2005</Date>
|
|
||||||
<Version>1.7</Version>
|
|
||||||
<Release>1</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Source>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>popt-libs</Name>
|
|
||||||
<Summary xml:lang="en">Command line option parsing library</Summary>
|
|
||||||
<Summary xml:lang="tr">Komut satırı seçenekleri işleme kütüphanesi</Summary>
|
|
||||||
<RuntimeDependencies>
|
|
||||||
<Dependency>gettext</Dependency>
|
|
||||||
</RuntimeDependencies>
|
|
||||||
<Description>library files for popt</Description>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="sharedLib">/usr/lib</Path>
|
|
||||||
<Path fileType="doc">/usr/share/doc</Path>
|
|
||||||
<Path fileType="doc">/usr/share/man</Path>
|
|
||||||
<Path fileType="localedata">/usr/share/locale</Path>
|
|
||||||
<Path fileType="header">/usr/include/popt.h</Path>
|
|
||||||
</Files>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>06/14/2005</Date>
|
|
||||||
<Version>1.7</Version>
|
|
||||||
<Release>2</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Package>
|
|
||||||
</PISI>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pisi.actionsapi import autotools
|
|
||||||
from pisi.actionsapi import pisitools
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
autotools.configure()
|
|
||||||
|
|
||||||
def build():
|
|
||||||
autotools.make()
|
|
||||||
|
|
||||||
def install():
|
|
||||||
autotools.install()
|
|
||||||
pisitools.dodoc('AUTHORS','ChangeLog','INSTALL', 'NEWS', 'README', 'doc/startup-notification.txt')
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
||||||
|
|
||||||
<!DOCTYPE PSPEC SYSTEM
|
|
||||||
"http://www.uludag.org.tr/projeler/pisi/pisi-spec.dtd">
|
|
||||||
|
|
||||||
<PISI>
|
|
||||||
|
|
||||||
<Source>
|
|
||||||
<Name>startup-notification</Name>
|
|
||||||
<Homepage>http://www.freedesktop.org/software/startup-notification/</Homepage>
|
|
||||||
<Packager>
|
|
||||||
<Name>Kırmızı kafalar</Name>
|
|
||||||
<Email>hotmail@redhat.com</Email>
|
|
||||||
</Packager>
|
|
||||||
<License>LGPL-2</License>
|
|
||||||
<License>BSD</License>
|
|
||||||
<IsA>library:x11</IsA>
|
|
||||||
<PartOf>rpm:archive</PartOf>
|
|
||||||
<Description>Application startup notification and feedback library
|
|
||||||
</Description>
|
|
||||||
<Archive type="tarbz2" sha1sum="d2b5698b6209b5172d17222a3117db6447d7cdf1">
|
|
||||||
ftp://ftp.linux.org.tr/pub/mirrors/gentoo/distfiles/startup-notification-0.8.tar.bz2
|
|
||||||
</Archive>
|
|
||||||
<BuildDependencies>
|
|
||||||
<Dependency versionFrom="1.8"> make </Dependency>
|
|
||||||
</BuildDependencies>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>06/24/2005</Date>
|
|
||||||
<Version>0.8</Version>
|
|
||||||
<Release>2</Release>
|
|
||||||
</Update>
|
|
||||||
<Update>
|
|
||||||
<Date>06/10/2005</Date>
|
|
||||||
<Version>0.7</Version>
|
|
||||||
<Release>2</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Source>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>startup-notification</Name>
|
|
||||||
<Summary xml:lang="en">Application startup notification and feedback library</Summary>
|
|
||||||
<Description>library files for startup-notification</Description>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="sharedLib">/usr/lib</Path>
|
|
||||||
<Path fileType="doc">/usr/share/doc</Path>
|
|
||||||
</Files>
|
|
||||||
<History>
|
|
||||||
<Update>
|
|
||||||
<Date>06/24/2005</Date>
|
|
||||||
<Version>0.8</Version>
|
|
||||||
<Release>2</Release>
|
|
||||||
</Update>
|
|
||||||
</History>
|
|
||||||
</Package>
|
|
||||||
|
|
||||||
<Package>
|
|
||||||
<Name>startup-notification-devel</Name>
|
|
||||||
<Summary xml:lang="en">Development files for startup notification and feedback library</Summary>
|
|
||||||
<Description>sn development</Description>
|
|
||||||
<Files>
|
|
||||||
<Path fileType="header">/usr/include</Path>
|
|
||||||
</Files>
|
|
||||||
</Package>
|
|
||||||
|
|
||||||
</PISI>
|
|
||||||
Reference in New Issue
Block a user