Installation problem with info file when using separate object dir during building
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I/tmp/S/bash-3.2 -I/tmp/S/bash-3.2/include -I/tmp/S/bash-3.2/lib -g -O2 uname output: Linux x 2.6.23.1 #1 SMP PREEMPT Tue Oct 16 16:47:14 CEST 2007 i686 GNU/Linux Machine Type: i686-pc-linux-gnu Bash Version: 3.2 Patch Level: 33 Release Status: release Description: When using a seperate object directory during build (e.g. O) the info file bash.info is built and written to O/doc/bash.info: bash.info: bashref.info ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; The installation procedure tries to install it from $(srcdir) and will not find it there: -$(INSTALL_DATA) $(srcdir)/bash.info $(DESTDIR)$(infodir)/bash.info Repeat-By: make Fix: see attachment *** ../bash-3.2-patched/doc/Makefile.in Tue Jul 27 14:57:48 2004 --- ./doc/Makefile.in Wed Jan 23 14:26:02 2008 *** *** 225,231 -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext} # uncomment the next line to install the builtins man page # -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} ! -$(INSTALL_DATA) $(srcdir)/bash.info $(DESTDIR)$(infodir)/bash.info # run install-info if it is present to update the info directory if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \ --- 225,231 -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext} # uncomment the next line to install the builtins man page # -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} ! -$(INSTALL_DATA) bash.info $(DESTDIR)$(infodir)/bash.info # run install-info if it is present to update the info directory if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
readline escaping problems
i have an install of a recent version of readline (5.2.007) / bash (3.2.25) which is causing problems with horizontal scrolling positioning because of escape sequences in my PS1 prompt. i have read the faq, but the fix suggested does not work for me. here is my PS1 prompt: PS1="\n\e[39m\u\e[00m \e[00;34m[\w]\e[00m " according to the faq this should be encoded as: PS1="[EMAIL PROTECTED] \[\e[00;34m\][\w]\[\e[00m\] " however this does not work either, with horizontal-scroll-mode on or off - positioning is still screwed up. also note that the first prompt works perfectly well with readline 4.2a / bash 2.05a, but *the second one does not*. any suggestions? -- dog
Re: readline escaping problems
> i have an install of a recent version of readline (5.2.007) / bash (3.2.25) > which is causing problems with horizontal scrolling positioning because of > escape sequences in my PS1 prompt. It looks like bash32-028 contains a fix for this problem. In the future, you might consider providing a valid email address for responses. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://tiswww.tis.case.edu/~chet/
bash's own getcwd reads uninitialized/nonexistent memory
Configuration Information [Automatically generated, do not change]: Machine: powerpc OS: linux-gnuspe Compiler: powerpc-linuxspe-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc' -DCONF_OSTYPE='linux-gnuspe' -DCONF_MACHTYPE='powerpc-unknown-linux-gnuspe' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I/archives/meip/devtools/cross-build/src/bash-3.2 -I/archives/meip/devtools/cross-build/src/bash-3.2/include -I/archives/meip/devtools/cross-build/src/bash-3.2/lib -g -O2 uname output: Linux (none) 2.6.19 #17 Thu Dec 7 11:20:51 CET 2006 ppc GNU/Linux Machine Type: powerpc-unknown-linux-gnuspe Bash Version: 3.2 Patch Level: 33 Release Status: release Description: bash's own getcwd reads uninitialzed/non-existent memory when called as getcwd(0, 4096); That made it non-responding when started with linux boot params as `init=/bin/sh'. Repeat-By: Compile bash with BROKEN_GETCWD Fix: here is a patch : Summary : `len' is the real length of the found path `size' is the size of the requested buffer (4096 above) the current code allocates max(len, size) and then COPIES MAX(len, size) which is plain wrong; it should only copy len : that's what the new code does. : it allocates max(len, size) but copies len. diff -rup -U 10 cross-build/src/bash-3.2/lib/sh/getcwd.c cross-build/src/bash-3.2-phdm/lib/sh/getcwd.c --- cross-build/src/bash-3.2/lib/sh/getcwd.c2004-07-21 23:15:19.0 +0200 +++ cross-build/src/bash-3.2-fixed/lib/sh/getcwd.c 2008-01-22 15:32:51.0 +0100 @@ -246,23 +246,23 @@ getcwd (buf, size) if (pathp == &path[sizeof(path) - 1]) *--pathp = '/'; if (dotlist != dots) free ((PTR_T) dotlist); { size_t len = pathbuf + pathsize - pathp; if (buf == NULL) { - if (len < (size_t) size) - len = size; - buf = (char *) malloc (len); + if ((size_t) size < len) + size = len; + buf = (char *) malloc (size); if (buf == NULL) goto lose2; } else if ((size_t) size < len) { errno = ERANGE; goto lose2; } (void) memcpy((PTR_T) buf, (PTR_T) pathp, len); }