import compat-locales-sap-1.0.10-14.el8

This commit is contained in:
CentOS Sources 2019-11-15 07:58:27 -05:00 committed by Andrew Lukoshko
parent 4e5afddebe
commit 56af2d4d67
2 changed files with 105 additions and 9 deletions

View File

@ -0,0 +1,13 @@
diff -ru compat-locales-sap-1.0.10.orig/saplocales-2.2.5/Makefile compat-locales-sap-1.0.10/saplocales-2.2.5/Makefile
--- compat-locales-sap-1.0.10.orig/saplocales-2.2.5/Makefile 2019-08-15 11:05:54.078849986 +0200
+++ compat-locales-sap-1.0.10/saplocales-2.2.5/Makefile 2019-08-15 11:28:03.573044382 +0200
@@ -31,7 +31,7 @@
-include compiler.h \
-I. -Iiconv $(NEWFLAGS)
-LDFLAGS= -shared
+LDFLAGS= -shared -z now
all: modules locales

View File

@ -1,7 +1,7 @@
%define debug_package %{nil} %define __filter_GLIBC_PRIVATE 1
Name: compat-locales-sap Name: compat-locales-sap
Version: 1.0.10 Version: 1.0.10
Release: 9%{?dist} Release: 14%{?dist}
Summary: Compatibility locales for SAP Summary: Compatibility locales for SAP
Group: System Environment/Libraries Group: System Environment/Libraries
@ -19,8 +19,8 @@ Source16: glibc-2.26-pl_PL
Source17: glibc-2.26-tr_TR Source17: glibc-2.26-tr_TR
Source18: glibc-2.26-cs_CZ Source18: glibc-2.26-cs_CZ
Source19: glibc-2.26-sk_SK Source19: glibc-2.26-sk_SK
Obsoletes: %{name}-common
Conflicts: %{name} <= 1.0.10-6 Conflicts: %{name} <= 1.0.10-6
Requires: %{name}-common = %{version}-%{release}
BuildRequires: glibc-locale-source BuildRequires: glibc-locale-source
Patch0: saplocales-2.2.5-rhel5.patch Patch0: saplocales-2.2.5-rhel5.patch
Patch1: glibc-cs_CZ@SAP.patch Patch1: glibc-cs_CZ@SAP.patch
@ -39,16 +39,27 @@ Patch13: glibc-de_DE@HPUX.patch
Patch14: glibc-pl_PL@HPUX.patch Patch14: glibc-pl_PL@HPUX.patch
Patch15: saplocales-842448-shift-jisx0213.patch Patch15: saplocales-842448-shift-jisx0213.patch
Patch16: glibc-cs_CZ@HPUX.patch Patch16: glibc-cs_CZ@HPUX.patch
patch17: saplocales-2.2.5-rhel8.patch Patch17: saplocales-2.2.5-rhel8.patch
Patch18: saplocales-2.2.5-ldflags.patch
%description %description
Compatibility locales for legacy data on SAP Application Servers.
This package provides gconv modules for SAPSJIS and SAPSJISX0213.
%package common
Summary: SAP locale files
Group: System Environment/Libraries
License: GPLv2+
%description common
This package provides various compatibility locales for use This package provides various compatibility locales for use
with SAP Application Servers: with SAP Application Servers:
cs_CZ.ISO-8859-2@SAP, cs_CZ.ISO-8859-2@HPUX, sk_SK.ISO-8859-2@SAP, cs_CZ.ISO-8859-2@SAP, cs_CZ.ISO-8859-2@HPUX, sk_SK.ISO-8859-2@SAP,
lt_LT.ISO-8859-4@SAP, lv_LV.ISO-8859-4@SAP, et_EE.ISO-8859-4@SAP, lt_LT.ISO-8859-4@SAP, lv_LV.ISO-8859-4@SAP, et_EE.ISO-8859-4@SAP,
tr_TR.ISO-8859-9@SAP, tr_TR.ISO-8859-9@SAP,
ko_KR.euckr@SAP, ja_JP.SAPSJIS, ko_KR.euckr@SAP,
de_DE.ISO-8859-1@POSIX, en_US.ISO-8859-1@POSIX, de_DE.ISO-8859-1@POSIX, en_US.ISO-8859-1@POSIX,
de_DE.CP1252@WINDOWS, en_US.CP1252@WINDOWS, de_DE.CP1252@WINDOWS, en_US.CP1252@WINDOWS,
es_ES.ISO-8859-1@SAP, es_ES.ISO-8859-1@SAP,
@ -56,10 +67,13 @@ de_DE.ISO-8859-1@Solaris, en_US.ISO-8859-1@Solaris,
de_DE.ISO-8859-1@HPUX, en_US.ISO-8859-1@HPUX, de_DE.ISO-8859-1@HPUX, en_US.ISO-8859-1@HPUX,
pl_PL.ISO-8859-1@HPUX pl_PL.ISO-8859-1@HPUX
Note that SAPSJIS is incompatible with ASCII.
%prep %prep
%setup -q -T -c -a1 %setup -q -T -c -a1
%patch0 -p0 -b .orig %patch0 -p0 -b .orig
%patch17 -p1 -b .orig %patch17 -p1 -b .orig
%patch18 -p1 -b .orig
cp -p %SOURCE0 . cp -p %SOURCE0 .
cp -p %SOURCE2 saplocales-2.2.5 cp -p %SOURCE2 saplocales-2.2.5
cd saplocales-2.2.5 cd saplocales-2.2.5
@ -125,14 +139,25 @@ cp -p %SOURCE16 pl_PL
%patch14 -p1 -b .orig %patch14 -p1 -b .orig
mv pl_PL{,@HPUX} 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
%build %build
make -C saplocales-2.2.5 gconv/SAPSJIS.so NEWFLAGS="-Wl,-z,now -DFOR_GLIBC_2_6_AND_LATER %{optflags}"
make -C saplocales-2.2.5 gconv/SAPSJISX0213.so NEWFLAGS="-Wl,-z,now -DFOR_GLIBC_2_6_AND_LATER %{optflags}"
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}
cp -a saplocales-2.2.5/gconv $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/i18n/locales mkdir -p $RPM_BUILD_ROOT%{_datadir}/i18n/locales
cp -p cs_CZ@SAP cs_CZ@HPUX de_DE@HPUX de_DE@POSIX de_DE@Solaris de_DE@WINDOWS en_US@HPUX en_US@POSIX en_US@Solaris en_US@WINDOWS es_ES@SAP pl_PL@HPUX sk_SK@SAP tr_TR@SAP $RPM_BUILD_ROOT%{_datadir}/i18n/locales/ cp -p cs_CZ@SAP cs_CZ@HPUX de_DE@HPUX de_DE@POSIX de_DE@Solaris de_DE@WINDOWS en_US@HPUX en_US@POSIX en_US@Solaris en_US@WINDOWS es_ES@SAP pl_PL@HPUX sk_SK@SAP tr_TR@SAP $RPM_BUILD_ROOT%{_datadir}/i18n/locales/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/i18n/charmaps
cp -p saplocales-2.2.5/SAPSHIFT_JIS{,X0213} $RPM_BUILD_ROOT%{_datadir}/i18n/charmaps
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/locale mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/locale
localedef --no-archive -ci $RPM_BUILD_ROOT%{_datadir}/i18n/locales/tr_TR@SAP \ localedef --no-archive -ci $RPM_BUILD_ROOT%{_datadir}/i18n/locales/tr_TR@SAP \
@ -177,6 +202,12 @@ localedef --no-archive -ci $RPM_BUILD_ROOT%{_datadir}/i18n/locales/en_US@WINDOWS
$RPM_BUILD_ROOT%{_prefix}/lib/locale/en_US@WINDOWS $RPM_BUILD_ROOT%{_prefix}/lib/locale/en_US@WINDOWS
# ASCII incompatible locale # ASCII incompatible locale
localedef --no-archive -ci ja_JP \
-f $RPM_BUILD_ROOT%{_datadir}/i18n/charmaps/SAPSHIFT_JISX0213 \
$RPM_BUILD_ROOT%{_prefix}/lib/locale/ja_JP.SAPSJIS
localedef --no-archive -ci ja_JP \
-f $RPM_BUILD_ROOT%{_datadir}/i18n/charmaps/SAPSHIFT_JIS \
$RPM_BUILD_ROOT%{_prefix}/lib/locale/ja_JP.OLDSAPSJIS
localedef --no-archive -ci $RPM_BUILD_ROOT%{_datadir}/i18n/locales/es_ES@SAP \ localedef --no-archive -ci $RPM_BUILD_ROOT%{_datadir}/i18n/locales/es_ES@SAP \
-f ISO-8859-1 \ -f ISO-8859-1 \
@ -199,39 +230,91 @@ localedef --no-archive -ci $RPM_BUILD_ROOT%{_datadir}/i18n/locales/pl_PL@HPUX \
-f ISO-8859-2 \ -f ISO-8859-2 \
$RPM_BUILD_ROOT%{_prefix}/lib/locale/pl_PL@HPUX $RPM_BUILD_ROOT%{_prefix}/lib/locale/pl_PL@HPUX
gzip -n $RPM_BUILD_ROOT%{_datadir}/i18n/charmaps/SAPSHIFT_JIS*
%clean %clean
rm -rf $RPM_BUILD_ROOT 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
# 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 SAPSHIFT_JISX0213// SAPSJISX0213//
module SAPSJISX0213// INTERNAL SAPSJISX0213 1
module INTERNAL SAPSJISX0213// SAPSJISX0213 1
EOF
%{_sbindir}/iconvconfig -o %{_libdir}/gconv/gconv-modules.cache --nostdlib %{_libdir}/gconv
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
%{_sbindir}/iconvconfig -o %{_libdir}/gconv/gconv-modules.cache --nostdlib %{_libdir}/gconv
fi
exit 0
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc saplocales-2.2.5/COPYING.LIB %doc saplocales-2.2.5/COPYING.LIB
%{_libdir}/gconv/*
%files common
%defattr(-,root,root,-)
%doc COPYING %doc COPYING
%{_datadir}/i18n/charmaps/*
%{_datadir}/i18n/locales/* %{_datadir}/i18n/locales/*
%dir %{_prefix}/lib/locale %dir %{_prefix}/lib/locale
%{_prefix}/lib/locale/* %{_prefix}/lib/locale/*
%changelog %changelog
* 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.
- Related: rhbz#1737442
* Thu Aug 15 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-13
- Add LD_FLAGS to really fix RPMDiff FAIL: "Not linked with -Wl,-z,now."
- Related: rhbz#1737442
* Mon Aug 05 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-12
- Fix RPMDiff FAIL: "Not linked with -Wl,-z,now."
- Resolves: rhbz#1737442
* Tue May 14 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-11
- Bump release number because the scripts for the CI tests have been updated
- Related: rhbz#1682139
* Tue May 14 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-10
- SAPSJIS and SAPSJISX0213 locales need to be part of compat-locales-sap again
- Resolves: rhbz#1691404
* Tue Apr 23 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-9 * Tue Apr 23 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-9
- Add Conflicts: compat-locales-sap <= 1.0.10-6 to avoid - Add Conflicts: compat-locales-sap <= 1.0.10-6 to avoid
rpmdeplint error because of the architecture change. rpmdeplint error because of the architecture change.
- Related: rhbz#1688815 - Related: rhbz#1698464
* Wed Apr 17 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-8 * Wed Apr 17 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-8
- Remove BuildArch: noarch. The binary locales are architecture - Remove BuildArch: noarch. The binary locales are architecture
dependent. dependent.
- Related: rhbz#1688815 - Related: rhbz#1698464
* Fri Apr 12 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-7 * Fri Apr 12 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-7
- Remove "Requires: glibc-all-langpacks" again and drop the - Remove "Requires: glibc-all-langpacks" again and drop the
posttrans and postun scripts instead. If these scripts are removed, posttrans and postun scripts instead. If these scripts are removed,
glibc-all-langpacks is not needed anymore. glibc-all-langpacks is not needed anymore.
This avoids problems with /usr/sbin/build-locale-archive. This avoids problems with /usr/sbin/build-locale-archive.
- Related: rhbz#1688815 - Resolves: rhbz#1698464
* Wed Apr 10 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-6 * Wed Apr 10 2019 Mike Fabian <mfabian@redhat.com> - 1.0.10-6
- Add "Requires: glibc-all-langpacks" - Add "Requires: glibc-all-langpacks"
- Resolves: rhbz#1688815 (rhel-8.0.1) - Resolves: rhbz#1691988 (rhel-8.1.0)
* Tue Oct 16 2018 Mike Fabian <mfabian@redhat.com> - 1.0.10-5 * Tue Oct 16 2018 Mike Fabian <mfabian@redhat.com> - 1.0.10-5
- Bump release number - Bump release number