#26 re-enable libtextstyle
Merged 3 months ago by petersen. Opened 4 months ago by matiwari.
rpms/ matiwari/gettext rawhide  into  rawhide

file modified
+46 -9
@@ -1,10 +1,11 @@ 

  %bcond_with jar

  %bcond_with java

+ %bcond libtextstyle %[0%{?fedora} > 40]

  

  Summary: GNU tools and libraries for localized translated messages

  Name: gettext

  Version: 0.22.4

- Release: 1%{?dist}

+ Release: 2%{?dist}

  

  # The following are licensed under LGPLv2+:

  # - libintl and its headers
@@ -19,14 +20,14 @@ 

  # - libasprintf info files

  # - libtextstyle info files

  # Everything else is GPLv3+

- License: GPL-3.0-or-later and LGPL-2.0-or-later and GFDL-1.2-or-later

+ License: GPL-3.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-or-later

  URL: https://www.gnu.org/software/gettext/

  Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz

  Source2: msghack.py

  Source3: msghack.1

  

- Patch1: gettext-0.22-disable-libtextstyle.patch

- Patch2: gettext-0.21.1-covscan.patch

+ Patch1: gettext-0.21.1-covscan.patch

+ Patch2: gettext-0.22-disable-libtextstyle.patch

  

  # for bootstrapping

  # BuildRequires: autoconf >= 2.62
@@ -89,7 +90,7 @@ 

  

  %package runtime

  Summary: GNU runtime libraries and programs for producing multi-lingual messages

- License: GPL-3.0-or-later and LGPL-2.0-or-later

+ License: GPL-3.0-or-later AND LGPL-2.0-or-later

  # Depend on the exact version of the library sub package

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

  Requires: %{name}-envsubst = %{version}-%{release}
@@ -117,7 +118,7 @@ 

  # autopoint is GPLv3+

  # libasprintf is LGPLv2+

  # libgettextpo is GPLv3+

- License: LGPL-2.0-or-later and GPL-3.0-or-later and GFDL-1.2-or-later

+ License: LGPL-2.0-or-later AND GPL-3.0-or-later AND GFDL-1.2-or-later

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

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

  Requires: %{name}-common-devel = %{version}-%{release}
@@ -138,12 +139,31 @@ 

  Summary: Libraries for %{name}

  # libasprintf is LGPLv2+

  # libgettextpo is GPLv3+

- License: LGPL-2.0-or-later and GPL-3.0-or-later

+ License: LGPL-2.0-or-later AND GPL-3.0-or-later

  Obsoletes: libtextstyle < %{version}-%{release}

  

  %description libs

  This package contains libraries used internationalization support.

  

+ %if %{with libtextstyle}

+ %package -n libtextstyle            

+ Summary: Text styling library            

+ License: GPL-3.0-or-later            

+             

+ %description -n libtextstyle            

+ Library for producing styled text to be displayed in a terminal            

+ emulator.            

+             

+ %package -n libtextstyle-devel            

+ Summary: Development files for libtextstyle            

+ License: GPL-3.0-or-later AND GFDL-1.2-or-later         

+ Requires: libtextstyle%{?_isa} = %{version}-%{release}            

+             

+ %description -n libtextstyle-devel            

+ This package contains all development related files necessary for            

+ developing or compiling applications/libraries that needs text            

+ styling.

+ %endif

  

  %package -n emacs-%{name}

  Summary: Support for editing po files within GNU Emacs
@@ -177,9 +197,10 @@ 

  %prep

  %setup -q

  %patch 1 -p1 -b .orig~

+ %if %{without libtextstyle}

  %patch 2 -p1 -b .orig~

- # patch 1

- automake

+ %endif

+ autoreconf

  

  # Defeat libtextstyle attempt to bundle libxml2.  The comments

  # indicate this is done because the libtextstyle authors do not want
@@ -204,6 +225,7 @@ 

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

  # Side effect of unbundling libxml2 from libtextstyle.

  export LIBS="-lxml2"

+ export CFLAGS="$CFLAGS -Wformat"

  %configure --enable-nls --disable-static \

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

  %if %{with java}
@@ -401,6 +423,18 @@ 

  %{_datadir}/%{name}/libintl.jar

  %endif

  

+ %if %{with libtextstyle}

+ %files -n libtextstyle            

+ %{_libdir}/libtextstyle.so.0*            

+             

+ %files -n libtextstyle-devel            

+ %{_docdir}/libtextstyle/            

+ %{_includedir}/textstyle/            

+ %{_includedir}/textstyle.h            

+ %{_infodir}/libtextstyle*            

+ %{_libdir}/libtextstyle.so

+ %endif

+ 

  %files -n emacs-%{name}

  %dir %{_emacs_sitelispdir}/%{name}

  %{_emacs_sitelispdir}/%{name}/*.elc
@@ -413,6 +447,9 @@ 

  %{_mandir}/man1/msghack.1*

  

  %changelog

+ * Wed Feb 21 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.4-2

+ - Add back libtextstyle library for rawhide (#2264128)

+ 

  * Fri Feb 9 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.4-1

  - update to 0.22.4 release

  - https://savannah.gnu.org/news/?id=10544

  • Add back libtextstyle library file for rawhide only
  • Subpackaged libtextstyle
  • Exported '-Wformat' flag to avoid ' cc1: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security] '
  • bugzilla : #2264128

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/60b87f3982f44b58a15bb6d7a14dc593

rebased onto 6cefe74

4 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/6874546c5c1a4337bdcd9711f74db544

Thanks, can you please add a link to the bugzilla issue too, both in the changelog and commit msg.
I personally just use (#XXXXXX) but some people prefer (rhbz#xxxxxx)

Otherwise LGTM :+1:

Metadata Update from @petersen:
- Request assigned

4 months ago

Actually oops I just noticed from the rpm-lint:

gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle.h
gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle/stdbool.h
gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle/version.h
gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle/woe32dll.h

rebased onto 0ad0de3

4 months ago

Actually oops I just noticed from the rpm-lint:

gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle.h gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle/stdbool.h gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle/version.h gettext-libs.x86_64: W: devel-file-in-non-devel-package /usr/include/textstyle/woe32dll.h

Moved these file paths to devel section

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/9e11ce78d9ad4558aa1a65a08c8da13a

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/630358f4dcb94ab685cae69d65cbad29

Okay a few more things:

  • as the rpmlint says: you didn't bump the release field (though you refer to the bumped release in the changelog)
  • perhaps the libtextstyle should be subpackaged like it was in the past: need to check the old packaging (looking back in git/koji)
  • also I think it might be better to do the change only for rawhide: so then we need to keep the patch and add conditionals around the changes: eg
%if 0%{?fedora} < 41
%patch2 -p1 ...
%endif

(so you need to restore the patch file and change the changelog to say only "for rawhide").

Generally in Fedora we prefer not to diverge branches when possible: so doing this will allow the same commit to be used also for f40 (after merging into the f40 branch).

Eventually we can drop the conditional but it is probably safer not to introduce this larger change this late into the coming F40 release.

rebased onto 64ebfee

4 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/f877951d868f4ba7ab9adc4dae698af3

rebased onto 811f82e

4 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/54bc41f637e94d3a8b4e2571b4a6729b

LGTM now thank you

One last request: let's rename this PR/changelog to be
"add back libtextstyle library for rawhide" (instead of "remove patch").
I think that is easier for users to understand.

Apart from that I think this is good to go now. Did you test installation locally?

Follow the SPDX expressions for license tags. This should be GPL-3.0-or-later

This also need to follow SPDX expression

rebased onto 34afc82

4 months ago

Follow the SPDX expressions for license tags. This should be GPL-3.0-or-later

This also need to follow SPDX expression

Changed License tag to follow SPDX Expression

LGTM now thank you

One last request: let's rename this PR/changelog to be
"add back libtextstyle library for rawhide" (instead of "remove patch").
I think that is easier for users to understand.

Apart from that I think this is good to go now. Did you test installation locally?

Added the suggested changelog

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/987d59f7e2264da2af43945ab01f89f7

I think we are almost there :-)

2 old things I noticed:

  • SPDX uses UPPERCASE for the AND and OR operators: so not your fault, but was already existing problem in the spec file, so I think you can fix this as a separate commit

  • I think it would be more correct to use autoreconf instead of automake: without that configure doesn't actually get regenerated. Also it is only needed with patch1.

It would be nicer to define a macro for libtextstyle, to make this clearer, like this:

At the top add

%bcond libtextstyle %[0%{?fedora} > 40]

Then instead of %if 0%{?fedora} > 40 you can use %if %{with libtextstyle}
and instead of %if 0%{?fedora} < 41 you can then use %if %{without libtextstyle}.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/c64a9eb2c90a40dc99a83c3906c74b9b

Also I think you could rename (--amend) the git commit message like you did for the changelog.

rebased onto 807312a

4 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/9f622bf5b3854bde9f038ecc9f3bdc7d

1 new commit added

  • Use Uppercase AND operator for multiple licenses in SPDX
4 months ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/11cc0221cd4d491a86ecdef89348eeb8

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/ebc038fab2f74bb9ab3964cd8762ea44

JFYI, Today Fedora rawhide builds are failing for error
DEBUG util.py:461: /usr/bin/dnf5: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/e289cf624589410092c598f0d8ba33ab

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/21db422444bd4f01a3986191df37b608

Pull-Request has been merged by petersen

3 months ago
Metadata