Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

2 changed files with 76 additions and 9 deletions

View File

@ -0,0 +1,59 @@
diff -ru saplocales-2.2.5/SAPSHIFT_JIS saplocales-2.2.5/SAPSHIFT_JIS
--- saplocales-2.2.5/SAPSHIFT_JIS 2025-02-10 17:38:56.230083313 +0100
+++ saplocales-2.2.5/SAPSHIFT_JIS 2025-02-10 17:43:07.690184632 +0100
@@ -1,10 +1,10 @@
-<code_set_name> SAPSHIFT_JIS
+<code_set_name> OLDSAPSHIFT_JIS
<comment_char> %
<escape_char> /
<mb_cur_min> 1
<mb_cur_max> 2
-% alias SAPSJIS
+% alias OLDSAPSJIS
CHARMAP
<U0000> /x00 NULL (NUL)
<U0001> /x01 START OF HEADING (SOH)
diff -ru saplocales-2.2.5/SAPSHIFT_JISX0213 saplocales-2.2.5/SAPSHIFT_JISX0213
--- saplocales-2.2.5/SAPSHIFT_JISX0213 2025-02-10 17:38:56.293083588 +0100
+++ saplocales-2.2.5/SAPSHIFT_JISX0213 2025-02-10 17:42:21.601982665 +0100
@@ -1,4 +1,4 @@
-<code_set_name> SAPSHIFT_JISX0213
+<code_set_name> SAPSHIFT_JIS
<comment_char> %
<escape_char> /
<mb_cur_min> 1
@@ -10,7 +10,7 @@
% Last changed: 2012-08-20
% Modified glibc SHIFT_JISX0213
-% alias SAPSJISX0213
+% alias SAPSJIS
CHARMAP
<U0000> /x00 <control>
<U0001> /x01 <control>
diff -ru saplocales-2.2.5/SAPSJIS.c saplocales-2.2.5/SAPSJIS.c
--- saplocales-2.2.5/SAPSJIS.c 2025-02-10 17:38:56.232083321 +0100
+++ saplocales-2.2.5/SAPSJIS.c 2025-02-10 17:44:04.009431421 +0100
@@ -4328,7 +4328,7 @@
};
/* Definitions used in the body of the `gconv' function. */
-#define CHARSET_NAME "SAPSJIS//"
+#define CHARSET_NAME "OLDSAPSJIS//"
#define FROM_LOOP from_sjis
#define TO_LOOP to_sjis
#define DEFINE_INIT 1
diff -ru saplocales-2.2.5/SAPSJISX0213.c saplocales-2.2.5/SAPSJISX0213.c
--- saplocales-2.2.5/SAPSJISX0213.c 2025-02-10 17:38:56.293083588 +0100
+++ saplocales-2.2.5/SAPSJISX0213.c 2025-02-10 17:40:42.459548222 +0100
@@ -39,7 +39,7 @@
#include "jisx0213.h"
/* Definitions used in the body of the `gconv' function. */
-#define CHARSET_NAME "SAPSJISX0213//"
+#define CHARSET_NAME "SAPSJIS//"
#define FROM_LOOP from_shift_jisx0213
#define TO_LOOP to_shift_jisx0213
#define DEFINE_INIT 1

View File

@ -1,7 +1,7 @@
%define __filter_GLIBC_PRIVATE 1
Name: compat-locales-sap
Version: 1.0.10
Release: 14%{?dist}
Release: 15%{?dist}
Summary: Compatibility locales for SAP
Group: System Environment/Libraries
@ -41,6 +41,7 @@ Patch15: saplocales-842448-shift-jisx0213.patch
Patch16: glibc-cs_CZ@HPUX.patch
Patch17: saplocales-2.2.5-rhel8.patch
Patch18: saplocales-2.2.5-ldflags.patch
Patch19: saplocales-RHEL-77993-rename-charsets.patch
%description
Compatibility locales for legacy data on SAP Application Servers.
@ -142,6 +143,7 @@ mv pl_PL{,@HPUX}
gunzip -c %{_datadir}/i18n/charmaps/SHIFT_JISX0213.gz > saplocales-2.2.5/SAPSHIFT_JISX0213
mv saplocales-2.2.5/{shift_jisx0213.c,SAPSJISX0213.c}
%patch15 -p0 -b .orig
%patch19 -p0 -b .orig
%build
make -C saplocales-2.2.5 gconv/SAPSJIS.so NEWFLAGS="-Wl,-z,now -DFOR_GLIBC_2_6_AND_LATER %{optflags}"
@ -237,17 +239,19 @@ rm -rf $RPM_BUILD_ROOT
%posttrans common
sed -i -e "/SAPSJIS/d" %{_libdir}/gconv/gconv-modules
sed -i -e "/SAPSJISX0213/d" %{_libdir}/gconv/gconv-modules
sed -i -e "/OLDSAPSJIS/d" %{_libdir}/gconv/gconv-modules
# from to module cost
cat >> %{_libdir}/gconv/gconv-modules << EOF
alias SAPSHIFT_JIS// SAPSJIS//
module SAPSJIS// INTERNAL SAPSJIS 1
module INTERNAL SAPSJIS// SAPSJIS 1
alias OLDSAPSHIFT_JIS// OLDSAPSJIS//
module OLDSAPSJIS// INTERNAL SAPSJIS 1
module INTERNAL OLDSAPSJIS// SAPSJIS 1
alias SAPSHIFT_JISX0213// SAPSJISX0213//
module SAPSJISX0213// INTERNAL SAPSJISX0213 1
module INTERNAL SAPSJISX0213// SAPSJISX0213 1
alias SAPSHIFT_JIS// SAPSJIS//
alias SAPSHIFT_JISX0213// SAPSJIS//
alias SAPSJISX0213// SAPSJIS//
module SAPSJIS// INTERNAL SAPSJISX0213 1
module INTERNAL SAPSJIS// SAPSJISX0213 1
EOF
%{_sbindir}/iconvconfig -o %{_libdir}/gconv/gconv-modules.cache --nostdlib %{_libdir}/gconv
exit 0
@ -255,7 +259,7 @@ exit 0
%postun common
if [ $1 -eq 0 ] ; then
sed -i -e "/SAPSJIS/d" %{_libdir}/gconv/gconv-modules
sed -i -e "/SAPSJISX0213/d" %{_libdir}/gconv/gconv-modules
sed -i -e "/OLDSAPSJIS/d" %{_libdir}/gconv/gconv-modules
%{_sbindir}/iconvconfig -o %{_libdir}/gconv/gconv-modules.cache --nostdlib %{_libdir}/gconv
fi
exit 0
@ -274,6 +278,10 @@ exit 0
%{_prefix}/lib/locale/*
%changelog
* Mon Feb 10 2025 Mike Fabian <mfabian@redhat.com> - 1.0.10-15
- Rename charsets SAPSHIFT_JIS -> OLD_SAPSHIFT_JIS, SAPSHIFT_JISX0213 ->SAPSHIFT_JIS
- Resolves: RHEL-79981
* Tue Aug 20 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-14
- glibc_post_upgrade.<_target_cpu> does not exist anymore, iconvconfig
needs to be used in the posttrans script.