diff --git a/ncurses-5.9-environment.dif b/ncurses-5.9-environment.dif
deleted file mode 100644
index 06f973d..0000000
--- a/ncurses-5.9-environment.dif
+++ /dev/null
@@ -1,28 +0,0 @@
----
- man/curs_util.3x         |    3 +++
- ncurses/tinfo/lib_data.c |    2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
---- man/curs_util.3x
-+++ man/curs_util.3x	2016-07-07 09:01:21.335637800 +0000
-@@ -172,6 +172,9 @@ ncurses modifies the last step in its co
- checks if the \fBLINES\fR and \fBCOLUMNS\fR environment variables
- are set to a number greater than zero.
- .bP
-+On openSUSE/SUSE Linux the default is \fBTRUE\fR, if you do not want this
-+feature you may use the \fBuse_tioctl\fR routine with \fBFALSE\fR as an argument.
-+.bP
- for each, ncurses updates the corresponding environment variable
- with the value that it has obtained via operating system call
- or from the terminal database.
---- ncurses/tinfo/lib_data.c
-+++ ncurses/tinfo/lib_data.c	2016-07-07 09:01:21.339637723 +0000
-@@ -257,7 +257,7 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _n
-     NULL,			/* _tputs_trace */
- #endif
- #endif
--    FALSE,			/* use_tioctl */
-+    TRUE,			/* use_tioctl */
- };
- /* *INDENT-ON* */
- 
diff --git a/ncurses-5.9-ibm327x.dif b/ncurses-5.9-ibm327x.dif
index 2852ff0..5da6071 100644
--- a/ncurses-5.9-ibm327x.dif
+++ b/ncurses-5.9-ibm327x.dif
@@ -3,8 +3,8 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 --- misc/terminfo.src
-+++ misc/terminfo.src	2016-07-07 09:00:03.889138816 +0000
-@@ -15380,8 +15380,8 @@ hazel|exec80|h80|he80|Hazeltine Executiv
++++ misc/terminfo.src	2016-10-17 08:39:16.245980044 +0000
+@@ -15792,8 +15792,8 @@ hazel|exec80|h80|he80|Hazeltine Executiv
  #
  
  ibm327x|line mode IBM 3270 style,
diff --git a/ncurses-6.0-patches.tar.bz2 b/ncurses-6.0-patches.tar.bz2
index 683a851..7723303 100644
--- a/ncurses-6.0-patches.tar.bz2
+++ b/ncurses-6.0-patches.tar.bz2
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:5702073c90fb2eef2fef8bce86bd1e14f7cdfa030f61fabda915afc5dcb02b2b
-size 1171493
+oid sha256:93de4dcf09a44b4eb08a917ffe261bf736f1bbf67c24ba4979fe1263b5b80e22
+size 1288596
diff --git a/ncurses-6.0.dif b/ncurses-6.0.dif
index b4bfe2a..268bc4c 100644
--- a/ncurses-6.0.dif
+++ b/ncurses-6.0.dif
@@ -21,7 +21,7 @@
  19 files changed, 240 insertions(+), 80 deletions(-)
 
 --- aclocal.m4
-+++ aclocal.m4	2016-10-04 16:26:22.355764323 +0000
++++ aclocal.m4	2016-10-13 08:37:55.317157744 +0000
 @@ -564,7 +564,7 @@ AC_MSG_CHECKING([for size of bool])
  AC_CACHE_VAL(cf_cv_type_of_bool,[
  	rm -f cf_test.out
@@ -31,7 +31,7 @@
  #include <stdio.h>
  
  #if defined(__cplusplus)
-@@ -4717,12 +4717,15 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -4719,12 +4719,15 @@ cat >>$cf_edit_man <<CF_EOF
  		echo '? missing rename for '\$cf_source
  		cf_target="\$cf_source"
  	fi
@@ -49,7 +49,7 @@
  	sed	-f $cf_man_alias \\
  CF_EOF
  
-@@ -4732,7 +4735,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -4734,7 +4737,7 @@ cat >>$cf_edit_man <<CF_EOF
  CF_EOF
  else
  cat >>$cf_edit_man <<CF_EOF
@@ -58,7 +58,7 @@
  CF_EOF
  fi
  
-@@ -4772,7 +4775,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -4774,7 +4777,7 @@ cat >>$cf_edit_man <<CF_EOF
  		mv \$TMP.$cf_so_strip \$TMP
  	fi
  	fi
@@ -67,7 +67,7 @@
  CF_EOF
  fi
  
-@@ -4781,23 +4784,23 @@ case "$MANPAGE_FORMAT" in
+@@ -4783,23 +4786,23 @@ case "$MANPAGE_FORMAT" in
  cat >>$cf_edit_man <<CF_EOF
  	if test \$form = format ; then
  		# BSDI installs only .0 suffixes in the cat directories
@@ -97,7 +97,7 @@
  				for cf_alias in \$aliases
  				do
  					if test \$section = 1 ; then
-@@ -4806,7 +4809,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -4808,7 +4811,7 @@ cat >>$cf_edit_man <<CF_EOF
  
  					if test "$MANPAGE_SYMLINKS" = yes ; then
  						if test -f \$cf_alias\${suffix} ; then
@@ -106,7 +106,7 @@
  							then
  								continue
  							fi
-@@ -4816,18 +4819,18 @@ CF_EOF
+@@ -4818,18 +4821,18 @@ CF_EOF
  case "x$LN_S" in
  (*-f)
  cat >>$cf_edit_man <<CF_EOF
@@ -128,7 +128,7 @@
  						echo ".so \$cf_source" >\$TMP
  CF_EOF
  if test -n "$cf_compress" ; then
-@@ -4847,9 +4850,9 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -4849,9 +4852,9 @@ cat >>$cf_edit_man <<CF_EOF
  			)
  		)
  	elif test \$verb = removing ; then
@@ -141,7 +141,7 @@
  		)
  		test -d \$cf_subdir\${section} &&
  		test -n "\$aliases" && (
-@@ -4869,6 +4872,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -4871,6 +4874,7 @@ cat >>$cf_edit_man <<CF_EOF
  #		echo ".hy 0"
  		cat \$TMP
  	fi
@@ -150,7 +150,7 @@
  esac
  done
 --- configure
-+++ configure	2016-10-04 16:26:22.363764173 +0000
++++ configure	2016-10-13 08:37:55.321157664 +0000
 @@ -5895,7 +5895,7 @@ case $cf_cv_system_name in
  	fi
  	;;
@@ -278,7 +278,7 @@
  	;;
  esac
  done
-@@ -22227,6 +22231,7 @@ if test "$with_termlib" != no ; then
+@@ -22231,6 +22235,7 @@ if test "$with_termlib" != no ; then
  		TINFO_LDFLAGS="-L${LIB_DIR}"
  		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
  	fi
@@ -287,7 +287,7 @@
  	# the next lines are needed for linking libtic over libncurses
  	TINFO_NAME=${LIB_NAME}
 --- include/curses.h.in
-+++ include/curses.h.in	2016-10-04 16:26:22.363764173 +0000
++++ include/curses.h.in	2016-10-13 08:37:55.321157664 +0000
 @@ -165,6 +165,9 @@ typedef @cf_cv_typeof_chtype@ chtype;
  typedef @cf_cv_typeof_mmask_t@ mmask_t;
  #endif
@@ -299,7 +299,7 @@
   * We need FILE, etc.  Include this before checking any feature symbols.
   */
 --- include/termcap.h.in
-+++ include/termcap.h.in	2016-10-04 16:26:22.363764173 +0000
++++ include/termcap.h.in	2016-10-13 08:37:55.321157664 +0000
 @@ -46,6 +46,8 @@ extern "C"
  {
  #endif /* __cplusplus */
@@ -310,7 +310,7 @@
  
  #undef  NCURSES_CONST 
 --- include/tic.h
-+++ include/tic.h	2016-10-04 16:26:22.363764173 +0000
++++ include/tic.h	2016-10-13 08:37:55.321157664 +0000
 @@ -231,12 +231,12 @@ extern NCURSES_EXPORT(const struct alias
   */
  
@@ -327,7 +327,7 @@
  #define CANCELLED_STRING	(char *)(-1)
  
 --- man/man_db.renames
-+++ man/man_db.renames	2016-10-04 16:26:22.363764173 +0000
++++ man/man_db.renames	2016-10-13 08:37:55.321157664 +0000
 @@ -167,6 +167,8 @@ tput.1				tput.1
  tset.1				tset.1
  vprintf.3s			vprintf.3
@@ -338,7 +338,7 @@
  # Other:
  tack.1m				tack.1
 --- man/ncurses.3x
-+++ man/ncurses.3x	2016-10-04 16:26:22.363764173 +0000
++++ man/ncurses.3x	2016-10-13 08:37:55.321157664 +0000
 @@ -121,6 +121,10 @@ after the shell environment variable \fB
  [See \fBterminfo\fR(\*n) for further details.]
  .SS Datatypes
@@ -351,7 +351,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	2016-10-04 16:26:22.363764173 +0000
++++ misc/gen-pkgconfig.in	2016-10-13 08:37:55.321157664 +0000
 @@ -76,7 +76,7 @@ if test "$includedir" != "/usr/include"
  fi
  
@@ -391,7 +391,7 @@
  
  	echo "** creating ${name}${suffix}.pc"
 --- misc/ncurses-config.in
-+++ misc/ncurses-config.in	2016-10-04 16:26:22.363764173 +0000
++++ misc/ncurses-config.in	2016-10-13 08:37:55.321157664 +0000
 @@ -100,7 +100,7 @@ while test $# -gt 0; do
  	# compile/link
  	--cflags)
@@ -402,7 +402,7 @@
  		fi
  		if test "${includedir}" != /usr/include ; then
 --- misc/terminfo.src
-+++ misc/terminfo.src	2016-10-04 16:37:11.719709501 +0000
++++ misc/terminfo.src	2016-10-13 08:37:55.385156367 +0000
 @@ -301,7 +301,9 @@ dumb|80-column dumb tty,
  	am,
  	cols#80,
@@ -782,7 +782,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	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/Makefile.in	2016-10-13 08:37:55.325157583 +0000
 @@ -218,7 +218,7 @@ $(DESTDIR)$(libdir) :
  ../lib : ; mkdir $@
  
@@ -793,7 +793,7 @@
  ./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	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/curses.priv.h	2016-10-13 08:37:55.325157583 +0000
 @@ -2024,6 +2024,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);
@@ -804,7 +804,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	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/run_cmd.sh	2016-10-13 08:37:55.325157583 +0000
 @@ -0,0 +1,11 @@
 +#!/bin/sh
 +
@@ -818,7 +818,7 @@
 +
 +exec ${1+"$@"}
 --- ncurses/tinfo/MKfallback.sh
-+++ ncurses/tinfo/MKfallback.sh	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/tinfo/MKfallback.sh	2016-10-13 08:37:55.325157583 +0000
 @@ -68,6 +68,12 @@ else
  	tmp_info=
  fi
@@ -851,7 +851,7 @@
  	done
  
 --- ncurses/tinfo/access.c
-+++ ncurses/tinfo/access.c	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/tinfo/access.c	2016-10-13 08:37:55.329157501 +0000
 @@ -35,6 +35,9 @@
  #include <ctype.h>
  
@@ -894,7 +894,7 @@
  _nc_access(const char *path, int mode)
  {
 --- ncurses/tinfo/lib_setup.c
-+++ ncurses/tinfo/lib_setup.c	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/tinfo/lib_setup.c	2016-10-13 08:37:55.329157501 +0000
 @@ -584,6 +584,9 @@ _nc_locale_breaks_acs(TERMINAL * termp)
      } else if ((value = tigetnum("U8")) >= 0) {
  	result = value;		/* use extension feature */
@@ -906,7 +906,7 @@
  	    result = 1;		/* always broken */
  	} else if (strstr(env, "screen") != 0
 --- ncurses/tinfo/read_entry.c
-+++ ncurses/tinfo/read_entry.c	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/tinfo/read_entry.c	2016-10-13 08:37:55.329157501 +0000
 @@ -433,6 +433,7 @@ _nc_read_file_entry(const char *const fi
      FILE *fp = 0;
      int code;
@@ -924,7 +924,7 @@
      return (code);
  }
 --- ncurses/tinfo/read_termcap.c
-+++ ncurses/tinfo/read_termcap.c	2016-10-04 16:26:22.371764025 +0000
++++ ncurses/tinfo/read_termcap.c	2016-10-13 08:37:55.329157501 +0000
 @@ -322,14 +322,18 @@ _nc_getent(
  	     */
  	    if (fd >= 0) {
@@ -971,7 +971,7 @@
      }
      if (copied != 0)
 --- test/test.priv.h
-+++ test/test.priv.h	2016-10-04 16:26:22.371764025 +0000
++++ test/test.priv.h	2016-10-13 08:37:55.329157501 +0000
 @@ -790,12 +790,12 @@ extern char *strnames[], *strcodes[], *s
  #endif
  
diff --git a/ncurses.changes b/ncurses.changes
index 0a917f2..a3250b5 100644
--- a/ncurses.changes
+++ b/ncurses.changes
@@ -1,3 +1,45 @@
+-------------------------------------------------------------------
+Thu Oct 27 09:51:21 UTC 2016 - werner@suse.de
+
+- Drop patch ncurses-5.9-environment.dif as YaST2 ncurses GUI does
+  not need it anymore and as well as it causes bug bsc#1000662 
+
+-------------------------------------------------------------------
+Mon Oct 24 08:44:52 UTC 2016 - werner@suse.de
+
+- Add ncurses patch 20161022
+  + modify tset -w (and tput reset) to update the program's copy of the
+    screensize if it was already set in the system, to improve tabstop
+    setting which relies upon knowing the actual screensize.
+  + add functionality of tset -w to tput, like the "-c" feature this is
+    not optional in tput.
+  + add "clear" as a possible link/alias to tput.
+  + improve tput's check for being called as "init" or "reset" to allow
+    for transformed names.
+  + split-out the "clear" function from progs/clear.c, share with
+    tput to get the same behavior, e.g., the E3 extension.
+
+-------------------------------------------------------------------
+Mon Oct 17 08:37:12 UTC 2016 - werner@suse.de
+
+- Add ncurses patch 20161015
+  + amend internal use of tputs to consistently use the number of lines
+    affected, e.g., for insert/delete character operations.  While
+    merging terminfo source early in 1995, several descriptions used the
+    "*" proportional delay for these operations, prompting a change in
+    doupdate.
+  + regenerate llib-* files.
+  + regenerate HTML manpages.
+  + fix several formatting issues with manual pages.
+
+-------------------------------------------------------------------
+Thu Oct 13 08:34:02 UTC 2016 - werner@suse.de
+
+- Add ncurses patch 20161008
+  + adjust size in infocmp/tic to work with strlcpy.
+  + fix configure script to record when strlcat is found on OpenBSD.
+  + build-fix for "recent" OpenBSD vs baudrate.
+
 -------------------------------------------------------------------
 Tue Oct  4 16:38:06 UTC 2016 - werner@suse.de
 
diff --git a/ncurses.spec b/ncurses.spec
index 01aebe4..fa4e450 100644
--- a/ncurses.spec
+++ b/ncurses.spec
@@ -66,7 +66,6 @@ Source7:        baselibs.conf
 Patch0:         ncurses-6.0.dif
 Patch1:         ncurses-5.9-ibm327x.dif
 Patch4:         ncurses-5.7-tack.dif
-Patch5:         ncurses-5.9-environment.dif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %global         _miscdir    %{_datadir}/misc
 %global         _incdir     %{_includedir}
@@ -278,7 +277,6 @@ tar  xfz %{S:5}
 mv tack-* tack
 %patch1 -p0 -b .327x
 %patch4 -p0 -b .hs
-%patch5 -p0 -b .lc
 %patch0 -p0 -b .p0
 rm -vf include/ncurses_dll.h
 rm -vf mkdirs.sh
@@ -400,6 +398,9 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src
     # No --enable-xmc-glitch because this seems to break yast2
     # on console/konsole (no magic cookie support on those?)
     #
+    # No --enable-hard-tabs for users which have disabled
+    # the use of tabs
+    #
     touch --reference=README config.sub config.guess
     > $SCREENLOG
     tail -q -s 0.5 -f $SCREENLOG & pid=$!
@@ -420,6 +421,7 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src
 	--with-gpm		\
 %endif
 	--with-dlsym		\
+	--with-terminfo-dirs=%{_sysconfdir}/terminfo:%{_datadir}/terminfo \
 	--with-termlib=tinfo	\
 	--with-ticlib=tic	\
 	--with-xterm-kbs=del	\
@@ -532,6 +534,7 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src
 	EOF
 %endif
     # must not use %jobs here (would lead to: ln: ncurses.h already exists)
+    find man/ -name '*.[1-8]x.*' | xargs -r rm -vf
     make install DESTDIR=%{root} includedir=%{_incdir} includesubdir=/ncurses libdir=%{_libdir}
     ln -sf %{_incdir}/ncurses/{curses,ncurses,term,termcap}.h %{root}%{_incdir}
     sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncurses" --libs "-lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses6-config
@@ -778,7 +781,7 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src
     install -m 644 %{S:3}			%{buildroot}%{_defaultdocdir}/ncurses/
     install -m 644 README			%{buildroot}%{_defaultdocdir}/ncurses/
     install -m 644 NEWS				%{buildroot}%{_defaultdocdir}/ncurses/
-    mkdir -p %{buildroot}%{_sysconfdir}
+    mkdir -p %{buildroot}%{_sysconfdir}/terminfo
     mkdir -p %{buildroot}%{_miscdir}
     LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{buildroot}/%{_lib}
     export LD_LIBRARY_PATH
@@ -873,6 +876,7 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src
 %defattr(-,root,root)
 %{_sysconfdir}/termcap
 %config %{_miscdir}/termcap
+%dir %{_sysconfdir}/terminfo
 %dir %{_datadir}/tabset/
 %dir %{_datadir}/terminfo/
 %dir %{_datadir}/terminfo/*/