#5 Bundle libcroco so we can remove the system package
Merged 3 years ago by suanand. Opened 3 years ago by catanzaro.
rpms/ catanzaro/gettext master  into  master

file modified
+12 -12
@@ -7,7 +7,7 @@ 

  Summary: GNU libraries and utilities for producing multi-lingual messages

  Name: gettext

  Version: %{tarversion}

- Release: 2%{?dist}

+ Release: 3%{?dist}

  # The following are licensed under LGPLv2+:

  # - libintl and its headers

  # - libasprintf and its headers
@@ -65,7 +65,6 @@ 

  BuildRequires: libxml2-devel

  BuildRequires: glib2-devel

  BuildRequires: libacl-devel

- BuildRequires: libcroco-devel

  BuildRequires: libunistring-devel

  # for the tests

  BuildRequires: glibc-langpack-de
@@ -77,8 +76,8 @@ 

  BuildRequires: glibc-langpack-zh

  # Depend on the exact version of the library sub package

  Requires: %{name}-libs%{_isa} = %{version}-%{release}

- # exception for bundled gnulib copylib

  Provides: bundled(gnulib)

+ Provides: bundled(libcroco) = 0.6.12

  

  %description

  The GNU gettext package provides a set of tools and documentation for
@@ -178,12 +177,11 @@ 

  %prep

  %autosetup -n %{name}-%{tarversion} -S git

  

- # Defeat libtextstyle attempt to bundle libcroco and libxml2.  The comments

+ # Defeat libtextstyle attempt to bundle libxml2.  The comments

  # indicate this is done because the libtextstyle authors do not want

  # applications using their code to suffer startup delays due to the

- # relocations in the two libraries.  This is not a sufficient reason for Fedora.

- sed -e 's/\(gl_cv_libcroco_force_included=\)yes/\1no/' \

-     -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \

+ # relocations.  This is not a sufficient reason for Fedora.

+ sed -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \

      -i libtextstyle/configure

  

  
@@ -198,11 +196,10 @@ 

  # prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016)

  export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"

  %endif

- # Fedora's libcroco-devel has an extra "libcroco" path component, and the

- # libxml2-devel package has an extra "libxml2" path component.

- export CPPFLAGS="-I$(ls -1d %{_includedir}/libcroco-*/libcroco) -I%{_includedir}/libxml2"

- # Side effect of unbundling libcroco and libxml2 from libtextstyle.

- export LIBS="-lcroco-0.6 -lxml2"

+ # Fedora's libxml2-devel package has an extra "libxml2" path component.

+ export CPPFLAGS="-I%{_includedir}/libxml2"

+ # Side effect of unbundling libxml2 from libtextstyle.

+ export LIBS="-lxml2"

  %configure --without-included-gettext --enable-nls --disable-static \

      --enable-shared --disable-csharp --disable-rpath \

  %if %{with java}
@@ -398,6 +395,9 @@ 

  %{_mandir}/man1/msghack.1*

  

  %changelog

+ * Wed Jul 29 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 0.20.2-3

+ - Bundle libcroco so we can remove the system package

+ 

  * Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.2-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  

The libcroco package is unmaintained and unmaintained C parsers are problematic for our security posture. It would be nice to remove it. This is safer when bundled by gettext.

@catanzaro thank you!

Getting an error for arch: armv7hl; rest looks okay! This appeared in latest mass rebuild too.

This change is not blocked.

It seems test-perror2 and test-strerror_r are crashing on ARM (though not as a result of this change, since it also occurred in the mass rebuild). This will be hard to solve since there's no easy way to get a backtrace off the builder. :/

Yep.. that is not because of this change :thumbsup:

Pull-Request has been merged by suanand

3 years ago