Add ncurses patch 6.1-20180303

OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=363
This commit is contained in:
Dr. Werner Fink 2018-03-05 08:05:04 +00:00 committed by Git OBS Bridge
parent 3319f2239c
commit 31a9b31556
5 changed files with 49 additions and 76 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38925cefabc2edd8218b167cd480dcff24fe837e87fb3e95aec39a292c158d08
size 82215
oid sha256:0a949e2d78dc242d1ada722ff3b37b1f16b032d9c1525576c20b2f939dd0911b
size 91010

View File

@ -1,47 +0,0 @@
With ncurses-6.0-20170701.patch
+ improve compatibility between different configurations of new_prescr,
fixing a case with threaded code and term-driver where c++/demo did
not work (cf: 20160213).
the pthread_self(3) function call had been called without checking if the
library libpthread has been linked. This break e.g. grub (boo#1058509) if
statically linked.
---
ncurses/tinfo/lib_setup.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- ncurses/tinfo/lib_setup.c
+++ ncurses/tinfo/lib_setup.c 2018-03-01 10:58:23.280319133 +0000
@@ -830,8 +830,9 @@ _nc_find_prescr(void)
{
SCREEN *result = 0;
PRESCREEN_LIST *p;
+ pthread_t id = ((pthread_self)) ? pthread_self() : (pthread_t)getpid();
for (p = _nc_prescreen.allocated; p != 0; p = p->next) {
- if (p->id == pthread_self()) {
+ if (p->id == id) {
result = p->sp;
break;
}
@@ -848,8 +849,9 @@ NCURSES_EXPORT(void)
_nc_forget_prescr(void)
{
PRESCREEN_LIST *p, *q;
+ pthread_t id = ((pthread_self)) ? pthread_self() : (pthread_t)getpid();
for (p = _nc_prescreen.allocated, q = 0; p != 0; q = p, p = p->next) {
- if (p->id == pthread_self()) {
+ if (p->id == id) {
if (q) {
q->next = p->next;
} else {
@@ -885,7 +887,7 @@ new_prescr(void)
#ifdef USE_PTHREADS
PRESCREEN_LIST *p = typeCalloc(PRESCREEN_LIST, 1);
if (p != 0) {
- p->id = pthread_self();
+ p->id = ((pthread_self)) ? pthread_self() : (pthread_t)getpid();
p->sp = sp;
p->next = _nc_prescreen.allocated;
_nc_prescreen.allocated = p;

View File

@ -22,7 +22,7 @@
20 files changed, 248 insertions(+), 81 deletions(-)
--- aclocal.m4
+++ aclocal.m4 2018-02-26 09:11:33.337001372 +0000
+++ aclocal.m4 2018-03-05 07:53:48.984265229 +0000
@@ -580,7 +580,7 @@ AC_MSG_CHECKING([for size of bool])
AC_CACHE_VAL(cf_cv_type_of_bool,[
rm -f cf_test.out
@ -151,7 +151,7 @@
esac
done
--- configure
+++ configure 2018-02-26 09:11:33.341001297 +0000
+++ configure 2018-03-05 07:53:48.988265152 +0000
@@ -5972,7 +5972,7 @@ case $cf_cv_system_name in
fi
;;
@ -288,7 +288,7 @@
# the next lines are needed for linking libtic over libncurses
TINFO_NAME=${LIB_NAME}
--- include/curses.h.in
+++ include/curses.h.in 2018-02-26 09:11:33.341001297 +0000
+++ include/curses.h.in 2018-03-05 07:53:48.992265076 +0000
@@ -177,6 +177,9 @@ typedef @cf_cv_typeof_chtype@ chtype;
typedef @cf_cv_typeof_mmask_t@ mmask_t;
#endif
@ -300,7 +300,7 @@
* We need FILE, etc. Include this before checking any feature symbols.
*/
--- include/termcap.h.in
+++ include/termcap.h.in 2018-02-26 09:11:33.341001297 +0000
+++ include/termcap.h.in 2018-03-05 07:53:48.992265076 +0000
@@ -46,6 +46,8 @@ extern "C"
{
#endif /* __cplusplus */
@ -311,7 +311,7 @@
#undef NCURSES_CONST
--- include/tic.h
+++ include/tic.h 2018-02-26 09:11:33.341001297 +0000
+++ include/tic.h 2018-03-05 07:53:48.992265076 +0000
@@ -221,12 +221,12 @@ struct alias
*/
@ -328,7 +328,7 @@
#define CANCELLED_STRING (char *)(-1)
--- man/man_db.renames
+++ man/man_db.renames 2018-02-26 09:11:33.341001297 +0000
+++ man/man_db.renames 2018-03-05 07:53:48.992265076 +0000
@@ -163,6 +163,7 @@ term.7 term.7
term_variables.3x terminfo_variables.3ncurses
terminfo.5 terminfo.5
@ -346,7 +346,7 @@
#
getty.1 getty.8
--- man/ncurses.3x
+++ man/ncurses.3x 2018-02-26 09:11:33.341001297 +0000
+++ man/ncurses.3x 2018-03-05 07:53:48.992265076 +0000
@@ -138,6 +138,10 @@ after the shell environment variable \fB
[See \fBterminfo\fR(\*n) for further details.]
.SS Datatypes
@ -359,7 +359,7 @@
called \fIwindows\fR, which can be thought of as two-dimensional
arrays of characters representing all or part of a CRT screen.
--- misc/gen-pkgconfig.in
+++ misc/gen-pkgconfig.in 2018-02-26 09:11:33.345001222 +0000
+++ misc/gen-pkgconfig.in 2018-03-05 07:53:48.992265076 +0000
@@ -76,7 +76,7 @@ if test "$includedir" != "/usr/include"
fi
@ -399,7 +399,7 @@
echo "** creating ${name}${suffix}.pc"
--- misc/ncurses-config.in
+++ misc/ncurses-config.in 2018-02-26 09:11:33.345001222 +0000
+++ misc/ncurses-config.in 2018-03-05 07:53:48.992265076 +0000
@@ -100,7 +100,7 @@ while test $# -gt 0; do
# compile/link
--cflags)
@ -410,7 +410,7 @@
fi
if test "${includedir}" != /usr/include ; then
--- misc/terminfo.src
+++ misc/terminfo.src 2018-02-26 09:11:33.349001148 +0000
+++ misc/terminfo.src 2018-03-05 07:53:48.996265000 +0000
@@ -301,7 +301,9 @@ dumb|80-column dumb tty,
am,
cols#80,
@ -795,7 +795,7 @@
s1ds=\E(0, sgr0=\E[0m\E(B, use=ibm5154,
ibm5081-c|ibmmpel-c|IBM 5081 1024x1024 256/4096 Megapel enhanced color display,
--- ncurses/Makefile.in
+++ ncurses/Makefile.in 2018-02-26 09:11:33.349001148 +0000
+++ ncurses/Makefile.in 2018-03-05 07:53:48.996265000 +0000
@@ -219,7 +219,7 @@ $(DESTDIR)$(libdir) :
../lib : ; mkdir $@
@ -806,8 +806,8 @@
./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
$(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
--- ncurses/curses.priv.h
+++ ncurses/curses.priv.h 2018-02-26 09:11:33.349001148 +0000
@@ -2150,6 +2150,8 @@ extern NCURSES_EXPORT(char *) _nc_tracec
+++ ncurses/curses.priv.h 2018-03-05 07:53:48.996265000 +0000
@@ -2169,6 +2169,8 @@ extern NCURSES_EXPORT(char *) _nc_tracec
extern NCURSES_EXPORT(char *) _nc_tracemouse (SCREEN *, MEVENT const *);
extern NCURSES_EXPORT(char *) _nc_trace_mmask_t (SCREEN *, mmask_t);
extern NCURSES_EXPORT(int) _nc_access (const char *, int);
@ -817,7 +817,7 @@
extern NCURSES_EXPORT(int) _nc_freewin (WINDOW *);
extern NCURSES_EXPORT(int) _nc_getenv_num (const char *);
--- ncurses/run_cmd.sh
+++ ncurses/run_cmd.sh 2018-02-26 09:11:33.349001148 +0000
+++ ncurses/run_cmd.sh 2018-03-05 07:53:48.996265000 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+
@ -831,7 +831,7 @@
+
+exec ${1+"$@"}
--- ncurses/tinfo/MKfallback.sh
+++ ncurses/tinfo/MKfallback.sh 2018-02-26 09:11:33.349001148 +0000
+++ ncurses/tinfo/MKfallback.sh 2018-03-05 07:53:48.996265000 +0000
@@ -68,6 +68,12 @@ else
tmp_info=
fi
@ -864,7 +864,7 @@
done
--- ncurses/tinfo/access.c
+++ ncurses/tinfo/access.c 2018-02-26 09:11:33.349001148 +0000
+++ ncurses/tinfo/access.c 2018-03-05 07:53:48.996265000 +0000
@@ -35,6 +35,9 @@
#include <ctype.h>
@ -907,7 +907,7 @@
_nc_access(const char *path, int mode)
{
--- ncurses/tinfo/lib_setup.c
+++ ncurses/tinfo/lib_setup.c 2018-02-26 09:11:33.353001073 +0000
+++ ncurses/tinfo/lib_setup.c 2018-03-05 07:53:48.996265000 +0000
@@ -599,6 +599,9 @@ _nc_locale_breaks_acs(TERMINAL *termp)
} else if ((value = tigetnum("U8")) >= 0) {
result = value; /* use extension feature */
@ -919,7 +919,7 @@
result = 1; /* always broken */
} else if (strstr(env, "screen") != 0
--- ncurses/tinfo/read_entry.c
+++ ncurses/tinfo/read_entry.c 2018-02-26 09:11:33.353001073 +0000
+++ ncurses/tinfo/read_entry.c 2018-03-05 07:53:48.996265000 +0000
@@ -532,6 +532,7 @@ _nc_read_file_entry(const char *const fi
FILE *fp = 0;
int code;
@ -937,7 +937,7 @@
return (code);
}
--- ncurses/tinfo/read_termcap.c
+++ ncurses/tinfo/read_termcap.c 2018-02-26 09:11:33.353001073 +0000
+++ ncurses/tinfo/read_termcap.c 2018-03-05 07:53:48.996265000 +0000
@@ -322,14 +322,18 @@ _nc_getent(
*/
if (fd >= 0) {
@ -984,7 +984,7 @@
}
if (copied != 0)
--- progs/Makefile.in
+++ progs/Makefile.in 2018-02-26 09:11:33.353001073 +0000
+++ progs/Makefile.in 2018-03-05 07:53:48.996265000 +0000
@@ -100,7 +100,7 @@ CFLAGS_LIBTOOL = $(CCFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
@ -1004,7 +1004,7 @@
LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
--- test/test.priv.h
+++ test/test.priv.h 2018-02-26 09:11:33.353001073 +0000
+++ test/test.priv.h 2018-03-05 07:53:48.996265000 +0000
@@ -910,12 +910,12 @@ extern char *strnames[], *strcodes[], *s
#endif

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Mar 5 07:48:43 UTC 2018 - werner@suse.de
- Add ncurses patch 6.1-20180303
+ modify TurnOn/TurnOff macros in lib_vidattr.c and lib_vid_attr.c to
avoid expansion of "CUR" in trace.
+ improve a few lintian warnings in test-packages.
+ modify lib_setup to avoid calling pthread_self() without first
verifying that the address is valid, i.e., for weak symbols
(report/patch by Werner Fink).
+ modify generated terminfo.5 to not use "expand" and related width
on the last column of tables, making layout on wide terminals look
better (adapted from patch by Kir Kolyshkin).
+ add a category to report_offsets, e.g., "w" for wide-character, "t"
for threads to make the report more readable. Reorganized the
structures reported to make the categories more apparent.
+ simplify some ifdef's for extended-colors.
+ add NCURSES_GLOBALS and NCURSES_PRESCREEN to report_offsets, to show
how similar the different tinfo configurations are.
- Remove patch ncurses-6.1-weakpthreads.dif now upstream (bsc#1082772)
- Make expect build check less fragile on timing
-------------------------------------------------------------------
Fri Mar 2 10:00:20 UTC 2018 - werner@suse.de

View File

@ -74,7 +74,6 @@ Source6: edit.sed
Source7: baselibs.conf
Patch0: ncurses-6.1.dif
Patch1: ncurses-5.9-ibm327x.dif
Patch2: ncurses-6.1-weakpthreads.dif
Patch4: ncurses-5.7-tack.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _miscdir %{_datadir}/misc
@ -260,7 +259,6 @@ rm -fr tack
tar -xzf %{S:5}
mv tack-* tack
%patch1 -p0 -b .327x
%patch2 -p0 -b .pth
%patch4 -p0 -b .hs
%patch0 -p0 -b .p0
@ -990,7 +988,7 @@ nm -D %{buildroot}/%{_lib}/libtinfo.so.%{version} | grep -q _nc_read_entry2
pushd test
expect -d <<-'EOF'
set env(TERM) xterm
set timeout 10
set timeout 20
spawn -noecho "binw/newdemo"
send -- "x"
sleep 5
@ -999,11 +997,11 @@ pushd test
send -- "x"
sleep 5
send -- "q"
wait
wait -nowait
EOF
expect -d <<-'EOF'
set env(TERM) xterm
set timeout 10
set timeout 20
spawn -noecho "bin/newdemo"
send -- "x"
sleep 5
@ -1012,7 +1010,7 @@ pushd test
send -- "x"
sleep 5
send -- "q"
wait
wait -nowait
EOF
popd
%endif