From 2d429d16f90437f0d59efb9a7f329bdca7d9896c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 5 Dec 2022 16:20:33 +0900 Subject: [PATCH 01/21] Convert License tag to SPDX. --- paps.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/paps.spec b/paps.spec index cff2c79..22cb19c 100644 --- a/paps.spec +++ b/paps.spec @@ -1,8 +1,8 @@ Name: paps Version: 0.7.1 -Release: 5%{?dist} +Release: 6%{?dist} -License: LGPLv2+ +License: LGPL-2.0-or-later URL: http://paps.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: paps.convs @@ -135,6 +135,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Mon Dec 5 2022 Akira TAGOH - 0.7.1-6 +- Convert License tag to SPDX. + * Fri Jul 22 2022 Fedora Release Engineering - 0.7.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 623777484bf04b13cdd941bcfd5df0b23a6d3480 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 23:21:50 +0000 Subject: [PATCH 02/21] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index 22cb19c..9a112ec 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.7.1 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPL-2.0-or-later URL: http://paps.sourceforge.net/ @@ -135,6 +135,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 0.7.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Mon Dec 5 2022 Akira TAGOH - 0.7.1-6 - Convert License tag to SPDX. From 276295738e0ba8a405e4d23d1b9f5d1ea29b8509 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 7 Feb 2023 17:41:42 +0900 Subject: [PATCH 03/21] New upstream release. Resolves: rhbz#2164212 --- paps.spec | 18 ++++++++++++------ sources | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/paps.spec b/paps.spec index 9a112ec..ddcd95b 100644 --- a/paps.spec +++ b/paps.spec @@ -1,15 +1,16 @@ Name: paps -Version: 0.7.1 -Release: 7%{?dist} +Version: 0.7.9 +Release: 1%{?dist} License: LGPL-2.0-or-later -URL: http://paps.sourceforge.net/ -Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +URL: https://github.com/dov/paps +Source0: https://github.com/dov/paps/archive/v%{name}/%{name}-%{version}.tar.gz Source1: paps.convs -Source2: 29-paps.conf +Source2: 29-paps.conf Source3: http://downloads.sourceforge.net/%{name}/%{name}-0.6.8.tar.gz -BuildRequires: make +BuildRequires: make BuildRequires: pango-devel automake autoconf libtool doxygen cups-devel intltool +BuildRequires: fmt-devel ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832897&group_id=153049&atid=786241 Patch0: paps-0.6.8-shared.patch ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241 @@ -86,6 +87,7 @@ popd %build +./autogen.sh %configure --disable-static make %{?_smp_mflags} @@ -135,6 +137,10 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Tue Feb 7 2023 Akira TAGOH - 0.7.9-1 +- New upstream release. + Resolves: rhbz#2164212 + * Thu Jan 19 2023 Fedora Release Engineering - 0.7.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 15e8e44..666a683 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (paps-0.6.8.tar.gz) = db657d90179e11fe42bbcdbebe09a84f1927c99d0b539c9e29b66b3cb8ffcf33ff500c9d81835ae5a0880382bf8f24801f04742517b76b8e005b125a139d8bba -SHA512 (paps-0.7.1.tar.gz) = a77ed7b5529a7d94fd3c63b272c30e5b5f8af143850ea1ba176e776ad5cc11c27f8b605b95e73cc1ba7c4a1957a444e73c2c9282aa244685f777d1675056d997 +SHA512 (paps-0.7.9.tar.gz) = 78645535c6948dae9b021143419f4c5dfcdcfa18af5ae4bc8bf615aae4e1aac124c450359483bf027ae45e7b99b25732f62bce67bd575d26fb5e44610a65774b From ed223c61ae54f60dc5798a02d553c83f1bedabd3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 7 Feb 2023 18:03:42 +0900 Subject: [PATCH 04/21] Add missing dep --- paps.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index ddcd95b..ce85a02 100644 --- a/paps.spec +++ b/paps.spec @@ -10,7 +10,7 @@ Source2: 29-paps.conf Source3: http://downloads.sourceforge.net/%{name}/%{name}-0.6.8.tar.gz BuildRequires: make BuildRequires: pango-devel automake autoconf libtool doxygen cups-devel intltool -BuildRequires: fmt-devel +BuildRequires: fmt-devel gcc-c++ ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832897&group_id=153049&atid=786241 Patch0: paps-0.6.8-shared.patch ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241 From 379760d3458c0566cc561d445720e576d24c9016 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 1 Mar 2023 14:19:08 +0900 Subject: [PATCH 05/21] New upstream release. Resolves: rhbz#2168726 --- paps.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/paps.spec b/paps.spec index ce85a02..3896660 100644 --- a/paps.spec +++ b/paps.spec @@ -1,5 +1,5 @@ Name: paps -Version: 0.7.9 +Version: 0.8.0 Release: 1%{?dist} License: LGPL-2.0-or-later @@ -137,6 +137,10 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Wed Mar 1 2023 Akira TAGOH - 0.8.0-1 +- New upstream release. + Resolves: rhbz#2168726 + * Tue Feb 7 2023 Akira TAGOH - 0.7.9-1 - New upstream release. Resolves: rhbz#2164212 diff --git a/sources b/sources index 666a683..fcb89c4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (paps-0.6.8.tar.gz) = db657d90179e11fe42bbcdbebe09a84f1927c99d0b539c9e29b66b3cb8ffcf33ff500c9d81835ae5a0880382bf8f24801f04742517b76b8e005b125a139d8bba -SHA512 (paps-0.7.9.tar.gz) = 78645535c6948dae9b021143419f4c5dfcdcfa18af5ae4bc8bf615aae4e1aac124c450359483bf027ae45e7b99b25732f62bce67bd575d26fb5e44610a65774b +SHA512 (paps-0.8.0.tar.gz) = 33afad0e3dae9cef0fb3afb9994650bf1a7326e72782346e05ab91f7c84f092145247658cdf57868105df47a1bd08e1a961c1ef4c07a2a8fd01eaf8ecd9d948a From c702265b939951e7e750e97941396fbf9d510b02 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 1 Mar 2023 15:42:29 +0900 Subject: [PATCH 06/21] New upstream release. Resolves: rhbz#2168726 --- paps-fix-build.patch | 85 ++++++++++++++++++++++++++++++++++++++ paps-fix-src-to-paps.patch | 18 ++++++++ paps.spec | 7 ++++ 3 files changed, 110 insertions(+) create mode 100644 paps-fix-build.patch create mode 100644 paps-fix-src-to-paps.patch diff --git a/paps-fix-build.patch b/paps-fix-build.patch new file mode 100644 index 0000000..e77f387 --- /dev/null +++ b/paps-fix-build.patch @@ -0,0 +1,85 @@ +From e2180b2e1493abc2a8d1165e10bf264d50fac0ae Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 1 Mar 2023 15:24:27 +0900 +Subject: [PATCH] Fix the build issue + +Some code ignores a return value of g_string_free() and that causes: + +ignoring return value of 'gchar* g_string_free_and_steal(GString*)' declared with attribute 'warn_unused_result' [-Wunused-result] + +This fixes it. +--- + src/paps.cc | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +diff --git a/src/paps.cc b/src/paps.cc +index cb48ddc..429b764 100644 +--- a/src/paps.cc ++++ b/src/paps.cc +@@ -368,6 +368,7 @@ copy_pango_parse_enum (GType type, + { + int i; + GString *s = g_string_new (nullptr); ++ gchar *gstr; + + for (i = 0, v = g_enum_get_value (klass, i); v; + i++ , v = g_enum_get_value (klass, i)) +@@ -382,10 +383,10 @@ copy_pango_parse_enum (GType type, + G_ENUM_CLASS_TYPE_NAME(klass), + s->str); + +- if (possible_values) +- *possible_values = s->str; ++ gstr = g_string_free (s, possible_values ? false : true); + +- g_string_free (s, possible_values ? false : true); ++ if (possible_values) ++ *possible_values = gstr; + } + } + +@@ -1001,7 +1002,7 @@ read_file (FILE *file, + if (ferror (file)) + { + fprintf(stderr, _("%s: Error reading file.\n"), g_get_prgname ()); +- g_string_free (inbuf, true); ++ (void) g_string_free (inbuf, true); + exit(1); + } + else if (bp == nullptr) +@@ -1043,8 +1044,7 @@ read_file (FILE *file, + if (inbuf->len && inbuf->str[inbuf->len-1] != '\n') + g_string_append(inbuf, "\n"); + +- text = inbuf->str; +- g_string_free (inbuf, false); ++ text = g_string_free (inbuf, false); + + if (encoding != nullptr && cvh != nullptr) + g_iconv_close(cvh); +@@ -1671,7 +1671,11 @@ get_date() + fprintf(stderr, _("%1$s: Error while converting date string from '%2$s' to UTF-8.\n"), + g_get_prgname(), get_encoding()); + /* Return the unconverted string. */ +- g_string_free(inbuf, false); ++ /* ++ * inbuf isn't used here, but a few memory is ++ * allocated by default. so it should be freed anyway. ++ */ ++ (void) g_string_free(inbuf, true); + g_iconv_close(cvh); + return date; + } +@@ -1679,8 +1683,7 @@ get_date() + obuffer[BUFSIZE * 6 - 1 - oblen] = 0; + g_string_append(inbuf, bp); + +- date_utf8 = inbuf->str; +- g_string_free(inbuf, false); ++ date_utf8 = g_string_free(inbuf, false); + g_iconv_close(cvh); + } + +-- +2.39.2 + diff --git a/paps-fix-src-to-paps.patch b/paps-fix-src-to-paps.patch new file mode 100644 index 0000000..d18f8af --- /dev/null +++ b/paps-fix-src-to-paps.patch @@ -0,0 +1,18 @@ +diff -pruN paps-0.8.0.orig/scripts/src-to-paps paps-0.8.0/scripts/src-to-paps +--- paps-0.8.0.orig/scripts/src-to-paps 2023-02-09 16:27:38.000000000 +0900 ++++ paps-0.8.0/scripts/src-to-paps 2023-03-01 15:00:27.801416563 +0900 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + ###################################################################### + # Use GNU source-hightlight to turn source code into pango markup +@@ -49,7 +49,7 @@ def arg_if_not_none(param_name, val): + # Defaults + + # TBD - Make this a configuration variable +-pango_outlang_path = '/usr/local/share/paps/pango_markup.outlang' ++pango_outlang_path = '/usr/share/paps/pango_markup.outlang' + + parser = argparse.ArgumentParser(description='Process a file') + parser.add_argument('-o', '--output', diff --git a/paps.spec b/paps.spec index 3896660..d92ce8a 100644 --- a/paps.spec +++ b/paps.spec @@ -43,6 +43,9 @@ Patch59: %{name}-ft-header.patch Patch60: %{name}-a3.patch ## rhbz#1214939 Patch61: %{name}-fix-paper-size-truncate.patch +### For paps +Patch100: %{name}-fix-src-to-paps.patch +Patch101: %{name}-fix-build.patch Summary: Plain Text to PostScript converter %description @@ -62,6 +65,8 @@ This package contains a CUPS filter based on paps. %prep %setup -q -a 3 +%patch100 -p1 -b .src-to-paps +%patch101 -p1 -b .build pushd %{name}-0.6.8 %patch0 -p1 -b .shared %patch1 -p1 -b .wordwrap @@ -125,6 +130,8 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %files %doc AUTHORS COPYING.LIB README %{_bindir}/paps +%{_bindir}/src-to-paps +%{_datadir}/paps/pango_markup.outlang %{_mandir}/man1/paps.1* %files -n texttopaps From c2bb76914bf688903a2f3aa3daa76d4730e07784 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 13 Apr 2023 12:17:12 +0200 Subject: [PATCH 07/21] C99 compatibility fixes for paps 0.6.8 Related to: --- paps-c99.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ paps.spec | 7 ++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 paps-c99.patch diff --git a/paps-c99.patch b/paps-c99.patch new file mode 100644 index 0000000..115043e --- /dev/null +++ b/paps-c99.patch @@ -0,0 +1,44 @@ +Use AC_USE_SYSTEM_EXTENSIONS and include , so that +makes a declaration of wcwidth available. Include +for a declaration of g_vasprintf. This avoids implicit function +declarations and build failures with future compilers. + +No need to upstream this because it only impacts the bundled 0.6.8 +sources, the later 0.8.0 version has already been fixed upstream. The +g_vasprintf call was introduced in the paps-0.6.6-lcnumeric.patch +downstream patch. + +diff -ur paps-0.8.0.orig/paps-0.6.8/configure.in paps-0.8.0/paps-0.6.8/configure.in +--- paps-0.8.0.orig/paps-0.6.8/configure.in 2023-04-13 11:56:29.571277839 +0200 ++++ paps-0.8.0/paps-0.6.8/configure.in 2023-04-13 12:00:03.228135149 +0200 +@@ -6,6 +6,7 @@ + AC_LANG_C + AC_PROG_CC + AM_PROG_LIBTOOL ++AC_USE_SYSTEM_EXTENSIONS + + dnl ====================================================== + dnl check for CUPS +diff -ur paps-0.8.0.orig/paps-0.6.8/src/paps.c paps-0.8.0/paps-0.6.8/src/paps.c +--- paps-0.8.0.orig/paps-0.6.8/src/paps.c 2023-04-13 11:56:29.583277719 +0200 ++++ paps-0.8.0/paps-0.6.8/src/paps.c 2023-04-13 12:02:28.958673663 +0200 +@@ -20,7 +20,7 @@ + * + */ + +- ++#include + #include + #include + #include "libpaps.h" +diff -ur paps-0.8.0.orig/paps-0.6.8/src/libpaps.c paps-0.8.0/paps-0.6.8/src/libpaps.c +--- paps-0.8.0.orig/paps-0.6.8/src/libpaps.c 2023-04-13 11:56:29.581277739 +0200 ++++ paps-0.8.0/paps-0.6.8/src/libpaps.c 2023-04-13 12:07:17.504779917 +0200 +@@ -23,6 +23,7 @@ + + #include "libpaps.h" + ++#include + #include + #include + #include diff --git a/paps.spec b/paps.spec index d92ce8a..c028639 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -43,6 +43,7 @@ Patch59: %{name}-ft-header.patch Patch60: %{name}-a3.patch ## rhbz#1214939 Patch61: %{name}-fix-paper-size-truncate.patch +Patch62: paps-c99.patch ### For paps Patch100: %{name}-fix-src-to-paps.patch Patch101: %{name}-fix-build.patch @@ -86,6 +87,7 @@ pushd %{name}-0.6.8 %patch59 -p1 -b .ft-header %patch60 -p1 -b .a3 %patch61 -p1 -b .paper-size +%patch62 -p2 -b .configure-c99 libtoolize -f -c autoreconf -f -i popd @@ -144,6 +146,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Thu Apr 13 2023 Florian Weimer - 0.8.0-2 +- C99 compatibility fixes for paps 0.6.8 + * Wed Mar 1 2023 Akira TAGOH - 0.8.0-1 - New upstream release. Resolves: rhbz#2168726 From b1d34635691c50529c775400fd9c5b4a63fbc22d Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Wed, 28 Jun 2023 11:18:55 +0200 Subject: [PATCH 08/21] Rebuilt due to fmt 10 update. --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index c028639..1f0e06f 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -146,6 +146,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Wed Jun 28 2023 Vitaly Zaitsev - 0.8.0-3 +- Rebuilt due to fmt 10 update. + * Thu Apr 13 2023 Florian Weimer - 0.8.0-2 - C99 compatibility fixes for paps 0.6.8 From cb2b7836e339287223b21a2b422d1406c79d5ad4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 18:37:46 +0000 Subject: [PATCH 09/21] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index 1f0e06f..e7e75ff 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -146,6 +146,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 0.8.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jun 28 2023 Vitaly Zaitsev - 0.8.0-3 - Rebuilt due to fmt 10 update. From 740450aa394ea2dc4f2944cf5fdbb97d82018b6e Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 13 Aug 2023 23:25:12 -0400 Subject: [PATCH 10/21] Use fmt in header-only mode in RHEL builds This allows fmt to be buildroot-only and avoids the need to support the fmt runtime library, which frequently breaks ABI and is therefore unwanted, in RHEL. --- paps.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index e7e75ff..db80552 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -95,6 +95,10 @@ popd %build ./autogen.sh +%set_build_flags +%if 0%{?rhel} +CXXFLAGS="$CXXFLAGS -DFMT_HEADER_ONLY" +%endif %configure --disable-static make %{?_smp_mflags} @@ -146,6 +150,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Mon Aug 14 2023 Yaakov Selkowitz - 0.8.0-5 +- Use fmt in header-only mode in RHEL builds + * Thu Jul 20 2023 Fedora Release Engineering - 0.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 10c01b83d58fa23b9963a904a81b3fd92ae222b8 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 17 Jan 2024 22:30:12 +0900 Subject: [PATCH 11/21] Fix C type error in paps 0.6.8. Resolves: rhbz#2256906 --- paps-fix-cpi.patch | 2 +- paps.spec | 48 +++++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/paps-fix-cpi.patch b/paps-fix-cpi.patch index f917296..7bc3f61 100644 --- a/paps-fix-cpi.patch +++ b/paps-fix-cpi.patch @@ -310,7 +310,7 @@ index 334d547..72dbaad 100644 + + para->length = i; + next = g_utf8_offset_to_pointer(para->text, para->length); -+ wc = g_utf8_prev_char(next); ++ wc = g_utf8_get_char(g_utf8_prev_char(next)); + } else { + pango_layout_set_text(para->layout, para->text, para->length); + } diff --git a/paps.spec b/paps.spec index db80552..c7b41d2 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -66,28 +66,28 @@ This package contains a CUPS filter based on paps. %prep %setup -q -a 3 -%patch100 -p1 -b .src-to-paps -%patch101 -p1 -b .build +%patch 100 -p1 -b .src-to-paps +%patch 101 -p1 -b .build pushd %{name}-0.6.8 -%patch0 -p1 -b .shared -%patch1 -p1 -b .wordwrap -%patch2 -p1 -b .langinfo -%patch3 -p1 -b .lcnumeric -%patch4 -p1 -b .exitcode -%patch5 -p1 -b .manpage -%patch50 -p1 -b .cups -%patch51 -p1 -b .cpilpi -%patch52 -p1 -b .dsc -%patch53 -p1 -b .autoconf262 -%patch54 -p1 -b .fixcpi -%patch55 -p1 -b .loop -%patch56 -p1 -b .tab -%patch57 -p1 -b .weak-symbol -%patch58 -p1 -b .fsf -%patch59 -p1 -b .ft-header -%patch60 -p1 -b .a3 -%patch61 -p1 -b .paper-size -%patch62 -p2 -b .configure-c99 +%patch 0 -p1 -b .shared +%patch 1 -p1 -b .wordwrap +%patch 2 -p1 -b .langinfo +%patch 3 -p1 -b .lcnumeric +%patch 4 -p1 -b .exitcode +%patch 5 -p1 -b .manpage +%patch 50 -p1 -b .cups +%patch 51 -p1 -b .cpilpi +%patch 52 -p1 -b .dsc +%patch 53 -p1 -b .autoconf262 +%patch 54 -p1 -b .fixcpi +%patch 55 -p1 -b .loop +%patch 56 -p1 -b .tab +%patch 57 -p1 -b .weak-symbol +%patch 58 -p1 -b .fsf +%patch 59 -p1 -b .ft-header +%patch 60 -p1 -b .a3 +%patch 61 -p1 -b .paper-size +%patch 62 -p2 -b .configure-c99 libtoolize -f -c autoreconf -f -i popd @@ -150,6 +150,10 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Wed Jan 17 2024 Akira TAGOH - 0.8.0-6 +- Fix C type error in paps 0.6.8. + Resolves: rhbz#2256906 + * Mon Aug 14 2023 Yaakov Selkowitz - 0.8.0-5 - Use fmt in header-only mode in RHEL builds From cabf428669f07a8ccddead10c7b2571441458c6f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 11:49:59 +0000 Subject: [PATCH 12/21] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index c7b41d2..2673057 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -150,6 +150,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 0.8.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jan 17 2024 Akira TAGOH - 0.8.0-6 - Fix C type error in paps 0.6.8. Resolves: rhbz#2256906 From 3046fea23374842b2353ba25f9c1697fac9bc173 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 11:59:09 +0000 Subject: [PATCH 13/21] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index 2673057..b64bc7e 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -150,6 +150,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 0.8.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 0.8.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 1994daf88434b6d0eee029bfa0a5162dcf348b10 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 7 Jun 2024 23:47:29 +0900 Subject: [PATCH 14/21] Own /usr/share/paps Resolves: rhbz#2283284 --- paps.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index b64bc7e..1005302 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -135,6 +135,7 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %files %doc AUTHORS COPYING.LIB README +%dir %{_datadir}/paps %{_bindir}/paps %{_bindir}/src-to-paps %{_datadir}/paps/pango_markup.outlang @@ -150,6 +151,10 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Fri Jun 7 2024 Akira TAGOH - 0.8.0-9 +- Own /usr/share/paps + Resolves: rhbz#2283284 + * Thu Jan 25 2024 Fedora Release Engineering - 0.8.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From f245dbf47daeb0230e3ceacbfc62b455155589ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 21:27:06 +0000 Subject: [PATCH 15/21] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index 1005302..b2b95df 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 9%{?dist} +Release: 10%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -151,6 +151,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 0.8.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 7 2024 Akira TAGOH - 0.8.0-9 - Own /usr/share/paps Resolves: rhbz#2283284 From 529b6586b2fc3417510d37a4b1dc57092a215c63 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 25 Jul 2024 20:49:12 +0900 Subject: [PATCH 16/21] ci: Use tmt based test cases --- .fmf/version | 1 + plans/basic.fmf | 5 +++++ tests/basic/main.fmf | 5 +++++ tests/basic/test.sh | 21 +++++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/basic.fmf create mode 100644 tests/basic/main.fmf create mode 100755 tests/basic/test.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/basic/main.fmf b/tests/basic/main.fmf new file mode 100644 index 0000000..d9d7de5 --- /dev/null +++ b/tests/basic/main.fmf @@ -0,0 +1,5 @@ +summary: Basic test +require: + - paps +test: ./test.sh +framework: beakerlib diff --git a/tests/basic/test.sh b/tests/basic/test.sh new file mode 100755 index 0000000..e07c777 --- /dev/null +++ b/tests/basic/test.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "set -o pipefail" + rlPhaseEnd + + rlPhaseStartTest + rlRun "paps --help | tee output" 0 "Check help message" + rlAssertGrep "paps" "output" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From 2728eeda35b15427986d15c70e2d81b300531c0f Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 12 Sep 2024 21:33:49 -0400 Subject: [PATCH 17/21] Fix build with glib 2.82 g_utf8_next_char no longer includes a cast to char*: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4016 --- paps-glib282.patch | 34 ++++++++++++++++++++++++++++++++++ paps.spec | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 paps-glib282.patch diff --git a/paps-glib282.patch b/paps-glib282.patch new file mode 100644 index 0000000..23bd2b4 --- /dev/null +++ b/paps-glib282.patch @@ -0,0 +1,34 @@ +g_utf8_next_char no longer includes a cast to char* as of 2.81.0: + +https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4016 + +diff -up a/src/paps.cc b/src/paps.cc +--- a/src/paps.cc 2024-09-12 19:21:02.858439427 -0400 ++++ b/src/paps.cc 2024-09-12 21:15:46.905955152 -0400 +@@ -1115,7 +1115,7 @@ split_text_into_paragraphs (PangoContext + while (p != nullptr && *p) + { + wc = g_utf8_get_char (p); +- next = g_utf8_next_char (p); ++ next = (char *) g_utf8_next_char (p); + if (wc == (gunichar)-1) + { + fprintf (stderr, _("%s: Invalid character in input\n"), g_get_prgname ()); +@@ -1130,7 +1130,7 @@ split_text_into_paragraphs (PangoContext + para->length = p - last_para; + /* handle dos line breaks */ + if (wc == '\r' && *next == '\n') +- next = g_utf8_next_char(next); ++ next = (char *) g_utf8_next_char(next); + para->layout = pango_layout_new (pango_context); + + if (page_layout->cpi > 0.0L) +@@ -1201,7 +1201,7 @@ split_text_into_paragraphs (PangoContext + g_free (newtext); + + para->length = i; +- next = g_utf8_offset_to_pointer (para->text, para->length); ++ next = (char *) g_utf8_offset_to_pointer (para->text, para->length); + wc = g_utf8_get_char (g_utf8_prev_char (next)); + } + else diff --git a/paps.spec b/paps.spec index b2b95df..bfc18b5 100644 --- a/paps.spec +++ b/paps.spec @@ -47,6 +47,7 @@ Patch62: paps-c99.patch ### For paps Patch100: %{name}-fix-src-to-paps.patch Patch101: %{name}-fix-build.patch +Patch102: %{name}-glib282.patch Summary: Plain Text to PostScript converter %description @@ -68,6 +69,7 @@ This package contains a CUPS filter based on paps. %setup -q -a 3 %patch 100 -p1 -b .src-to-paps %patch 101 -p1 -b .build +%patch 102 -p1 -b .glib282 pushd %{name}-0.6.8 %patch 0 -p1 -b .shared %patch 1 -p1 -b .wordwrap From a06bf824ed44485358013afd68e399868182be46 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 13 Sep 2024 21:14:44 +0900 Subject: [PATCH 18/21] Fix build with glib 2.82 Patch from Yaakov Selkowitz --- paps-0.6.8-glib282.patch | 12 ++++++++++++ paps.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 paps-0.6.8-glib282.patch diff --git a/paps-0.6.8-glib282.patch b/paps-0.6.8-glib282.patch new file mode 100644 index 0000000..7d3d165 --- /dev/null +++ b/paps-0.6.8-glib282.patch @@ -0,0 +1,12 @@ +diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c +--- paps-0.6.8.orig/src/paps.c 2024-09-13 21:07:13.225683344 +0900 ++++ paps-0.6.8/src/paps.c 2024-09-13 21:10:24.177041518 +0900 +@@ -784,7 +784,7 @@ split_text_into_paragraphs (PangoContext + while (p != NULL && *p) + { + wc = g_utf8_get_char (p); +- next = g_utf8_next_char (p); ++ next = (char *) g_utf8_next_char (p); + if (wc == (gunichar)-1) + { + fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ()); diff --git a/paps.spec b/paps.spec index bfc18b5..835d60c 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 10%{?dist} +Release: 11%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -44,6 +44,7 @@ Patch60: %{name}-a3.patch ## rhbz#1214939 Patch61: %{name}-fix-paper-size-truncate.patch Patch62: paps-c99.patch +Patch63: paps-0.6.8-glib282.patch ### For paps Patch100: %{name}-fix-src-to-paps.patch Patch101: %{name}-fix-build.patch @@ -90,6 +91,7 @@ pushd %{name}-0.6.8 %patch 60 -p1 -b .a3 %patch 61 -p1 -b .paper-size %patch 62 -p2 -b .configure-c99 +%patch 63 -p1 -b .glib282 libtoolize -f -c autoreconf -f -i popd @@ -153,6 +155,10 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Fri Sep 13 2024 Akira TAGOH - 0.8.0-11 +- Fix build with glib 2.82 + Patch from Yaakov Selkowitz + * Thu Jul 18 2024 Fedora Release Engineering - 0.8.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 454fff4bc5a65e11d451f0e3202cdcec4afa4bc0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 22:21:37 +0000 Subject: [PATCH 19/21] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index 835d60c..6b1eab0 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 11%{?dist} +Release: 12%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -155,6 +155,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 0.8.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Sep 13 2024 Akira TAGOH - 0.8.0-11 - Fix build with glib 2.82 Patch from Yaakov Selkowitz From efdad73179345079891a5cd18e17c2030490d63b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 27 Jan 2025 18:49:59 +0900 Subject: [PATCH 20/21] Fix FTBFS Resolves: rhbz#2341001 --- paps-0.6.8-ftbfs.patch | 13 +++++++++++++ paps.spec | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 paps-0.6.8-ftbfs.patch diff --git a/paps-0.6.8-ftbfs.patch b/paps-0.6.8-ftbfs.patch new file mode 100644 index 0000000..01bdb5c --- /dev/null +++ b/paps-0.6.8-ftbfs.patch @@ -0,0 +1,13 @@ +バイナリーファイル paps-0.6.8.orig/src/paps-paps.o とpaps-0.6.8/src/paps-paps.o は異なります +diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c +--- paps-0.6.8.orig/src/paps.c 2025-01-27 18:18:12.130570673 +0900 ++++ paps-0.6.8/src/paps.c 2025-01-27 18:47:05.214883811 +0900 +@@ -515,7 +515,7 @@ int main(int argc, char *argv[]) + } /* if (!cups_mode) */ + + paps = paps_new(); +- pango_context = paps_get_pango_context (paps); ++ pango_context = paps_get_pango_context (); + + /* Setup pango */ + pango_context_set_language (pango_context, get_language ()); diff --git a/paps.spec b/paps.spec index 6b1eab0..164b3e2 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 12%{?dist} +Release: 13%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -45,6 +45,7 @@ Patch60: %{name}-a3.patch Patch61: %{name}-fix-paper-size-truncate.patch Patch62: paps-c99.patch Patch63: paps-0.6.8-glib282.patch +Patch64: paps-0.6.8-ftbfs.patch ### For paps Patch100: %{name}-fix-src-to-paps.patch Patch101: %{name}-fix-build.patch @@ -92,6 +93,7 @@ pushd %{name}-0.6.8 %patch 61 -p1 -b .paper-size %patch 62 -p2 -b .configure-c99 %patch 63 -p1 -b .glib282 +%patch 64 -p1 -b .ftbfs libtoolize -f -c autoreconf -f -i popd @@ -155,6 +157,10 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Mon Jan 27 2025 Akira TAGOH - 0.8.0-13 +- Fix FTBFS + Resolves: rhbz#2341001 + * Fri Jan 17 2025 Fedora Release Engineering - 0.8.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 6b8042a73135a3411b9af1b2ec8853eaa4639b4d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 23:56:45 +0000 Subject: [PATCH 21/21] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- paps.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paps.spec b/paps.spec index 164b3e2..2177152 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.8.0 -Release: 13%{?dist} +Release: 14%{?dist} License: LGPL-2.0-or-later URL: https://github.com/dov/paps @@ -157,6 +157,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 0.8.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jan 27 2025 Akira TAGOH - 0.8.0-13 - Fix FTBFS Resolves: rhbz#2341001