From d803c5aaabb0694eb346137ac6a12ddc9091b176 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 21 Dec 2020 11:27:31 +0900 Subject: [PATCH 01/40] Enable python3 binding --- pythontest | 57 +++++++++++++++++++++++++++++++++++++++++++++++ skf-basic-test.sh | 19 ++++++++++++---- skf.spec | 25 +++++++++++++++------ 3 files changed, 90 insertions(+), 11 deletions(-) create mode 100644 pythontest diff --git a/pythontest b/pythontest new file mode 100644 index 0000000..722e6d3 --- /dev/null +++ b/pythontest @@ -0,0 +1,57 @@ +#!/usr/bin/python3 - +import skf +# euc-jp binary string +strobj=b'\xa5\xc6\xa5\xb9\xa5\xc8' +# convert binary to binarray +resbin1=skf.convert("-s",strobj) +print (resbin1) +# convert binarray to binarray +resbin2=skf.convert("-s",resbin1) +print (resbin2) +# convert binary to utf8 +# after PEP 393, the following line convert to UCS1 string +resobj2=skf.convert("-z",strobj) +print (resobj2) +# forced to binarray +resbin3=skf.convert("-z --py-out-binary",strobj) +print (resbin3) +# convert binary to utf16 +resobj3=skf.convert("-q ",strobj) +print (resobj3) +# forced to binarray +resbin4=skf.convert("-q --py-out-binary",strobj) +print (resbin4) +# switch back from utf16 to binarray +resobj4=skf.convert("-s",resobj3) +print (resobj4) +resobj5=skf.convert("-e",resobj3) +print (resobj5) +#utf-8 binary to back to sjis +resobj6=skf.convert("-s",resobj2) +print (resobj6) +# utf32, 16 endian variants +resobja=skf.convert("--oc=utf32be",resobj4) +print (resobja) +resobj7=skf.convert("--oc=utf16be",resobj4) +print (resobj7) +resobj8=skf.convert("--oc=utf16le",resobj4) +print (resobj8) +resobj9=skf.convert("--oc=utf32le",resobj4) +print (resobj9) +# code detect result +resguess=skf.convert("--inquiry",strobj) +print (resguess) +resguess=skf.convert("--inquiry",resobj3) +print (resguess) +nbmpobj=b'020010:\xf0\xa0\x80\x93\x20' +print (nbmpobj) +nbmpres0=skf.convert("--oc=utf16be -Z",nbmpobj) +print (nbmpres0) +nbmpres1=skf.convert("--oc=utf-7 ",strobj) +print (nbmpres1) +nbmpres2=skf.convert("--oc=utf16be -Z --encode=mimeb",nbmpobj) +print (nbmpres2) +nbmpres3=skf.convert("--oc=utf16be -Z --encode=ace",strobj) +print (nbmpres3) +nbmpres4=skf.convert("--oc=jis --encode=mimeb",strobj) +print (nbmpres4) diff --git a/skf-basic-test.sh b/skf-basic-test.sh index fb6c63e..c093c60 100644 --- a/skf-basic-test.sh +++ b/skf-basic-test.sh @@ -4,6 +4,8 @@ set -x a_utf8=$(echo -e '\xe3\x81\x82') a_eucjp=$(echo -e '\xa4\xa2') +# FIXME +a_eucjp_escaped='\xa4\xa2' # Binary echo "Checking Binary" @@ -29,16 +31,25 @@ fi # python3 # skip this for now -if ( which python3 && false ) ; then +if ( which python3 ) ; then # Not check for now echo "Checking python3" export PYTHONPATH=$python3PATH #FIXME #FIXME #The following 3 lines need fixing - a_from_shift_jis=$(python3 -c "import skf ; print (skf.convert('-s', \"$a_eucjp\"))" | iconv -f shift-jis -t utf-8) - a_from_iso=$(python3 -c "import skf ; print (skf.convert('--oc=iso-2022-jp', \"$a_eucjp\"))" | iconv -f iso-2022-jp -t utf-8) - a_from_utf8=$(python3 -c "import skf ; print (skf.convert('-z', \"$a_eucjp\"))") + #a_from_shift_jis=$(python3 -c "import skf ; print (skf.convert('-s', b\"$a_eucjp_escaped\"))" | iconv -f shift-jis -t utf-8) + a_from_shift_jis=$(python3 -c "import skf ; print (skf.convert('-s', b\"$a_eucjp_escaped\"))") + a_from_shift_jis=$(echo "${a_from_shift_jis}" | sed -n -e "s@^.*bytearray(b'\(.*\)')@\1@p") + a_from_shift_jis=$(echo -e $a_from_shift_jis | iconv -f shift-jis -t utf-8) + + a_from_iso=$(python3 -c "import skf ; print (skf.convert('--oc=iso-2022-jp', b\"$a_eucjp_escaped\"))") + a_from_iso=$(echo "${a_from_iso}" | sed -n -e "s@^.*bytearray(b'\(.*\)')@\1@p") + a_from_iso=$(echo -e $a_from_iso | iconv -f iso-2022-jp -t utf-8) + + a_from_utf8=$(python3 -c "import skf ; print (skf.convert('-z', b\"$a_eucjp_escaped\"))") + a_from_utf8=$(echo "${a_from_utf8}" | sed -n -e "s@^.*bytearray(b'\(.*\)')@\1@p") + a_from_utf8=$(echo -e $a_from_utf8) if [ "$a_from_shift_jis" != "$a_utf8" ] ; then exit 1 ; fi if [ "$a_from_iso" != "$a_utf8" ] ; then exit 1 ; fi diff --git a/skf.spec b/skf.spec index d52df3d..3f60739 100644 --- a/skf.spec +++ b/skf.spec @@ -13,13 +13,12 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global fedoraver 1 +%global fedoraver 2 -%global enable_python3 0 %if 0%{?fedora} >= 13 # Disable python3 support for now, how to handle NON-utf8 string # in python3 with skf... -%global enable_python3 0 +%global enable_python3 1 %endif %undefine _changelog_trimtime @@ -34,6 +33,8 @@ URL: http://osdn.jp/projects/skf Source0: http://dl.osdn.jp/skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh +# https://osdn.net/projects/skf/ticket/39882 +Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest # Reported: https://osdn.net/projects/skf/ticket/41024 Patch1: skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch @@ -87,7 +88,7 @@ Summary: Python extension module for %{name} Requires: %{name}-common = %{version}-%{release} %if %enable_python3 -%package python3 +%package -n python3-skf Summary: Python3 extension module for %{name} Requires: %{name}-common = %{version}-%{release} %endif @@ -128,7 +129,7 @@ This package contains Ruby extension module for skf. This package contains Python extension module for skf. %if %enable_python3 -%description python3 +%description -n python3-skf This package contains Python3 extension module for skf. %endif @@ -346,7 +347,13 @@ export RUBYLIB=%{buildroot}%{ruby_vendorarchdir} export CHECK_PYTHON2=no # SOURCE1 -sh skf-basic-test.sh +sh %{SOURCE1} +%if %enable_python3 +( + export PYTHONPATH=${python3PATH} + python3 %{SOURCE11} +) +%endif %files %defattr(-,root,root,-) @@ -371,10 +378,11 @@ sh skf-basic-test.sh %{ruby_vendorarchdir}/skf.so %if %enable_python3 -%files python3 +%files -n python3-skf %defattr(-,root,root,-) %{python3_sitearch}/_skf.so %{python3_sitearch}/skf.py* +%{python3_sitearch}/__pycache__/skf.* %endif %files perl @@ -383,6 +391,9 @@ sh skf-basic-test.sh %{perl_vendorarch}/auto/skf/ %changelog +* Mon Dec 21 2020 Mamoru TASAKA - 2.10.14-2 +- Enable python3 binding + * Fri Dec 4 2020 Mamoru TASAKA - 2.10.14-1 - 2.10.14 From de8dbbb1f77e8902b3b974d42051342d3d9463b1 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 7 Jan 2021 15:54:57 +0900 Subject: [PATCH 02/40] F-34: build for ruby 3.0 Some fix to support ruby 3.0 --- ...002-skf_convert.i-avoid-invalid-free.patch | 11 +++++++++++ skf.spec | 19 ++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch diff --git a/skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch b/skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch new file mode 100644 index 0000000..782d9aa --- /dev/null +++ b/skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch @@ -0,0 +1,11 @@ +--- skf-2.10.14/skf_convert.i.rubyext2 2021-01-07 15:25:06.355026083 +0900 ++++ skf-2.10.14/skf_convert.i 2021-01-07 15:41:00.722769702 +0900 +@@ -1318,7 +1318,7 @@ static void r_skf_convert(struct Skf_loc + #endif + }; + +- if (lwlstr->sstr != NULL) free(lwlstr->sstr); ++ /* if (lwlstr->sstr != NULL) free(lwlstr->sstr); */ + if (lwlstr != NULL) free(lwlstr); + #if defined(SKF_RUBY19) || defined(SKF_RUBY2) + if (cstr != NULL) free(cstr); diff --git a/skf.spec b/skf.spec index 3f60739..0396005 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global fedoraver 2 +%global fedoraver 3 %if 0%{?fedora} >= 13 # Disable python3 support for now, how to handle NON-utf8 string @@ -37,6 +37,8 @@ Source2: create-skf-tarball-from-scm.sh Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest # Reported: https://osdn.net/projects/skf/ticket/41024 Patch1: skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch +# Need investigation +Patch2: skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch # common BR BuildRequires: gcc @@ -144,6 +146,7 @@ cp -p %SOURCE1 . pushd main %patch1 -p1 -b .rubyext +%patch2 -p1 -b .rubyext2 %if 0%{?usescm} >= 1 autoconf @@ -156,11 +159,13 @@ find . -type d -name CVS | sort -r | xargs rm -rf ## Fixing build error # Fix pythonext build error on F-14+ -%if 0%{?fedora} >= 26 sed -i -e '/python_version=.*substr/s|)-2|)-3|' configure -%else -sed -i -e '/python_version=.*substr/s|7,-3|7,3|' configure -%endif + +# Fix for ruby 3 +sed -i.ruby3 skf_convert.i \ + -e 's@ defined(SKF_RUBY2)@ defined(SKF_RUBY2) || defined(SKF_RUBY3)@' \ + -e 's@ !defined(SKF_RUBY2)@ !defined(SKF_RUBY2) \&\& !defined(SKF_RUBY3)@' \ + %{nil} ## configure option, etc # change optflags, don't strip @@ -391,6 +396,10 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Thu Jan 7 2021 Mamoru TASAKA - 2.10.14-3 +- F-34: build for ruby 3.0 +- Some fix to support ruby 3.0 + * Mon Dec 21 2020 Mamoru TASAKA - 2.10.14-2 - Enable python3 binding From afe254a8be778f0544fb2937b25625cdf5194066 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 20:32:59 +0000 Subject: [PATCH 03/40] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 0396005..b873ea0 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -396,6 +396,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 2.10.14-3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Jan 7 2021 Mamoru TASAKA - 2.10.14-3 - F-34: build for ruby 3.0 - Some fix to support ruby 3.0 From 077415eb1aa91853066171623b811d38b07bde87 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 21 May 2021 12:31:20 +0200 Subject: [PATCH 04/40] Perl 5.34 rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index b873ea0..d02f555 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -396,6 +396,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri May 21 2021 Jitka Plesnikova - 2.10.14-3.2 +- Perl 5.34 rebuild + * Wed Jan 27 2021 Fedora Release Engineering - 2.10.14-3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From df1aa1abb18c38eb119047f43ed55c748f4a9e26 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 21:14:59 +0200 Subject: [PATCH 05/40] Rebuilt for Python 3.10 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index d02f555..2e871dc 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.3 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -396,6 +396,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jun 04 2021 Python Maint - 2.10.14-3.3 +- Rebuilt for Python 3.10 + * Fri May 21 2021 Jitka Plesnikova - 2.10.14-3.2 - Perl 5.34 rebuild From 98eae27f7dabac29a348603ad47d90c687b9a7b2 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 21 Jun 2021 19:11:39 +0900 Subject: [PATCH 06/40] BR: glibc-all-langpacks for iconv for Japanese locale --- skf.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/skf.spec b/skf.spec index 2e871dc..bed1ddb 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global fedoraver 3 +%global fedoraver 4 %if 0%{?fedora} >= 13 # Disable python3 support for now, how to handle NON-utf8 string @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.3 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -44,6 +44,8 @@ Patch2: skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch BuildRequires: gcc BuildRequires: make BuildRequires: gettext +# For iconv for Japanese locale +BuildRequires: glibc-all-langpacks # BR for extenstions BuildRequires: swig BuildRequires: ruby-devel @@ -396,6 +398,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Sun Jun 21 2021 Mamoru TASAKA - 2.10.14-4 +- BR: glibc-all-langpacks for iconv for Japanese locale + * Fri Jun 04 2021 Python Maint - 2.10.14-3.3 - Rebuilt for Python 3.10 From 53eba74acfd34d287c6fb87426faa39d0faa9946 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 17:43:51 +0000 Subject: [PATCH 07/40] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index bed1ddb..c21207b 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -398,6 +398,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2.10.14-4.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Sun Jun 21 2021 Mamoru TASAKA - 2.10.14-4 - BR: glibc-all-langpacks for iconv for Japanese locale From 325b9920641fc34fcae2545cf254584da8bfa639 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 01:04:27 +0000 Subject: [PATCH 08/40] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index c21207b..8e9e958 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -398,6 +398,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 2.10.14-4.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 2.10.14-4.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 440f12583269b9f2e1466c1dd26284fa681758c3 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 27 Jan 2022 14:41:33 +0900 Subject: [PATCH 09/40] F-36: rebuild against ruby31 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 8e9e958..f456edf 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.3 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -398,6 +398,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Thu Jan 27 2022 Mamoru TASAKA - 2.10.14-4.3 +- F-36: rebuild against ruby31 + * Sat Jan 22 2022 Fedora Release Engineering - 2.10.14-4.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From b7856cbb38a09b7be08b89abe1ec1990a6b6d3fb Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 30 May 2022 20:16:28 +0200 Subject: [PATCH 10/40] Perl 5.36 rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index f456edf..1cf62d2 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.3 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.4 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -398,6 +398,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Mon May 30 2022 Jitka Plesnikova - 2.10.14-4.4 +- Perl 5.36 rebuild + * Thu Jan 27 2022 Mamoru TASAKA - 2.10.14-4.3 - F-36: rebuild against ruby31 From 250e6d482ae7fadfc1c076b9aeaea8aa9acaa044 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 15:24:11 +0200 Subject: [PATCH 11/40] Rebuilt for Python 3.11 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 1cf62d2..a4f4777 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.4 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.5 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -398,6 +398,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Mon Jun 13 2022 Python Maint - 2.10.14-4.5 +- Rebuilt for Python 3.11 + * Mon May 30 2022 Jitka Plesnikova - 2.10.14-4.4 - Perl 5.36 rebuild From eedfa515503fff1c125cee3c68c3bfa78975654b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 08:47:23 +0000 Subject: [PATCH 12/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index a4f4777..c953f76 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.5 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.6 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -398,6 +398,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 2.10.14-4.6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 2.10.14-4.5 - Rebuilt for Python 3.11 From 7f624b3ac3707d03e796af6bef71901a937af2aa Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 18 Nov 2022 00:18:41 +0900 Subject: [PATCH 13/40] 2.10.15 --- .gitignore | 40 +------------ ...vert.i-avoid-double-free-for-rubyext.patch | 60 ------------------- ...002-skf_convert.i-avoid-invalid-free.patch | 11 ---- skf.spec | 52 ++++++---------- sources | 2 +- 5 files changed, 20 insertions(+), 145 deletions(-) delete mode 100644 skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch delete mode 100644 skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch diff --git a/.gitignore b/.gitignore index 3ee82b2..3b713ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1 @@ -skf_1.97.1.tar.gz -skf_1.97.2.tar.gz -/skf_1.97.3.tar.gz -/skf_1.97.4.tar.gz -/skf_1.99a1g.tar.gz -/skf_1.99.0.tar.gz -/skf_1.99.1.tar.gz -/skf_1.99.2-cvs20130327T1317.tar.gz -/skf_1.99.3.tar.gz -/skf_1.99.4.tar.gz -/skf_1.99.5.tar.gz -/skf_1.99.6.tar.gz -/skf_1.99.7.tar.gz -/skf_1.99.8.tar.gz -/skf_1.99.9.tar.gz -/skf_1.99.10.tar.gz -/skf-2.00b0-0.tar.gz -/skf_2.00b1-0.tar.gz -/skf_2.00b2a-1.tar.gz -/skf_2.00b2a-2.tar.gz -/skf_2.00.tar.gz -/skf_2.00.1.tar.gz -/skf_2.00.2.tar.xz -/skf_2.00.3.tar.xz -/skf_2.00.4.tar.xz -/skf_2.00.6.tar.xz -/skf_2.10-rc1.tar.xz -/skf_2.10.tar.xz -/skf_2.10.1.tar.xz -/skf_2.10.2.tar.xz -/skf_2.10.4.tar.xz -/skf_2.10.5.tar.xz -/skf_2.10.7.1.tar.xz -/skf_2.10.8.2.tar.xz -/skf_2.10.9.tar.xz -/skf_2.10.10.tar.xz -/skf_2.10.11.tar.xz -/skf_2.10.12.tar.xz -/skf_2.10.14.tar.xz +/skf_*.tar.xz diff --git a/skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch b/skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch deleted file mode 100644 index 5803fad..0000000 --- a/skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 475b315a7a3bf140dccabd0a2ce6b77d3d3b0125 Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -Date: Fri, 4 Dec 2020 13:56:53 +0900 -Subject: [PATCH] skf_convert.i: avoid double free for rubyext - -With skf-2.10.14 and ruby 2.7.2p137, the following simple code: -`ruby -I. -e 'require "skf" ; Skf.convert("-s", [164, 162].pack("C*"))'` -causes double free, which does not occur on skf-2.10.12. - -With skf-2.10.14, in *convert(@SKFCSTRINGS@ *optstr, @SKFSTRINGS@ *cstr), -the local value lwlstr is changed to be cleaned up by free() when returning -from the function. -On the other hand, with rubyext the input argument cstr is to be free'ed() -in the same function (as same as in 2.10.12). But as with rubyext lwlstr points -to cstr, this causes double free. Note that with perl or python extension, -lwlstr is newly generated (allocated) using the original cstr. - -To avoid double free and to make rubyext behavior consistent with other -extensions, lwlstr in convert() (and quickconvert, guess) must be newly allocated. ---- - skf_convert.i | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/skf_convert.i b/skf_convert.i -index 113e845..1ff2522 100644 ---- skf-2.10.14-a/skf_convert.i -+++ skf-2.10.14-b/skf_convert.i -@@ -1224,7 +1224,8 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen, - skf_script_init(); swig_state = 1; - - #if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2)) -- lwlstr = cstr; -+ lwlstr = malloc(sizeof *lwlstr); -+ memcpy(lwlstr, cstr, sizeof *lwlstr); - ibuflen = get_rstr_len(cstr); - #elif defined(SWIGPYTHON) - lwlstr = skf_pystring2skfstring(cstr,1); -@@ -1349,7 +1350,8 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen, - debug_opt = 0; - - #if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2)) -- lwlstr = cstr; -+ lwlstr = malloc(sizeof *lwlstr); -+ memcpy(lwlstr, cstr, sizeof *lwlstr); - ibuflen = get_rstr_len(cstr); - #elif defined(SWIGPYTHON) && defined(SKF_PYTHON3) - lwlstr = skf_pystring2skfstring(cstr,1); -@@ -1452,7 +1454,8 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen, - in_saved_codeset = -1; - - #if defined(SKF_RUBY19) || defined(SKF_RUBY2) -- lwlstr = cstr; -+ lwlstr = malloc(sizeof *lwlstr); -+ memcpy(lwlstr, cstr, sizeof *lwlstr); - ibuflen = get_rstr_len(cstr); - #elif defined(SWIGPYTHON) && defined(SKF_PYTHON3) - lwlstr = skf_pystring2skfstring(cstr,1); --- -2.28.0 - diff --git a/skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch b/skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch deleted file mode 100644 index 782d9aa..0000000 --- a/skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- skf-2.10.14/skf_convert.i.rubyext2 2021-01-07 15:25:06.355026083 +0900 -+++ skf-2.10.14/skf_convert.i 2021-01-07 15:41:00.722769702 +0900 -@@ -1318,7 +1318,7 @@ static void r_skf_convert(struct Skf_loc - #endif - }; - -- if (lwlstr->sstr != NULL) free(lwlstr->sstr); -+ /* if (lwlstr->sstr != NULL) free(lwlstr->sstr); */ - if (lwlstr != NULL) free(lwlstr); - #if defined(SKF_RUBY19) || defined(SKF_RUBY2) - if (cstr != NULL) free(cstr); diff --git a/skf.spec b/skf.spec index c953f76..d41ae84 100644 --- a/skf.spec +++ b/skf.spec @@ -5,15 +5,15 @@ #%%define usescm 1 %undefine usescm -%global repoid 73963 +%global repoid 78000 -%global mainver 2.10.14 +%global mainver 2.10.15 %global prever 2.10.10 #%%define betaver -rc1 %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global fedoraver 4 +%global fedoraver 1 %if 0%{?fedora} >= 13 # Disable python3 support for now, how to handle NON-utf8 string @@ -25,12 +25,12 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.6 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD URL: http://osdn.jp/projects/skf -Source0: http://dl.osdn.jp/skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz +Source0: https://ja.osdn.net/frs/redir.php?f=skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh # https://osdn.net/projects/skf/ticket/39882 @@ -78,19 +78,6 @@ Requires: ruby(abi) = %{rubyabi} %endif Provides: ruby(skf) = %{version}-%{release} -%if 0%{?fedora} >= 27 -%package -n python2-skf -%{?python_provide:%python_provide python2-skf} -# Remove before F30 -Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} -%else -%package python -%endif -Summary: Python extension module for %{name} -Requires: %{name}-common = %{version}-%{release} - %if %enable_python3 %package -n python3-skf Summary: Python3 extension module for %{name} @@ -125,13 +112,6 @@ packages. %description ruby This package contains Ruby extension module for skf. -%if 0%{?fedora} >= 27 -%description -n python2-skf -%else -%description python -%endif -This package contains Python extension module for skf. - %if %enable_python3 %description -n python3-skf This package contains Python3 extension module for skf. @@ -147,8 +127,6 @@ ln -sf %{name}-* main cp -p %SOURCE1 . pushd main -%patch1 -p1 -b .rubyext -%patch2 -p1 -b .rubyext2 %if 0%{?usescm} >= 1 autoconf @@ -164,10 +142,10 @@ find . -type d -name CVS | sort -r | xargs rm -rf sed -i -e '/python_version=.*substr/s|)-2|)-3|' configure # Fix for ruby 3 -sed -i.ruby3 skf_convert.i \ - -e 's@ defined(SKF_RUBY2)@ defined(SKF_RUBY2) || defined(SKF_RUBY3)@' \ - -e 's@ !defined(SKF_RUBY2)@ !defined(SKF_RUBY2) \&\& !defined(SKF_RUBY3)@' \ - %{nil} +sed -i.ruby3 skf_convert.h \ + -e 's@^#if defined.SKF_RUBY3.*$@#if 0@' +sed -i configure.ac configure \ + -e '\@^[ \t][ \t]*ruby_19_preferred="yes"@i ruby_21_preferred="yes";@' ## configure option, etc # change optflags, don't strip @@ -213,6 +191,9 @@ PYTHONOPTS="$OPTS --enable-python2 --with-python_sitearch_dir=%{python2_sitearch PYTHON3OPTS="$OPTS --enable-python3 --with-python_sitearch_dir=%{python3_sitearch}" %endif +# Workaround for ruby 3 +export RUBY=ruby + # A. main pushd main %configure $OPTS @@ -371,9 +352,9 @@ sh %{SOURCE1} %files common -f %{name}.lang %defattr(-,root,root,-) -%lang(ja) %doc main/CHANGES_ja.txt +%lang(ja) %doc main/debian/changelog %doc main/README.txt -%doc main/copyright +%license main/copyright %if 0%{?usescm} < 1 %lang(ja) %doc main/doc/ %endif @@ -398,6 +379,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Thu Nov 17 2022 Mamoru TASAKA - 2.10.15-1 +- 2.10.15 + * Sat Jul 23 2022 Fedora Release Engineering - 2.10.14-4.6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild @@ -416,7 +400,7 @@ sh %{SOURCE1} * Fri Jul 23 2021 Fedora Release Engineering - 2.10.14-4.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -* Sun Jun 21 2021 Mamoru TASAKA - 2.10.14-4 +* Mon Jun 21 2021 Mamoru TASAKA - 2.10.14-4 - BR: glibc-all-langpacks for iconv for Japanese locale * Fri Jun 04 2021 Python Maint - 2.10.14-3.3 diff --git a/sources b/sources index 5181553..077155c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (skf_2.10.14.tar.xz) = 52fa539d76ba3624b08e2c723c74298be94b6b5c962acfb39326d47013c73b8331ebdd374da0a1a2c3b961268dde3b5a1a1715359abb3e7a8a4b7df64d855658 +SHA512 (skf_2.10.15.tar.xz) = 6987872617e8babac3a55533741777ebdc2c862162601be21864fe55362376c80b26fe7715365fa64ca617c2a41d9a9ccedb71e1ddc1b4024f20c1c42bbf95cf From a06758af7a7b7cc127a97ad6f9aff3183f41e3e0 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 18 Nov 2022 00:25:58 +0900 Subject: [PATCH 14/40] remove unreferenced patch --- skf.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/skf.spec b/skf.spec index d41ae84..c44940b 100644 --- a/skf.spec +++ b/skf.spec @@ -35,10 +35,6 @@ Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh # https://osdn.net/projects/skf/ticket/39882 Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest -# Reported: https://osdn.net/projects/skf/ticket/41024 -Patch1: skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch -# Need investigation -Patch2: skf-2.10.14-0002-skf_convert.i-avoid-invalid-free.patch # common BR BuildRequires: gcc From c28a6a38c23e3ce560c9cdb410669bb2eb1036c6 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 2 Jan 2023 15:32:16 +0900 Subject: [PATCH 15/40] Proposal patch for supporting PEP623 in python3.12 --- skf-2.10.15-python-pep623.patch | 66 +++++++++++++++++++++++++++++++++ skf.spec | 12 +++++- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 skf-2.10.15-python-pep623.patch diff --git a/skf-2.10.15-python-pep623.patch b/skf-2.10.15-python-pep623.patch new file mode 100644 index 0000000..84dd95e --- /dev/null +++ b/skf-2.10.15-python-pep623.patch @@ -0,0 +1,66 @@ +Only in python3: autom4te.cache +diff -urp '--exclude=*~' '--exclude=config.*' '--exclude=configure' '--exclude=Makefile' '--exclude=autom4te' python3.orig/configure.ac python3/configure.ac +--- python3.orig/configure.ac 2023-01-02 12:09:13.189241055 +0900 ++++ python3/configure.ac 2023-01-02 12:54:23.110443109 +0900 +@@ -626,6 +626,7 @@ if test "$PYTHON" != "false"; then + dnl DO NOT ASK WHY. I too can't explain. + python_version=`(LANG=C ${PYTHON} --version 2>&1 | ${PERL} -e '$vin=<>;printf "python%s",substr($vin,7,rindex($vin,"\.",20)-7);')` + AC_MSG_RESULT($python_version) ++ python3_minor=`(echo ${python_version} | sed -e 's|python3\.||')` + python_config_bin=${python_version}-config + python_configm_bin=${python_version}m-config + python_configmu_bin=${python_version}mu-config +@@ -650,6 +651,13 @@ if test "$PYTHON" != "false"; then + + dnl python 3.0, 3.1 & 3.2 are obsoleted and not supported + if test "$enable_python3" = "yes";then ++ AC_MSG_CHECKING([whether python3 uses PEP 623]) ++ if test "$python3_minor" -ge 10 ; then ++ AC_MSG_RESULT([yes]) ++ python_define="$python_define -DUSE_PEP623" ++ else ++ AC_MSG_RESULT([yes]) ++ fi + python_define="$python_define -DUSE_PEP393" + fi + +diff -urp '--exclude=*~' '--exclude=config.*' '--exclude=configure' '--exclude=Makefile' '--exclude=autom4te' python3.orig/skf_convert.i python3/skf_convert.i +--- python3.orig/skf_convert.i 2022-11-13 01:58:54.000000000 +0900 ++++ python3/skf_convert.i 2023-01-02 14:05:06.713513508 +0900 +@@ -106,10 +106,16 @@ const char *skf_notstring = "skf: not st + #include "unicodeobject.h" + #include "bytearrayobject.h" + #define Py_SKFSTR PyObject +-#ifdef USE_PEP393 /* after python 3.3 */ ++#if defined (USE_PEP623) /* after python 3.10 */ ++#define skf_PyUnicode_Srctype Py_UCS4 ++#define skf_PyUnicode_GetSize(x) PyUnicode_GET_LENGTH(x) ++#define skf_PyUnicode_AsUnicode(x) PyUnicode_AsUCS4Copy(x) ++#elif defined (USE_PEP393) /* after python 3.3 */ ++#define skf_PyUnicode_Srctype Py_UNICODE + #define skf_PyUnicode_GetSize(x) PyUnicode_GET_LENGTH(x) + #define skf_PyUnicode_AsUnicode(x) PyUnicode_AS_UNICODE(x) + #else /* NOT PEP393 */ ++#define skf_PyUnicode_Srctype Py_UNICODE + #define skf_PyUnicode_GetSize PyUnicode_GETSIZE + #define skf_PyUnicode_AsUnicode PyUnicode_AsUnicode + #endif +@@ -434,7 +440,7 @@ int c; + char *skfstrstrconv(PyObject *robj,size_t len) + { + char *dstr; +- Py_UNICODE *srcstr; ++ skf_PyUnicode_Srctype *srcstr = NULL; + char *bsrcstr; + Py_ssize_t slen; + int i; +@@ -467,6 +473,9 @@ char *skfstrstrconv(PyObject *robj,size_ + if (srcstr[i] >= 0x7f) break; + dstr[i] = srcstr[i]; + }; ++#if defined (USE_PEP623) ++ PyMem_Free(srcstr); ++#endif + } else if (PyByteArray_Check(robj)) { /* if SANE object */ + if ((slen = PyByteArray_Size(robj)) <= 0) { + return(NULL); diff --git a/skf.spec b/skf.spec index c44940b..8c7485e 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global fedoraver 1 +%global fedoraver 2 %if 0%{?fedora} >= 13 # Disable python3 support for now, how to handle NON-utf8 string @@ -35,6 +35,9 @@ Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh # https://osdn.net/projects/skf/ticket/39882 Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest +# https://osdn.net/projects/skf/ticket/46419 +# Support PEP623 (python 3.12) +Patch0: skf-2.10.15-python-pep623.patch # common BR BuildRequires: gcc @@ -55,6 +58,8 @@ BuildRequires: python3-devel %if 0%{?usescm} >= 1 BuildRequires: autoconf %endif +# Patch0 needs autoconf anyway +BuildRequires: autoconf Requires: %{name}-common = %{version}-%{release} Obsoletes: python2-skf < %{prever}.99 @@ -123,6 +128,8 @@ ln -sf %{name}-* main cp -p %SOURCE1 . pushd main +%patch0 -p1 -b .pep639 +autoconf # patch0 needs this %if 0%{?usescm} >= 1 autoconf @@ -375,6 +382,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Mon Jan 2 2023 Mamoru TASAKA - 2.10.15-2 +- Proposal patch for supporting PEP623 in python3.12 + * Thu Nov 17 2022 Mamoru TASAKA - 2.10.15-1 - 2.10.15 From c2a996bbe06bf5bd202bdd4596da853748e0ea92 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 4 Jan 2023 15:38:31 +0900 Subject: [PATCH 16/40] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 8c7485e..f02b19a 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -382,6 +382,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Wed Jan 04 2023 Mamoru TASAKA - 2.10.15-2.1 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 + * Mon Jan 2 2023 Mamoru TASAKA - 2.10.15-2 - Proposal patch for supporting PEP623 in python3.12 From 281bbb4acac6acde211839fc585cadf38da429b1 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 13 Jan 2023 21:14:01 +0100 Subject: [PATCH 17/40] Remove perl(MODULE_COMPAT), it will be replaced by generators --- skf.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/skf.spec b/skf.spec index f02b19a..c6927ad 100644 --- a/skf.spec +++ b/skf.spec @@ -88,7 +88,6 @@ Requires: %{name}-common = %{version}-%{release} %package perl Summary: Perl extension module for %{name} Requires: %{name}-common = %{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description This package contains utility binary files in skf. From 48ad504d396867e97c4bb748d1528328b7d89330 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 03:26:37 +0000 Subject: [PATCH 18/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index c6927ad..33755e8 100644 --- a/skf.spec +++ b/skf.spec @@ -25,7 +25,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -381,6 +381,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 2.10.15-2.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Jan 04 2023 Mamoru TASAKA - 2.10.15-2.1 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 From 1d3024a619295f76573c227fc7b78112fb5777d3 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 27 Jan 2023 16:53:28 +0900 Subject: [PATCH 19/40] 2.10.16 --- skf-2.10.15-python-pep623.patch | 66 --------------------------------- skf.spec | 54 ++++++--------------------- sources | 2 +- 3 files changed, 13 insertions(+), 109 deletions(-) delete mode 100644 skf-2.10.15-python-pep623.patch diff --git a/skf-2.10.15-python-pep623.patch b/skf-2.10.15-python-pep623.patch deleted file mode 100644 index 84dd95e..0000000 --- a/skf-2.10.15-python-pep623.patch +++ /dev/null @@ -1,66 +0,0 @@ -Only in python3: autom4te.cache -diff -urp '--exclude=*~' '--exclude=config.*' '--exclude=configure' '--exclude=Makefile' '--exclude=autom4te' python3.orig/configure.ac python3/configure.ac ---- python3.orig/configure.ac 2023-01-02 12:09:13.189241055 +0900 -+++ python3/configure.ac 2023-01-02 12:54:23.110443109 +0900 -@@ -626,6 +626,7 @@ if test "$PYTHON" != "false"; then - dnl DO NOT ASK WHY. I too can't explain. - python_version=`(LANG=C ${PYTHON} --version 2>&1 | ${PERL} -e '$vin=<>;printf "python%s",substr($vin,7,rindex($vin,"\.",20)-7);')` - AC_MSG_RESULT($python_version) -+ python3_minor=`(echo ${python_version} | sed -e 's|python3\.||')` - python_config_bin=${python_version}-config - python_configm_bin=${python_version}m-config - python_configmu_bin=${python_version}mu-config -@@ -650,6 +651,13 @@ if test "$PYTHON" != "false"; then - - dnl python 3.0, 3.1 & 3.2 are obsoleted and not supported - if test "$enable_python3" = "yes";then -+ AC_MSG_CHECKING([whether python3 uses PEP 623]) -+ if test "$python3_minor" -ge 10 ; then -+ AC_MSG_RESULT([yes]) -+ python_define="$python_define -DUSE_PEP623" -+ else -+ AC_MSG_RESULT([yes]) -+ fi - python_define="$python_define -DUSE_PEP393" - fi - -diff -urp '--exclude=*~' '--exclude=config.*' '--exclude=configure' '--exclude=Makefile' '--exclude=autom4te' python3.orig/skf_convert.i python3/skf_convert.i ---- python3.orig/skf_convert.i 2022-11-13 01:58:54.000000000 +0900 -+++ python3/skf_convert.i 2023-01-02 14:05:06.713513508 +0900 -@@ -106,10 +106,16 @@ const char *skf_notstring = "skf: not st - #include "unicodeobject.h" - #include "bytearrayobject.h" - #define Py_SKFSTR PyObject --#ifdef USE_PEP393 /* after python 3.3 */ -+#if defined (USE_PEP623) /* after python 3.10 */ -+#define skf_PyUnicode_Srctype Py_UCS4 -+#define skf_PyUnicode_GetSize(x) PyUnicode_GET_LENGTH(x) -+#define skf_PyUnicode_AsUnicode(x) PyUnicode_AsUCS4Copy(x) -+#elif defined (USE_PEP393) /* after python 3.3 */ -+#define skf_PyUnicode_Srctype Py_UNICODE - #define skf_PyUnicode_GetSize(x) PyUnicode_GET_LENGTH(x) - #define skf_PyUnicode_AsUnicode(x) PyUnicode_AS_UNICODE(x) - #else /* NOT PEP393 */ -+#define skf_PyUnicode_Srctype Py_UNICODE - #define skf_PyUnicode_GetSize PyUnicode_GETSIZE - #define skf_PyUnicode_AsUnicode PyUnicode_AsUnicode - #endif -@@ -434,7 +440,7 @@ int c; - char *skfstrstrconv(PyObject *robj,size_t len) - { - char *dstr; -- Py_UNICODE *srcstr; -+ skf_PyUnicode_Srctype *srcstr = NULL; - char *bsrcstr; - Py_ssize_t slen; - int i; -@@ -467,6 +473,9 @@ char *skfstrstrconv(PyObject *robj,size_ - if (srcstr[i] >= 0x7f) break; - dstr[i] = srcstr[i]; - }; -+#if defined (USE_PEP623) -+ PyMem_Free(srcstr); -+#endif - } else if (PyByteArray_Check(robj)) { /* if SANE object */ - if ((slen = PyByteArray_Size(robj)) <= 0) { - return(NULL); diff --git a/skf.spec b/skf.spec index 33755e8..172dfa6 100644 --- a/skf.spec +++ b/skf.spec @@ -5,27 +5,21 @@ #%%define usescm 1 %undefine usescm -%global repoid 78000 +%global repoid 78199 -%global mainver 2.10.15 +%global mainver 2.10.16 %global prever 2.10.10 #%%define betaver -rc1 %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global fedoraver 2 - -%if 0%{?fedora} >= 13 -# Disable python3 support for now, how to handle NON-utf8 string -# in python3 with skf... -%global enable_python3 1 -%endif +%global fedoraver 1 %undefine _changelog_trimtime Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -35,9 +29,6 @@ Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh # https://osdn.net/projects/skf/ticket/39882 Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest -# https://osdn.net/projects/skf/ticket/46419 -# Support PEP623 (python 3.12) -Patch0: skf-2.10.15-python-pep623.patch # common BR BuildRequires: gcc @@ -52,9 +43,7 @@ BuildRequires: rubygems-devel BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl(ExtUtils::Embed) -%if %enable_python3 BuildRequires: python3-devel -%endif %if 0%{?usescm} >= 1 BuildRequires: autoconf %endif @@ -79,11 +68,9 @@ Requires: ruby(abi) = %{rubyabi} %endif Provides: ruby(skf) = %{version}-%{release} -%if %enable_python3 %package -n python3-skf Summary: Python3 extension module for %{name} Requires: %{name}-common = %{version}-%{release} -%endif %package perl Summary: Perl extension module for %{name} @@ -112,10 +99,8 @@ packages. %description ruby This package contains Ruby extension module for skf. -%if %enable_python3 %description -n python3-skf This package contains Python3 extension module for skf. -%endif %description perl This package contains Perl extension module for skf. @@ -127,8 +112,6 @@ ln -sf %{name}-* main cp -p %SOURCE1 . pushd main -%patch0 -p1 -b .pep639 -autoconf # patch0 needs this %if 0%{?usescm} >= 1 autoconf @@ -147,7 +130,9 @@ sed -i -e '/python_version=.*substr/s|)-2|)-3|' configure sed -i.ruby3 skf_convert.h \ -e 's@^#if defined.SKF_RUBY3.*$@#if 0@' sed -i configure.ac configure \ - -e '\@^[ \t][ \t]*ruby_19_preferred="yes"@i ruby_21_preferred="yes";@' + -e '\@^[ \t][ \t]*ruby_19_preferred="yes"@i ruby_21_preferred="yes";@' \ + -e '\@^RUBY=.*false@d' \ + %{nil} ## configure option, etc # change optflags, don't strip @@ -165,10 +150,8 @@ popd # from main # Okay, duplicate main directory for ext in \ -%if %enable_python3 python3 \ -%endif - ruby perl python + ruby perl do mkdir -p $ext cp -pr main/* $ext @@ -187,11 +170,7 @@ OPTS="$OPTS --enable-debug" OPTS="$OPTS --disable-strip" OPTS="$OPTS --with-ruby_sitearch_dir=%{ruby_vendorarchdir}" - -PYTHONOPTS="$OPTS --enable-python2 --with-python_sitearch_dir=%{python2_sitearch}" -%if %enable_python3 PYTHON3OPTS="$OPTS --enable-python3 --with-python_sitearch_dir=%{python3_sitearch}" -%endif # Workaround for ruby 3 export RUBY=ruby @@ -213,8 +192,7 @@ do export CFLAGS="%optflags $(pkg-config --cflags ruby)" fi - sed -i.py configure -e '\@enable_python3="yes"@d' - %configure $OPTS $PYTHONOPTS + %configure $OPTS unset CFLAGS make -j1 ${ext}ext @@ -233,7 +211,6 @@ do done # python3 -%if %enable_python3 pushd python3 export PYTHON=python3 %configure $OPTS $PYTHON3OPTS @@ -242,7 +219,6 @@ unset CFLAGS make -j1 pythonext unset PYTHON popd -%endif # tweak find-debuginfo.sh %global debuginfo_subdir %{name}-%{version}-%{release}.%{?_arch} @@ -308,9 +284,7 @@ do eval make -C $ext ${OPTS} ${ext}ext_install done ## python3 -%if %enable_python3 ( eval make -C python3 ${OPTS} pythonext_install ) -%endif ## perl pushd perl @@ -328,22 +302,17 @@ popd export PATH=%{buildroot}%{_bindir}:$PATH export PERL5LIB=%{buildroot}%{perl_vendorarch} -export python2PATH=%{buildroot}%{python2_sitearch} -%if %enable_python3 export python3PATH=%{buildroot}%{python3_sitearch} -%endif export RUBYLIB=%{buildroot}%{ruby_vendorarchdir} export CHECK_PYTHON2=no # SOURCE1 sh %{SOURCE1} -%if %enable_python3 ( export PYTHONPATH=${python3PATH} python3 %{SOURCE11} ) -%endif %files %defattr(-,root,root,-) @@ -367,13 +336,11 @@ sh %{SOURCE1} %defattr(-,root,root,-) %{ruby_vendorarchdir}/skf.so -%if %enable_python3 %files -n python3-skf %defattr(-,root,root,-) %{python3_sitearch}/_skf.so %{python3_sitearch}/skf.py* %{python3_sitearch}/__pycache__/skf.* -%endif %files perl %defattr(-,root,root,-) @@ -381,6 +348,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jan 27 2023 Mamoru TASAKA - 2.10.16-1 +- 2.10.16 + * Sat Jan 21 2023 Fedora Release Engineering - 2.10.15-2.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 077155c..8ba66a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (skf_2.10.15.tar.xz) = 6987872617e8babac3a55533741777ebdc2c862162601be21864fe55362376c80b26fe7715365fa64ca617c2a41d9a9ccedb71e1ddc1b4024f20c1c42bbf95cf +SHA512 (skf_2.10.16.tar.xz) = 9d7db9f88c25a780c3dea0a5989cd287bc161b69662d80f9d33cf512039405fd903a668e96df644484ef5a871768c91975a1a78d350bbe9cd61553ae69b34baf From 78fc1d741bb58275bba0ee20c57cf3f02748b4db Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 14 Jun 2023 00:19:43 +0200 Subject: [PATCH 20/40] Rebuilt for Python 3.12 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 172dfa6..8642923 100644 --- a/skf.spec +++ b/skf.spec @@ -19,7 +19,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -348,6 +348,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Tue Jun 13 2023 Python Maint - 2.10.16-1.1 +- Rebuilt for Python 3.12 + * Fri Jan 27 2023 Mamoru TASAKA - 2.10.16-1 - 2.10.16 From 6c7df3e7e11a2d51e3b9a8ad3a3650f9e9e0cd07 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 11 Jul 2023 14:47:39 +0200 Subject: [PATCH 21/40] Perl 5.38 rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 8642923..ff00dc6 100644 --- a/skf.spec +++ b/skf.spec @@ -19,7 +19,7 @@ Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.1 +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -348,6 +348,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Tue Jul 11 2023 Jitka Plesnikova - 2.10.16-1.2 +- Perl 5.38 rebuild + * Tue Jun 13 2023 Python Maint - 2.10.16-1.1 - Rebuilt for Python 3.12 From 4145a5afee04ba755a3da95ebd4b3c799aa347ef Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sat, 22 Jul 2023 23:40:57 +0900 Subject: [PATCH 22/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild --- skf.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skf.spec b/skf.spec index ff00dc6..1fdee7e 100644 --- a/skf.spec +++ b/skf.spec @@ -13,13 +13,13 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global fedoraver 1 +%global baserelease 2 %undefine _changelog_trimtime Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}.2 +Release: %{?betaver:0.}%{baserelease}%{?betaver:.%betarel}%{?dist} Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD @@ -348,6 +348,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Sat Jul 22 2023 Mamoru TASAKA - 2.10.16-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 Jitka Plesnikova - 2.10.16-1.2 - Perl 5.38 rebuild From 3e43cd7f31c344b947b9ec3c83391defb035b71f Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 3 Jan 2024 21:16:34 +0900 Subject: [PATCH 23/40] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 1fdee7e..35368f9 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 2 +%global baserelease 3 %undefine _changelog_trimtime @@ -348,6 +348,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Wed Jan 03 2024 Mamoru TASAKA - 2.10.16-3 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 + * Sat Jul 22 2023 Mamoru TASAKA - 2.10.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From f8d272996a8f14dcdf879998af4318030cd0de1b Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 5 Jan 2024 13:53:20 +0900 Subject: [PATCH 24/40] rubyext: remove unneeded ptr -> VALUE conversion (ref: bug 2256789) --- skf-2.10.16-rubyext-ptr-conversion.patch | 29 ++++++++++++++++++++++++ skf.spec | 10 +++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 skf-2.10.16-rubyext-ptr-conversion.patch diff --git a/skf-2.10.16-rubyext-ptr-conversion.patch b/skf-2.10.16-rubyext-ptr-conversion.patch new file mode 100644 index 0000000..610b821 --- /dev/null +++ b/skf-2.10.16-rubyext-ptr-conversion.patch @@ -0,0 +1,29 @@ +--- skf-2.10.16/skf_convert.i.rubyptr 2024-01-05 10:20:35.562486946 +0900 ++++ skf-2.10.16/skf_convert.i 2024-01-05 11:17:18.687481582 +0900 +@@ -1238,7 +1238,7 @@ SKFSTRINGS *convert(SKFSTRINGS *optstr, + + #if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2) || defined(SKF_RUBY3)) + lwlstr = cstr; +- ibuflen = get_rstr_len(cstr); ++ ibuflen = lwlstr->length; + #elif defined(SWIGPYTHON) + lwlstr = skf_pystring2skfstring(cstr,1); + ibuflen = lwlstr->length; +@@ -1365,7 +1365,7 @@ SKFSTRINGS *quickconvert(SKFSTRINGS *opt + + #if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2) || defined(SKF_RUBY3)) + lwlstr = cstr; +- ibuflen = get_rstr_len(cstr); ++ ibuflen = lwlstr->length; + #elif defined(SWIGPYTHON) && defined(SKF_PYTHON3) + lwlstr = skf_pystring2skfstring(cstr,1); + ibuflen = lwlstr->length; +@@ -1468,7 +1468,7 @@ SKFSTRINGS *guess(SKFSTRINGS *optstr, SK + + #if defined(SKF_RUBY19) || defined(SKF_RUBY2) || defined(SKF_RUBY3) + lwlstr = cstr; +- ibuflen = get_rstr_len(cstr); ++ ibuflen = lwlstr->length; + #elif defined(SWIGPYTHON) && defined(SKF_PYTHON3) + lwlstr = skf_pystring2skfstring(cstr,1); + ibuflen = lwlstr->length; diff --git a/skf.spec b/skf.spec index 35368f9..b6f796e 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 3 +%global baserelease 4 %undefine _changelog_trimtime @@ -29,6 +29,9 @@ Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh # https://osdn.net/projects/skf/ticket/39882 Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest +# rubyext: remove unneeded ptr -> VALUE conversion +# ref: https://bugzilla.redhat.com/show_bug.cgi?id=2256789 +Patch0: skf-2.10.16-rubyext-ptr-conversion.patch # common BR BuildRequires: gcc @@ -113,6 +116,8 @@ cp -p %SOURCE1 . pushd main +%patch -P0 -p1 -b .rubyptr + %if 0%{?usescm} >= 1 autoconf @@ -348,6 +353,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jan 5 2024 Mamoru TASAKA - 2.10.16-4 +- rubyext: remove unneeded ptr -> VALUE conversion (ref: bug 2256789) + * Wed Jan 03 2024 Mamoru TASAKA - 2.10.16-3 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 From 3c497991d5546bdfa528fb7136024c4c302cdcac Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 5 Jan 2024 13:58:25 +0900 Subject: [PATCH 25/40] change URL --- skf.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index b6f796e..fcca760 100644 --- a/skf.spec +++ b/skf.spec @@ -24,7 +24,7 @@ Summary: Utility binary files in Simple Kanji Filter License: BSD and MIT and UCD URL: http://osdn.jp/projects/skf -Source0: https://ja.osdn.net/frs/redir.php?f=skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz +Source0: https://ftp.iij.ad.jp/pub/osdn.jp/skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh # https://osdn.net/projects/skf/ticket/39882 From c3aba0cf1f47a8c7cf5cae1474f5222e3362a4db Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 5 Jan 2024 17:42:27 +0900 Subject: [PATCH 26/40] rubyext: type check for argument (ref: bug 2256789) --- skf-2.10.16-rubyext-ptr-typecheck.patch | 10 ++++++++++ skf.spec | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 skf-2.10.16-rubyext-ptr-typecheck.patch diff --git a/skf-2.10.16-rubyext-ptr-typecheck.patch b/skf-2.10.16-rubyext-ptr-typecheck.patch new file mode 100644 index 0000000..3a53b64 --- /dev/null +++ b/skf-2.10.16-rubyext-ptr-typecheck.patch @@ -0,0 +1,10 @@ +--- skf-2.10/skf_convert.i.rubycheck 2024-01-05 13:48:57.143063331 +0900 ++++ skf-2.10/skf_convert.i 2024-01-05 17:30:28.938429890 +0900 +@@ -526,6 +526,7 @@ struct Skf_localestring *skf_rbstring2sk + if ((sstrdef = calloc(1,sizeof(struct Skf_localestring))) == NULL) { + skferr(SKF_MALLOCERR,24,2); + } else { ++ if (TYPE(rstr) != T_STRING) {rb_raise(rb_eArgError, "wrong type for arguments"); skferr(SKF_NOTABLE, 0, 0); } + sstrdef->sstr = (unsigned char *)RSTRING_PTR(rstr); + sstrdef->length = RSTRING_LEN(rstr); + sstrdef->codeset = diff --git a/skf.spec b/skf.spec index fcca760..420e066 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 4 +%global baserelease 5 %undefine _changelog_trimtime @@ -32,6 +32,8 @@ Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest # rubyext: remove unneeded ptr -> VALUE conversion # ref: https://bugzilla.redhat.com/show_bug.cgi?id=2256789 Patch0: skf-2.10.16-rubyext-ptr-conversion.patch +# rubyext: type check for argument (ref: bug 2256789) +Patch1: skf-2.10.16-rubyext-ptr-typecheck.patch # common BR BuildRequires: gcc @@ -117,6 +119,7 @@ cp -p %SOURCE1 . pushd main %patch -P0 -p1 -b .rubyptr +%patch -P1 -p1 -b .rubycheck %if 0%{?usescm} >= 1 autoconf @@ -353,6 +356,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jan 5 2024 Mamoru TASAKA - 2.10.16-5 +- rubyext: type check for argument (ref: bug 2256789) + * Fri Jan 5 2024 Mamoru TASAKA - 2.10.16-4 - rubyext: remove unneeded ptr -> VALUE conversion (ref: bug 2256789) From fda8a1a299a04777c14950878f191d39d3dab741 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 03:27:54 +0000 Subject: [PATCH 27/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 420e066..3fa8c85 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 5 +%global baserelease 6 %undefine _changelog_trimtime @@ -356,6 +356,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 2.10.16-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 5 2024 Mamoru TASAKA - 2.10.16-5 - rubyext: type check for argument (ref: bug 2256789) From 76671a31d81a29bc9239c567cc0266ed4db8a870 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 09:04:42 +0200 Subject: [PATCH 28/40] Rebuilt for Python 3.13 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 3fa8c85..a7b0bf9 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 6 +%global baserelease 7 %undefine _changelog_trimtime @@ -356,6 +356,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jun 07 2024 Python Maint - 2.10.16-7 +- Rebuilt for Python 3.13 + * Sat Jan 27 2024 Fedora Release Engineering - 2.10.16-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d0002588819adcb13842af155fadb2749bb86191 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 12 Jun 2024 13:07:58 +0200 Subject: [PATCH 29/40] Perl 5.40 rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index a7b0bf9..e404edb 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 7 +%global baserelease 8 %undefine _changelog_trimtime @@ -356,6 +356,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Wed Jun 12 2024 Jitka Plesnikova - 2.10.16-8 +- Perl 5.40 rebuild + * Fri Jun 07 2024 Python Maint - 2.10.16-7 - Rebuilt for Python 3.13 From 730cca78899e62095fed847e5bc0767e7ae95507 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 05:46:48 +0000 Subject: [PATCH 30/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index e404edb..b8c233a 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 8 +%global baserelease 9 %undefine _changelog_trimtime @@ -356,6 +356,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 2.10.16-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jun 12 2024 Jitka Plesnikova - 2.10.16-8 - Perl 5.40 rebuild From ed5453eaed45c50f3808d5236870e8e439ec97b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 11 Sep 2024 05:58:00 +0000 Subject: [PATCH 31/40] Migrate to SPDX license (temporary ids) BSD and MIT needs to be identified under SPDX - both have more options for UCD see https://gitlab.com/fedora/legal/fedora-license-data/-/issues/30 This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 Note that this is an SPDX identifier, but it still needs to be migrated to the proper identifiers in the fedora-license-data set. If there will be no comments in two weeks, I will merge this. --- skf.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index b8c233a..b700abf 100644 --- a/skf.spec +++ b/skf.spec @@ -22,7 +22,7 @@ Version: %{mainver} Release: %{?betaver:0.}%{baserelease}%{?betaver:.%betarel}%{?dist} Summary: Utility binary files in Simple Kanji Filter -License: BSD and MIT and UCD +License: LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-UCD URL: http://osdn.jp/projects/skf Source0: https://ftp.iij.ad.jp/pub/osdn.jp/skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz Source1: skf-basic-test.sh From 7890dfee4fcd675e733809e0f163d8a18d69eaee Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 8 Jan 2025 10:32:15 +0900 Subject: [PATCH 32/40] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index b700abf..b56180d 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 9 +%global baserelease 10 %undefine _changelog_trimtime @@ -356,6 +356,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Wed Jan 08 2025 Mamoru TASAKA - 2.10.16-10 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 + * Sat Jul 20 2024 Fedora Release Engineering - 2.10.16-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From a68ddb7067e9a1a0e11a8ecd83a8dcf4e977a8fb Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 17 Jan 2025 12:03:40 +0900 Subject: [PATCH 33/40] Support C23 strict prototype --- skf-2.10.16-c23-function-proto.patch | 94 ++++++++++++++++++++++++++++ skf.spec | 8 ++- 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 skf-2.10.16-c23-function-proto.patch diff --git a/skf-2.10.16-c23-function-proto.patch b/skf-2.10.16-c23-function-proto.patch new file mode 100644 index 0000000..18c5911 --- /dev/null +++ b/skf-2.10.16-c23-function-proto.patch @@ -0,0 +1,94 @@ +diff --git a/skf-2.10/dyn_table.c b/skf-2.10/dyn_table.c +index f4fd2c4..e1b0bfb 100644 +--- a/skf-2.10/dyn_table.c ++++ b/skf-2.10/dyn_table.c +@@ -102,9 +102,9 @@ void emoticon_table_gen(); + void emoti_ntt_otbl_gen(); + void emoti_sb_otbl_gen(); + void emoti_au_otbl_gen(); +-void emoticon_otbl_gen(); ++void emoticon_otbl_gen P_((int)); + void nyukan_otbl_gen(); +-void set_out_table(); ++void set_out_table P_((long, long)); + void aribsjis_table_gen(); + void aribjis_table_gen(); + void aribaltmb_table_gen(); +@@ -117,7 +117,7 @@ void aribbmp_table_gen(); + void tscii_tbl_gen(); + #else + void emoticon_table_gen(); +-void emoticon_otbl_gen(); ++void emoticon_otbl_gen P_((int)); + #endif + + void iso2022ms_table_gen(); +diff --git a/skf-2.10/skf.c b/skf-2.10/skf.c +index 8315806..bea2666 100644 +--- a/skf-2.10/skf.c ++++ b/skf-2.10/skf.c +@@ -237,7 +237,7 @@ int **arib_macro_tbl = NULL; /* arib macro area */ + + /* converters */ + static int argeval P_((int,char **,int)); +-int skf_in_converter(); ++int skf_in_converter P_((skfFILE *)); + static int skf_kanaconv_parser P_((int)); + + #ifndef SWIG_EXT +diff --git a/skf-2.10/skf.h b/skf-2.10/skf.h +index 5c2d3c0..a422c1a 100644 +--- a/skf-2.10/skf.h ++++ b/skf-2.10/skf.h +@@ -2270,7 +2270,6 @@ extern skf_ucode **arib_macro_tbl; + + /* --- SWIG-EXTENSION related fixes ---------------------------- */ + extern void fold_value_setup(); +-extern int skf_in_converter(); + + #ifdef SWIG_EXT + extern int swig_state; +diff --git a/skf-2.10/skf_convert.i b/skf-2.10/skf_convert.i +index bc365bb..d8c68e6 100644 +--- a/skf-2.10/skf_convert.i ++++ b/skf-2.10/skf_convert.i +@@ -1164,7 +1164,7 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen, + + /* --- conversion loop ------------------------------------------- */ + if ((errc = setjmp(skf_errbuf)) == 0) { +- sy = skf_in_converter((FILE *)0); ++ sy = skf_in_converter(0); + } else { + #if defined(SKF_PYTHON3) && defined(SWIGPYTHON) + if (errc == 1) PyErr_NoMemory(); +diff --git a/skf-2.10/skf_fileio.h b/skf-2.10/skf_fileio.h +index b551898..74dcc6c 100644 +--- a/skf-2.10/skf_fileio.h ++++ b/skf-2.10/skf_fileio.h +@@ -53,8 +53,6 @@ extern const char *skf_outmode; + /* encoding controls */ + /* -------------------------------------------------------------- */ + +-extern int decode_hook(); +- + #define sEOF (-1) + #define sOCD (-2) + #define sKAN (-3) +@@ -144,7 +142,7 @@ typedef int skfFILE; /* file type */ + + extern unsigned char stdobuf[O_BUFSIZ]; /* output buffer */ + +-extern int skf_fillbuf(); ++extern int skf_fillbuf P_((int *)); + extern /*@-retalias@*/ skfFILE *skf_fopen P_((char *, const char *)); + extern size_t skf_strlen P_((char *,int)); + +@@ -253,6 +251,8 @@ extern skfoFILE *fout; + #endif + + extern void skf_setvbuf P_ ((FILE *,char *,size_t)); ++extern int skf_in_converter P_((skfFILE *)); ++extern int decode_hook P_((skfFILE*, int)); + + /* -------------------------------------------------------------- */ + /* exception handling */ diff --git a/skf.spec b/skf.spec index b56180d..c3c8948 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 10 +%global baserelease 11 %undefine _changelog_trimtime @@ -34,6 +34,8 @@ Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest Patch0: skf-2.10.16-rubyext-ptr-conversion.patch # rubyext: type check for argument (ref: bug 2256789) Patch1: skf-2.10.16-rubyext-ptr-typecheck.patch +# Support C23 strict prototype +Patch2: skf-2.10.16-c23-function-proto.patch # common BR BuildRequires: gcc @@ -120,6 +122,7 @@ pushd main %patch -P0 -p1 -b .rubyptr %patch -P1 -p1 -b .rubycheck +%patch -P2 -p2 -b .c23 %if 0%{?usescm} >= 1 autoconf @@ -356,6 +359,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jan 17 2025 Mamoru TASAKA - 2.10.16-11 +- Support C23 strict prototype + * Wed Jan 08 2025 Mamoru TASAKA - 2.10.16-10 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 From be68a89e6b7fb207a9949c0c095dce129cbb6f30 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 20:42:31 +0200 Subject: [PATCH 34/40] Rebuilt for Python 3.14 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index c3c8948..6ab4f07 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 11 +%global baserelease 12 %undefine _changelog_trimtime @@ -359,6 +359,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Mon Jun 02 2025 Python Maint - 2.10.16-12 +- Rebuilt for Python 3.14 + * Fri Jan 17 2025 Mamoru TASAKA - 2.10.16-11 - Support C23 strict prototype From 7676f5ebc71b84a4a4f478ac7f0048c105edcc9f Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 7 Jul 2025 16:38:25 +0200 Subject: [PATCH 35/40] Perl 5.42 rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 6ab4f07..4103558 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 12 +%global baserelease 13 %undefine _changelog_trimtime @@ -359,6 +359,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Mon Jul 07 2025 Jitka Plesnikova - 2.10.16-13 +- Perl 5.42 rebuild + * Mon Jun 02 2025 Python Maint - 2.10.16-12 - Rebuilt for Python 3.14 From 109108f6820328307a9bd76dae1efd072f42b4c9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 18:23:19 +0000 Subject: [PATCH 36/40] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 4103558..a8f2c30 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 13 +%global baserelease 14 %undefine _changelog_trimtime @@ -359,6 +359,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.10.16-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jul 07 2025 Jitka Plesnikova - 2.10.16-13 - Perl 5.42 rebuild From ce265f09fb20e8693967dc0666f56306ef939abe Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:18:05 +0200 Subject: [PATCH 37/40] Rebuilt for Python 3.14.0rc2 bytecode --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index a8f2c30..e3523c0 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 14 +%global baserelease 15 %undefine _changelog_trimtime @@ -359,6 +359,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Aug 15 2025 Python Maint - 2.10.16-15 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Jul 25 2025 Fedora Release Engineering - 2.10.16-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From e2a70a5b30c0157fff9894ab4dcf67cdce81c293 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:56:49 +0200 Subject: [PATCH 38/40] Rebuilt for Python 3.14.0rc3 bytecode --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index e3523c0..6ee5ea1 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 15 +%global baserelease 16 %undefine _changelog_trimtime @@ -359,6 +359,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Fri Sep 19 2025 Python Maint - 2.10.16-16 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 2.10.16-15 - Rebuilt for Python 3.14.0rc2 bytecode From 5da9c6795e2608fdc5f13678a35b1e25477901b6 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 17 Nov 2025 23:00:09 +0900 Subject: [PATCH 39/40] Support ruby4 --- skf.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 6ee5ea1..7f66f49 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 16 +%global baserelease 17 %undefine _changelog_trimtime @@ -145,6 +145,12 @@ sed -i configure.ac configure \ -e '\@^RUBY=.*false@d' \ %{nil} +# Support ruby4 +sed -i.ruby4 \ + skf_convert.i config.h.in \ + -e 's@|| defined(SKF_RUBY3)@|| defined(SKF_RUBY3) || defined(SKF_RUBY4)@' \ + %{nil} + ## configure option, etc # change optflags, don't strip # believe upstream @@ -359,6 +365,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Mon Nov 17 2025 Mamoru TASAKA - 2.10.16-17 +- Support ruby4 + * Fri Sep 19 2025 Python Maint - 2.10.16-16 - Rebuilt for Python 3.14.0rc3 bytecode From f4539cf4c3d191a857560519ed23f2453136e4e2 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 8 Jan 2026 20:55:30 +0900 Subject: [PATCH 40/40] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 --- skf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skf.spec b/skf.spec index 7f66f49..4f293d3 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 17 +%global baserelease 18 %undefine _changelog_trimtime @@ -365,6 +365,9 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Thu Jan 08 2026 Mamoru TASAKA - 2.10.16-18 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 + * Mon Nov 17 2025 Mamoru TASAKA - 2.10.16-17 - Support ruby4