From 2283ab0cd6befcf696534ee27f72999b37630c4db6e69a031f366e2649ec87ec Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 4 May 2023 15:09:00 +0000 Subject: [PATCH] Updating link to change in openSUSE:Factory/ncurses revision 238 OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=2e2af872ec6c27cac633c8799f6f5ee2 --- ncurses-6.4-makeuseof_secure_open.dif | 15 ++++++ ncurses-6.4-patches.tar.bz2 | 4 +- ncurses-6.4.dif | 50 ++++++++++---------- ncurses.changes | 49 ++++++++++++++++++++ ncurses.spec | 66 +++++++++++++++++++++------ 5 files changed, 143 insertions(+), 41 deletions(-) create mode 100644 ncurses-6.4-makeuseof_secure_open.dif diff --git a/ncurses-6.4-makeuseof_secure_open.dif b/ncurses-6.4-makeuseof_secure_open.dif new file mode 100644 index 0000000..ba9764c --- /dev/null +++ b/ncurses-6.4-makeuseof_secure_open.dif @@ -0,0 +1,15 @@ +--- + include/nc_access.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- include/nc_access.h ++++ include/nc_access.h 2023-05-02 07:38:17.837330114 +0000 +@@ -64,7 +64,7 @@ extern NCURSES_EXPORT(int) _nc_env_acces + #else + + #define safe_fopen(name,mode) _nc_safe_fopen(name,mode) +-#define safe_open2(name,flags) _nc_safe_open2(name,flags,0) ++#define safe_open2(name,flags) _nc_safe_open3(name,flags,0) + #define safe_open3(name,flags,mode) _nc_safe_open3(name,flags,mode) + extern NCURSES_EXPORT(FILE *) _nc_safe_fopen (const char *, const char *); + extern NCURSES_EXPORT(int) _nc_safe_open3 (const char *, int, mode_t); diff --git a/ncurses-6.4-patches.tar.bz2 b/ncurses-6.4-patches.tar.bz2 index 7851e82..fc63a9b 100644 --- a/ncurses-6.4-patches.tar.bz2 +++ b/ncurses-6.4-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10e3f68a2278238977619b02d30b1dd23903cb6ab03ab0fe5fd3979a04851d3f -size 550221 +oid sha256:b4a58a90340459329eb97ac6e72c827bf8ed4dc38742fee24f7e016d1fcb44ad +size 637246 diff --git a/ncurses-6.4.dif b/ncurses-6.4.dif index 94229bf..772b51e 100644 --- a/ncurses-6.4.dif +++ b/ncurses-6.4.dif @@ -18,8 +18,8 @@ 16 files changed, 207 insertions(+), 70 deletions(-) --- aclocal.m4 -+++ aclocal.m4 2023-01-23 13:06:54.872588922 +0000 -@@ -6004,12 +6004,15 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <\$TMP CF_EOF if test -n "$cf_manpage_compress" ; then -@@ -6134,9 +6137,9 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <&6 +@@ -8050,7 +8050,7 @@ echo "${ECHO_T}$with_pcre2" >&6 if test "x$with_pcre2" != xno ; then cf_with_pcre2_ok=no @@ -168,7 +168,7 @@ do if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then -@@ -15245,12 +15245,15 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <\$TMP CF_EOF if test -n "$cf_manpage_compress" ; then -@@ -15375,9 +15378,9 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man < + +- Do not overwrite PKG_CONFIG_PATH for new tack support + +------------------------------------------------------------------- +Tue May 2 07:41:13 UTC 2023 - Dr. Werner Fink + +- Add ncurses patch 20230429 + + revise recent change to _nc_write_entry to isolate it to a Cygwin bug + (cf: 20230311) + + amend fix for wgetnstr, wgetn_wstr to use cbreak mode unless raw + mode was set (cf: 20210522). + + fix a few warnings from cppcheck, etc. + + correct copy/paste error in nc_access.h (report by Werner Fink). +- Adopt patch ncurses-6.4-makeuseof_secure_open.dif + * Fix yet an other copy/paste typo + +------------------------------------------------------------------- +Wed Apr 26 12:14:24 UTC 2023 - Dr. Werner Fink + +- Add patch ncurses-6.4-makeuseof_secure_open.dif + * Really make use of _nc_safe_fopen() and _nc_safe_open3() + +------------------------------------------------------------------- +Tue Apr 25 06:06:23 UTC 2023 - Dr. Werner Fink + +- Add ncurses patch 20230424 + + check return value of _nc_save_str(), in special case for tic where + extended capabilities are processed but the terminal description was + not initialized (report by Ziqiao Kong). + + regenerate llib-* files. + +------------------------------------------------------------------- +Mon Apr 24 06:41:58 UTC 2023 - Dr. Werner Fink + +- Add ncurses patch 20230423 (boo#1210552) + + add tiscan_s() to help applications check formatting capabilities + that would be passed to tiparm_s, etc. + + add tiparm_s() to provide applications a way to tell ncurses what + the expected parameters are for a capability (tmux #3531). + + improve check in lib_tparm.c, ensuring that a char* fits into a + TPARM_ARG. + + add --disable-setuid-environ configure option (request by Sven + Joachim). + + drop compatibility with obsolete versions of tack, e.g., pre-1.08 + (Debian #1034549, cf: 20170722). +- Build tack on the own way as ncurses upstream drop build within support + ------------------------------------------------------------------- Wed Apr 19 09:16:10 UTC 2023 - Dr. Werner Fink diff --git a/ncurses.spec b/ncurses.spec index 4a1c5e2..dc9305f 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -34,8 +34,10 @@ %global soname_tinfo tinfow %endif -%define patchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir}) -%define basevers 6.4 +%global patchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir}) +%global basevers 6.4 +%global tackvers 1.09 +%global tacklvl 20221229 Name: ncurses #!BuildIgnore: terminfo @@ -87,17 +89,18 @@ Source2: handle.linux Source3: README.devel Source4: ncurses-rpmlintrc # Latest tack can be found at ftp://ftp.invisible-island.net/pub/ncurses/current/ -Source5: https://www.invisible-island.net/archives/ncurses/current/tack-1.09-20221229.tgz +Source5: https://www.invisible-island.net/archives/ncurses/current/tack-%{tackvers}-%{tacklvl}.tgz Source6: edit.sed Source7: baselibs.conf Source8: cursescheck Source9: https://www.invisible-island.net/archives/ncurses/ncurses-%{basevers}.tar.gz.asc -Source10: https://www.invisible-island.net/archives/ncurses/current/tack-1.09-20221229.tgz.asc +Source10: https://www.invisible-island.net/archives/ncurses/current/tack-%{tackvers}-%{tacklvl}.tgz.asc Source11: ncurses.keyring Patch0: ncurses-6.4.dif Patch1: ncurses-5.9-ibm327x.dif Patch2: ncurses-5.7-tack.dif Patch3: FORTIFY_SOURCE_3-fix.patch +Patch4: ncurses-6.4-makeuseof_secure_open.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _miscdir %{_datadir}/misc %global _incdir %{_includedir} @@ -316,11 +319,12 @@ This package contains the static library files for the ncurses library in its ABI version 5 form. %package -n tack +Version: %{tackvers}.%{tacklvl} Summary: Terminfo action checker License: GPL-2.0-or-later Group: Development/Tools/Building Provides: ncurses-devel:%{_bindir}/tack -Requires: ncurses = %{version}-%{release} +Requires: ncurses = %{basevers}.%{patchlvl} %description -n tack This package contains the tack utility to help to build a new terminfo @@ -349,6 +353,7 @@ rm -fr tack mv tack-* tack %patch1 -p0 -b .327x %patch2 -p0 -b .hs +%patch4 -p0 %patch0 -p0 -b .p0 %patch3 -p1 @@ -369,6 +374,7 @@ mv tack-* tack # CFLAGS_SHARED="%{_lto_cflags_shared}" export CFLAGS_SHARED +%global configtack %configure %global _configure screen -D -m ./configure SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1 SCREENRC=${SCREENDIR}/ncurses @@ -532,6 +538,7 @@ export CFLAGS_SHARED --disable-stripping \ --disable-root-access \ --disable-root-environ \ + --disable-setuid-environ\ --disable-termcap \ --disable-overwrite \ --disable-rpath \ @@ -669,8 +676,12 @@ export CFLAGS_SHARED rm -vf %{root}%{_libdir}/pkgconfig/tinfo.pc mv -vf %{root}%{_libdir}/pkgconfig/*.pc pc/ sed -ri 's@^(Requires.private:).*@\1@' pc/*.pc - bash %{S:6} --cflags "$(pkg-config --cflags ncursesw)" --libs "$(pkg-config --libs ncursesw)" \ - %{root}%{_bindir}/ncursesw6-config + echo $PKG_CONFIG_PATH + what=ncursesw + cflags="$(pkg-config --cflags $what)" + libs="$(pkg-config --libs $what)" + test -n "$cflags" -a -n "$libs" || exit 1 + bash %{S:6} --cflags "${cflags%%%% }" --libs "${libs%%%% }" %{root}%{_bindir}/${what}6-config # # Some tests @@ -684,6 +695,17 @@ export CFLAGS_SHARED LD_LIBRARY_PATH=$PWD/lib export LD_LIBRARY_PATH PATH pushd tack/ + OCFLAGS="$CFLAGS" + OLDFLAGS="$LDFLAGS" + OPKG_CONFIG_PATH="$PKG_CONFIG_PATH" + CFLAGS="$CFLAGS -I%{root}%{_incdir}/ncursesw/ -I%{root}%{_incdir}/ -fPIE" \ + LDFLAGS="$LDFLAGS -Wl,-rpath-link=%{root}%{_libdir} -L%{root}%{_libdir} -pie" \ + PKG_CONFIG_PATH=${PWD}/../pc/ \ + %configtack --with-ncursesw --disable-rpath-hack + make %{?_smp_mflags} + CFLAGS="$OCFLAGS" + LDFLAGS="$OLDFLAGS" + PKG_CONFIG_PATH="$OPKG_CONFIG_PATH" ldd ./tack popd unset LD_LIBRARY_PATH @@ -706,11 +728,14 @@ export CFLAGS_SHARED make install DESTDIR=${PWD} INSTALL_PROG=install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread' %endif mv usr usr.back -cp Makefile Makefile.back + cp Makefile Makefile.back make distclean popd %endif %endif + pushd tack/ + make install DESTDIR=%{root} INSTALL_PROG=install + popd test ! -L tack || rm -f tack make clean # @@ -775,8 +800,12 @@ includedir5=%{_incdir}/ncurses5' "$pc" sed -ri 's@^(Cflags:.*)(-I.*)@\1-I${includedir5} \2@' pc/${base}5.pc sed -ri 's@^(Requires.private:).*@\1@' pc/${base}5.pc done - bash %{S:6} --cflags "$(pkg-config --cflags ncurses5)" --libs "$(pkg-config --libs ncurses5)" \ - %{root}%{_bindir}/ncurses5-config + echo $PKG_CONFIG_PATH + what=ncurses5 + cflags="$(pkg-config --cflags $what)" + libs="$(pkg-config --libs $what)" + test -n "$cflags" -a -n "$libs" || exit 1 + bash %{S:6} --cflags "${cflags%%%% }" --libs "${libs%%%% }" %{root}%{_bindir}/${what}-config # # Now use --disable-widec for narrow character support. @@ -827,8 +856,13 @@ includedir5=%{_incdir}/ncurses5' "$pc" popd mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/ sed -ri 's@^(Requires.private:).*@\1@' pc/*.pc - bash %{S:6} --cflags "$(pkg-config --cflags ncurses)" --libs "$(pkg-config --libs ncurses)" \ - %{root}%{_bindir}/ncurses6-config + echo $PKG_CONFIG_PATH + what=ncurses + cflags="$(pkg-config --cflags $what)" + libs="$(pkg-config --libs $what)" + test -n "$cflags" -a -n "$libs" || exit 1 + bash %{S:6} --cflags "${cflags%%%% }" --libs "${libs%%%% }" %{root}%{_bindir}/${what}6-config + # # Some tests # @@ -927,8 +961,12 @@ includedir5=%{_incdir}/ncurses5' "$pc" sed -ri 's@^(Cflags:.*)(-I.*)@\1-I${includedir5} \2@' pc/${base}5.pc sed -ri 's@^(Requires.private:).*@\1@' pc/${base}5.pc done - bash %{S:6} --cflags "$(pkg-config --cflags ncursesw5)" --libs "$(pkg-config --libs ncursesw5)" \ - %{root}%{_bindir}/ncursesw5-config + echo $PKG_CONFIG_PATH + what=ncursesw5 + cflags="$(pkg-config --cflags $what)" + libs="$(pkg-config --libs $what)" + test -n "$cflags" -a -n "$libs" || exit 1 + bash %{S:6} --cflags "${cflags%%%% }" --libs "${libs%%%% }" %{root}%{_bindir}/${what}-config %install %if %{with usepcre2}