From 5ae4f8e8e701419fbb52c0fdac8205cf00330962 Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Mon, 15 Jul 2024 19:13:33 +0530 Subject: [PATCH] Resolves: RHEL-46908 - Fix file hyph_pt_PT.dic permission --- hyphen-pt.spec | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hyphen-pt.spec b/hyphen-pt.spec index 6286580..8c9fa1d 100644 --- a/hyphen-pt.spec +++ b/hyphen-pt.spec @@ -2,7 +2,7 @@ Name: hyphen-pt Summary: Portuguese hyphenation rules %global upstreamid 20140727 Version: 0.%{upstreamid} -Release: 9%{?dist} +Release: 10%{?dist} # latest seen in Hifenizador section of https://pt-br.libreoffice.org/projetos/vero/ Source0: https://pt-br.libreoffice.org/assets/Uploads/PT-BR-Documents/VERO/hyphptBR-213.zip # The contents of Source1 are the same rules that are currently (2022-05-16) in @@ -31,8 +31,23 @@ Brazilian Portuguese hyphenation rules. %autosetup -c unzip -q -o %{SOURCE1} +# Fix world writable permission on files +chmod 644 hyph_pt_PT.dic README_hyph_pt_PT.txt + +for i in README_hyph_pt_BR.txt; do + if ! iconv -f utf-8 -t utf-8 -o /dev/null $i > /dev/null 2>&1; then + iconv -f ISO-8859-1 -t UTF-8 $i > $i.new + touch -r $i $i.new + mv -f $i.new $i + fi + tr -d '\r' < $i > $i.new + touch -r $i $i.new + mv -f $i.new $i +done + + %build -chmod -x * +#nothing to build here %install mkdir -p $RPM_BUILD_ROOT/%{_datadir}/hyphen @@ -53,6 +68,9 @@ done %{_datadir}/hyphen/hyph_pt_BR.dic %changelog +* Mon Jul 15 2024 Parag Nemade - 0.20140727-10 +- Resolves: RHEL-46908 - Fix file hyph_pt_PT.dic permission + * Mon Jun 24 2024 Troy Dawson - 0.20140727-9 - Bump release for June 2024 mass rebuild