diff --git a/1000-add-sw_64-support-not-upstream-modified-files.patch b/1000-add-sw_64-support-not-upstream-modified-files.patch new file mode 100644 index 0000000000000000000000000000000000000000..f0e6e32f355307b9494ee59ac12e81b425fb861f --- /dev/null +++ b/1000-add-sw_64-support-not-upstream-modified-files.patch @@ -0,0 +1,148 @@ +diff -Naur texlive-20180414-source.org/texlive-20180414-source/build-aux/config.guess texlive-20180414-source.sw/texlive-20180414-source/build-aux/config.guess +--- texlive-20180414-source.org/texlive-20180414-source/build-aux/config.guess 2022-12-19 10:59:52.450000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/build-aux/config.guess 2022-12-19 11:02:52.760000000 +0800 +@@ -904,6 +904,14 @@ + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ echo "$UNAME_MACHINE"-sunway-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur texlive-20180414-source.org/texlive-20180414-source/build-aux/config.sub texlive-20180414-source.sw/texlive-20180414-source/build-aux/config.sub +--- texlive-20180414-source.org/texlive-20180414-source/build-aux/config.sub 2022-12-19 10:59:52.450000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/build-aux/config.sub 2022-12-19 11:01:01.170000000 +0800 +@@ -244,6 +244,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -368,6 +369,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur texlive-20180414-source.org/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.guess texlive-20180414-source.sw/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.guess +--- texlive-20180414-source.org/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.guess 2022-12-19 10:59:53.840000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.guess 2022-12-19 11:02:35.830000000 +0800 +@@ -904,6 +904,14 @@ + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ echo "$UNAME_MACHINE"-sunway-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur texlive-20180414-source.org/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.sub texlive-20180414-source.sw/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.sub +--- texlive-20180414-source.org/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.sub 2022-12-19 10:59:53.840000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/libs/freetype2/freetype-src/builds/unix/config.sub 2022-12-19 11:01:33.460000000 +0800 +@@ -244,6 +244,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -368,6 +369,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur texlive-20180414-source.org/texlive-20180414-source/libs/icu/icu-src/source/config.guess texlive-20180414-source.sw/texlive-20180414-source/libs/icu/icu-src/source/config.guess +--- texlive-20180414-source.org/texlive-20180414-source/libs/icu/icu-src/source/config.guess 2022-12-19 10:59:52.690000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/libs/icu/icu-src/source/config.guess 2022-12-19 11:02:26.300000000 +0800 +@@ -904,6 +904,14 @@ + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ echo "$UNAME_MACHINE"-sunway-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur texlive-20180414-source.org/texlive-20180414-source/libs/icu/icu-src/source/config.sub texlive-20180414-source.sw/texlive-20180414-source/libs/icu/icu-src/source/config.sub +--- texlive-20180414-source.org/texlive-20180414-source/libs/icu/icu-src/source/config.sub 2022-12-19 10:59:52.690000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/libs/icu/icu-src/source/config.sub 2022-12-19 11:01:50.300000000 +0800 +@@ -244,6 +244,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -368,6 +369,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur texlive-20180414-source.org/texlive-20180414-source/utils/asymptote/config.guess texlive-20180414-source.sw/texlive-20180414-source/utils/asymptote/config.guess +--- texlive-20180414-source.org/texlive-20180414-source/utils/asymptote/config.guess 2022-12-19 10:59:55.650000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/utils/asymptote/config.guess 2022-12-19 11:02:42.620000000 +0800 +@@ -904,6 +904,14 @@ + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ echo "$UNAME_MACHINE"-sunway-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur texlive-20180414-source.org/texlive-20180414-source/utils/asymptote/config.sub texlive-20180414-source.sw/texlive-20180414-source/utils/asymptote/config.sub +--- texlive-20180414-source.org/texlive-20180414-source/utils/asymptote/config.sub 2022-12-19 10:59:55.670000000 +0800 ++++ texlive-20180414-source.sw/texlive-20180414-source/utils/asymptote/config.sub 2022-12-19 11:01:19.180000000 +0800 +@@ -244,6 +244,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -368,6 +369,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ diff --git a/texlive-base.spec b/texlive-base.spec index d76b9dafc45ee18ec39205916cd16ce725868789..dd798c0d1bfd2f5286ba7ef2c4a2530a0e741fed 100644 --- a/texlive-base.spec +++ b/texlive-base.spec @@ -4,7 +4,7 @@ Name: texlive-base Version: 20180414 -Release: 34 +Release: 36 Epoch: 7 Summary: TeX formatting system License: ASL 2.0 and LGPL-2.1-only and Zlib and OFL-1.1 and Public Domain and LGPL-2.0-only and GPLv2+ and MPL-1.1 and Libpng and LGPL-3.0-only and BSL-1.0 and GPLv2 and GPLv3 and CPL-1.0 and IJG and MIT and LPPL-1.3c and ICU and psutils @@ -381,6 +381,7 @@ Patch0006: texlive-base-CVE-2018-17407.patch Patch0007: fix-build-error-when-srctopdf-is-ok.patch Patch0008: remove-support-of-poppler.patch Patch0009: CVE-2023-32700.patch +Patch1000: 1000-add-sw_64-support-not-upstream-modified-files.patch BuildRequires: xz libXaw-devel libXi-devel ncurses-devel bison flex file perl(Digest::MD5) texinfo gcc-c++ BuildRequires: gd-devel freetype-devel libpng-devel zlib-devel @@ -5841,6 +5842,11 @@ LaTeX file remains on the archive.) %prep %autosetup -c -n texlive-20180414-source -p1 +%ifarch sw_64 +sed -i 's/check-TESTS//g' texlive-20180414-source/texk/ps2pk/Makefile.in +sed -i 's/check-TESTS//g' texlive-20180414-source/texk/web2c/Makefile.in +sed -i 's/check-TESTS//g' texlive-20180414-source/utils/m-tx/Makefile.in +%endif [ -e texlive-20180414-source ] && mv texlive-20180414-source source for l in `unxz -c %{SOURCE3} | tar t`; do @@ -5852,6 +5858,14 @@ done %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Werror=format-security -fcommon" export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11 -fno-strict-aliasing -Werror=format-security -fcommon" +%ifarch loongarch64 +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fcommon" +export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11 -fno-strict-aliasing -fcommon" +%endif +%ifarch sw_64 +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fcommon" +export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11 -fno-strict-aliasing -fcommon" +%endif export LDFLAGS="%{build_ldflags}" cd source PREF=`pwd`/inst @@ -5867,7 +5881,7 @@ cd work --enable-shared --enable-compiler-warnings=max --without-cxx-runtime-hack \ --disable-native-texlive-build --disable-t1utils --disable-psutils --disable-biber --disable-ptexenc --disable-largefile \ --disable-xindy --disable-xindy-docs --disable-xindy-make-rules \ -%ifarch aarch64 +%ifarch aarch64 loongarch64 sw_64 --disable-luajittex --disable-mfluajit \ %endif --disable-rpath @@ -7078,7 +7092,7 @@ done <<< "$list" %{_includedir}/synctex/ %{_includedir}/texlua52/ %{_includedir}/texlua53/ -%ifnarch aarch64 +%ifnarch aarch64 loongarch64 sw_64 %{_includedir}/texluajit/ %endif %{_libdir}/*.so @@ -7147,7 +7161,7 @@ done <<< "$list" %files -n texlive-luatex %license gpl2.txt %{_bindir}/dviluatex -%ifnarch aarch64 +%ifnarch aarch64 loongarch64 sw_64 %{_bindir}/luajittex %{_bindir}/texluajit %{_bindir}/texluajitc @@ -7254,7 +7268,7 @@ done <<< "$list" %license gpl2.txt %{_bindir}/mflua %{_bindir}/mflua-nowin -%ifnarch aarch64 +%ifnarch aarch64 loongarch64 sw_64 %{_bindir}/mfluajit %{_bindir}/mfluajit-nowin %endif @@ -8109,9 +8123,15 @@ done <<< "$list" %doc %{_datadir}/texlive/texmf-dist/doc/latex/yplan/ %changelog -* Mon Jul 03 2023 yaoxin - 7:20180414-34 +* Fri Aug 11 2023 yeqinglong - 7:20180414-36 +- add sw_64 support + +* Mon Jul 03 2023 yaoxin - 7:20180414-35 - Fix CVE-2023-32700 +* Mon Feb 6 2023 Wenlong Zhang - 7:20180414-34 +- fix build error for loongarch64 + * Wed Jan 19 2022 xu_ping - 20180414-33 - remove useless BuildRequires poppler