From 6f2a35a4973e2509347bb9357a1d192622e957cb1e0544489fc881b79f50d221 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 29 Jul 2014 07:35:44 +0000 Subject: [PATCH] Accepting request 242755 from home:darix:branches:devel:libraries:c_c++ - rename README.SUSE (bnc#889029) - update to 20140620-3.1 upgrade to fix a crash with clear_history e.g. in php. OBS-URL: https://build.opensuse.org/request/show/242755 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libedit?expand=0&rev=49 --- README.SuSE => README.SUSE | 0 libedit-20100424-3.0-ncurses.patch | 31 +++++---- libedit-20110802-3.0.tar.gz | 3 - libedit-20140620-3.1.tar.gz | 3 + libedit-ocloexec.patch | 48 ++++++------- libedit.changes | 104 +++++++++++++++++++++++++++++ libedit.spec | 13 ++-- 7 files changed, 152 insertions(+), 50 deletions(-) rename README.SuSE => README.SUSE (100%) delete mode 100644 libedit-20110802-3.0.tar.gz create mode 100644 libedit-20140620-3.1.tar.gz diff --git a/README.SuSE b/README.SUSE similarity index 100% rename from README.SuSE rename to README.SUSE diff --git a/libedit-20100424-3.0-ncurses.patch b/libedit-20100424-3.0-ncurses.patch index b7d0227..1d59054 100644 --- a/libedit-20100424-3.0-ncurses.patch +++ b/libedit-20100424-3.0-ncurses.patch @@ -1,6 +1,8 @@ ---- configure.ac.orig -+++ configure.ac -@@ -48,7 +48,7 @@ AC_CHECK_LIB(terminfo, tgetent,, +Index: configure.ac +=================================================================== +--- configure.ac.orig 2014-07-28 16:16:14.800585267 +0200 ++++ configure.ac 2014-07-28 16:16:17.338585263 +0200 +@@ -52,7 +52,7 @@ AC_CHECK_LIB(tinfo, tgetent,, [AC_CHECK_LIB(termcap, tgetent,, [AC_CHECK_LIB(termlib, tgetent,, [AC_CHECK_LIB(curses, tgetent,, @@ -9,25 +11,22 @@ [AC_MSG_ERROR([libcurses or libncurses are required!])] )] )] ---- src/Makefile.am.orig -+++ src/Makefile.am -@@ -44,6 +44,7 @@ libedit_la_SOURCES = chared.c common.c e - histedit.h keymacro.h map.h chartype.h parse.h prompt.h read.h refresh.h \ - search.h sig.h sys.h terminal.h tty.h vis.h filecomplete.h \ - editline/readline.h -+libedit_la_CFLAGS = $(shell ncursesw6-config --cflags) - if WIDECHAR - libedit_la_SOURCES += eln.c - endif -@@ -53,5 +54,5 @@ nobase_include_HEADERS = histedit.h edit +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am.orig 2014-07-28 16:16:14.800585267 +0200 ++++ src/Makefile.am 2014-07-28 16:17:25.508585142 +0200 +@@ -66,5 +66,6 @@ nobase_include_HEADERS = histedit.h edit nodist_libedit_la_SOURCES = $(BUILT_SOURCES) -libedit_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION) ++libedit_la_CFLAGS = $(shell ncursesw6-config --cflags) +libedit_la_LDFLAGS = $(shell ncursesw6-config --libs) -no-undefined -version-info $(LT_VERSION) ---- libedit.pc.in.orig -+++ libedit.pc.in +Index: libedit.pc.in +=================================================================== +--- libedit.pc.in.orig 2014-07-28 16:16:14.800585267 +0200 ++++ libedit.pc.in 2014-07-28 16:16:17.338585263 +0200 @@ -7,6 +7,6 @@ Name: libedit Description: command line editor library provides generic line editing, history, and tokenization functions. Version: @VERSION@ diff --git a/libedit-20110802-3.0.tar.gz b/libedit-20110802-3.0.tar.gz deleted file mode 100644 index 18c41f8..0000000 --- a/libedit-20110802-3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b5ec9aa41faff761cda7819add93e9d8cb9c0bad85e65a686475e8375ac8a71 -size 445533 diff --git a/libedit-20140620-3.1.tar.gz b/libedit-20140620-3.1.tar.gz new file mode 100644 index 0000000..a429a30 --- /dev/null +++ b/libedit-20140620-3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a22b9b2a8cf4aec9ff51a57e8c848b69640d0195282159d245d8137a19bfcaf2 +size 483857 diff --git a/libedit-ocloexec.patch b/libedit-ocloexec.patch index b3b58b6..a7882f1 100644 --- a/libedit-ocloexec.patch +++ b/libedit-ocloexec.patch @@ -1,8 +1,8 @@ -Index: libedit-20110802-3.0/src/readline.c +Index: src/readline.c =================================================================== ---- libedit-20110802-3.0.orig/src/readline.c -+++ libedit-20110802-3.0/src/readline.c -@@ -1175,15 +1175,15 @@ history_truncate_file (const char *filen +--- src/readline.c.orig 2014-07-28 16:17:56.006585088 +0200 ++++ src/readline.c 2014-07-28 16:17:58.431585084 +0200 +@@ -1190,15 +1190,15 @@ history_truncate_file (const char *filen if (filename == NULL && (filename = _default_history_file()) == NULL) return errno; @@ -21,10 +21,10 @@ Index: libedit-20110802-3.0/src/readline.c close(fd); ret = errno; goto out2; -Index: libedit-20110802-3.0/src/vi.c +Index: src/vi.c =================================================================== ---- libedit-20110802-3.0.orig/src/vi.c -+++ libedit-20110802-3.0/src/vi.c +--- src/vi.c.orig 2014-07-28 16:17:56.006585088 +0200 ++++ src/vi.c 2014-07-28 16:17:58.432585084 +0200 @@ -37,6 +37,7 @@ #include #include @@ -33,7 +33,7 @@ Index: libedit-20110802-3.0/src/vi.c #if !defined(lint) && !defined(SCCSID) #if 0 -@@ -1015,7 +1016,7 @@ vi_histedit(EditLine *el, Int c __attrib +@@ -1007,7 +1008,7 @@ vi_histedit(EditLine *el, Int c __attrib return CC_ERROR; } @@ -42,12 +42,12 @@ Index: libedit-20110802-3.0/src/vi.c if (fd < 0) return CC_ERROR; len = (size_t)(el->el_line.lastchar - el->el_line.buffer); -Index: libedit-20110802-3.0/src/el.c +Index: src/el.c =================================================================== ---- libedit-20110802-3.0.orig/src/el.c -+++ libedit-20110802-3.0/src/el.c -@@ -539,7 +539,7 @@ el_source(EditLine *el, const char *fnam - #endif +--- src/el.c.orig 2014-07-28 16:17:56.006585088 +0200 ++++ src/el.c 2014-07-28 16:17:58.432585084 +0200 +@@ -557,7 +557,7 @@ el_source(EditLine *el, const char *fnam + fname = path; } if (fp == NULL) - fp = fopen(fname, "r"); @@ -55,11 +55,11 @@ Index: libedit-20110802-3.0/src/el.c if (fp == NULL) { el_free(path); return -1; -Index: libedit-20110802-3.0/src/history.c +Index: src/history.c =================================================================== ---- libedit-20110802-3.0.orig/src/history.c -+++ libedit-20110802-3.0/src/history.c -@@ -741,7 +741,7 @@ history_load(TYPE(History) *h, const cha +--- src/history.c.orig 2014-07-28 16:17:56.007585088 +0200 ++++ src/history.c 2014-07-28 16:18:38.101585014 +0200 +@@ -743,7 +743,7 @@ history_load(TYPE(History) *h, const cha static ct_buffer_t conv; #endif @@ -68,12 +68,12 @@ Index: libedit-20110802-3.0/src/history.c return i; if ((line = fgetln(fp, &sz)) == NULL) -@@ -802,7 +802,7 @@ history_save(TYPE(History) *h, const cha - static ct_buffer_t conv; - #endif +@@ -844,7 +844,7 @@ history_save(TYPE(History) *h, const cha + FILE *fp; + int i; -- if ((fp = fopen(fname, "w")) == NULL) -+ if ((fp = fopen(fname, "we")) == NULL) - return -1; +- if ((fp = fopen(fname, "w")) == NULL) ++ if ((fp = fopen(fname, "we")) == NULL) + return -1; - if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1) + i = history_save_fp(h, fp); diff --git a/libedit.changes b/libedit.changes index 249ba83..7fea1bb 100644 --- a/libedit.changes +++ b/libedit.changes @@ -1,3 +1,107 @@ +------------------------------------------------------------------- +Mon Jul 28 14:48:16 UTC 2014 - mrueckert@suse.de + +- rename README.SUSE (bnc#889029) + +------------------------------------------------------------------- +Mon Jul 28 14:47:14 UTC 2014 - mrueckert@suse.de + +- update to 20140620-3.1 + upgrade to fix a crash with clear_history e.g. in php. + + - Bounds search for reallocated index, from OpenBSD via Andreas + Fett + - PR/48957: Federico G. Schwindt: Restore commented out code that + broke rl_callback_handler. + - cast gotsig because it is long on some systems. + - Add stdlib.h for abort() (Jess Thrysoee) + - Don't depend on weak aliases to define the vi "alias" expansion + function, provide an API instead to set it. + - accomodate FreeBSD's flavor of weak references. + - remove remaining makefile support for GCC < 45 that i found. + - PR/48876: Dmitriy Grigoryev: Core dump in readline lib on + attempted expansion Make sure we have 2 matches before calling + strcmp(). + - Always NULL terminate the argv[] array. From OpenBSD. + - PR/48821: If called from tty_stty(), recalculate flags. + - more tty modes refactoring, no functional change intended. + - Factor out some common code (more to be done) from PR/48821 + - Add An to authors. Wording. + - Add a history function that takes a FILE pointer; needed for + Capsicum. From Eitan Adler + - Add missing EL_REFRESH + - ... if called prior to using_history(). This needed to be + worked around in PHP: + http://git.php.net/?p=php-src.git;a=commitdiff;h=31d67bd3 + - get rid of PATH_MAX. + - cast to avoid warning. + - Add a function to move the cursor. + - expose rl_catch_signals and explain what we are doing. + - Test early for EOF to avoid infinite loop in the wide char + case. From Linas Vepstas: linasvepstas at gmail dot com + - provide an el_init_fd function. + - explicitly pass (void *)0 instead of NULL. + - Add FILES section. From jmc@OpenBSD. + - In 2000, .editrc reading from $PWD was removed. Update the man + page. From LEVAI Daniel via jmc@OpenBSD. + - remove dead assignment (Christoph Mallon) + - Fix pasto that affected bind -k (Christoph Mallon) + - Add trailing NULL's to the varargs functions as required. (John + Spencer) + - PR/46945: Steffen Nurpmeso; el_getc() doesn't document it's + setting errno + - return !OKCMD on error. + - PR/46942: Steffen Nurpmeso: editline(3): el_get(): fix + UNBUFFERED return + - PR/46941: Steffen Nurpmeso: document EL_BUFFERED + - PR/46935: Steffen Nurpmeso: editline(3) (libedit): faulty errno + handling, faulty reuse of val in wrong context + - Don't depend on HAVE_GCC being always defined. + - From Kamil Dudka: fix crash of el_insertstr() on incomplete + multi-byte + - PR/46678: Ian Wienand: Add stub implementation for + rl_free_line_state() + - don't crash if add_history is called from an empty line. Called + from nslookup in new bind. XXX: pullup to 6 + - Switch from Op to Oo/Oc for nested block. + - remove stdint.h; it is not used. + - don't include both term.h and termcap.h + - define the new variable + - Add rl_completion_word_break_hook from: + http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/\ + 5ec6a45fa762b8cbd0305ca06acb8780335a486a + - save and restore the tty settings on entry and exit + respectively. cleanup debugging printfs. + - From: Jilles Tjoelker: Add a mapping for the cursor delete key + - From Jilles Tjoelker: Do not move the cursor for + ed-delete-next-char in emacs mode. This makes + ed-delete-next-char suitable for mapping to the key. + Behaviour in vi mode is unchanged (for 'x'). + - These directories default to WARNS?=5 + - Use C89 functions definitions. + - Use C89 functions definitions. Remove use of __P + - include the NULL in the argv conversion + - use arraycount + - PR/45843: Henning Petersen: Fix resource leak on error. + - Add coverity annotations about unreachable code (Kamil Dudka) + - Add missing * + - Initialize termbuf (Kamil Dudka) + - Initialize res (Kamil Dudka) + - check for negative return of ct_visual_char (Kamil Dudka) + - Off by one in allocation could cause buffer overflow (Kamil + Dudka) + - remove unrecheable code (Kamil Dudka) + - easier with an int for now. + - Since Width() is used only for display purposes we don't want + to pass -1 for unprintable characters. + - Fixed misplaced parenthesis (Nirbhay Choubey) + - fixed warnings where wint_t is unsigned. + - fix broken change (parenthesis in the wrong place). From + Nirbhay Choubey + - include if we don't have wcsdup() + - NULL does not need a cast, here + - re-enable -Wconversion + ------------------------------------------------------------------- Tue Mar 13 01:51:31 UTC 2012 - crrodriguez@opensuse.org diff --git a/libedit.spec b/libedit.spec index 96bc5ca..29df68c 100644 --- a/libedit.spec +++ b/libedit.spec @@ -17,10 +17,10 @@ Name: libedit -Version: 3.0.snap20110802 +Version: 3.1.snap20140620 Release: 0 %define pkg_name libedit -%define pkg_version 20110802-3.0 +%define pkg_version 20140620-3.1 # # BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -30,9 +30,8 @@ BuildRequires: ncurses-devel BuildRequires: pkgconfig # Url: http://www.thrysoee.dk/editline/ -# http://www.thrysoee.dk/editline/%{pkg_name}-%{pkg_version}.tar.gz -Source: %{pkg_name}-%{pkg_version}.tar.gz -Source1: README.SuSE +Source: http://thrysoee.dk/editline/libedit-%{pkg_version}.tar.gz +Source1: README.SUSE Source2: baselibs.conf Patch2: libedit-20100424-3.0-ncurses.patch Patch3: libedit-ocloexec.patch @@ -78,7 +77,7 @@ This package holds the development files for libedit. %setup -q -n %{pkg_name}-%{pkg_version} %{__cp} %{S:1} . %patch2 -%patch3 -p1 +%patch3 %patch4 -p1 %build NOCONFIGURE=1 autoreconf -fiv @@ -104,7 +103,7 @@ make check %{_libdir}/libedit.so.%{soname} %{_libdir}/libedit.so.%{soname}.* %{_mandir}/man5/editrc.5%{ext_man} -%doc README.SuSE THANKS ChangeLog COPYING examples/*c +%doc README.SUSE THANKS ChangeLog COPYING examples/*c %files -n libedit-devel %defattr(-,root,root,-)