From 4d272fa29dd011435c522cec44cc4a20b6d10f54 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 28 Sep 2022 11:56:31 -0400 Subject: [PATCH 01/15] Drop conditionals for Fedora and other EPELs --- advancecomp.spec | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/advancecomp.spec b/advancecomp.spec index 5610ada..a4459a5 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -36,23 +36,15 @@ BuildRequires: dos2unix # System library supported by upstream BuildRequires: zlib-devel -%if 0%{?el7} -# No libdeflate package in EPEL7 -Provides: bundled(libdeflate) = 0.6 -%else # Unbundled downstream BuildRequires: pkgconfig(libdeflate) -%endif -%if 0%{?el9} || 0%{?el8} || 0%{?el7} -# No libzopfli/zopfli-devel in these distributions +# No libzopfli/zopfli-devel in EPEL9. +# # Version number based on HISTORY, which mentions that upstream commit # 6818a0859063b946094fb6f94732836404a0d89a was used from # https://github.com/google/zopfli/. -Provides: bundled(zopfli) = 1.0.2%{?!el7:^20160527git6818a08} -%else -BuildRequires: zopfli-devel -%endif +Provides: bundled(zopfli) = 1.0.2^20160527git6818a08 # From 7z/README: # @@ -91,7 +83,6 @@ This package contains: %autosetup -p1 dos2unix -k doc/*.txt -%if ! 0%{?el7} # Patch out bundled libdeflate rm -rvf libdeflate sed -r -i '/libdeflate[\/_]/d' Makefile.am @@ -101,39 +92,16 @@ find . -type f -exec gawk \ '/^[[:blank:]]*#include.*libdeflate/ { print FILENAME; nextfile }' \ '{}' '+' | xargs -r -t sed -r -i 's@^([[:blank:]]*#include.*)libdeflate/@\1@' -%endif - -%if !(0%{?el9} || 0%{?el8} || 0%{?el7}) -# Patch out bundled zopfli -rm -rvf zopfli -sed -r -i \ - -e '/zopfli[\/_]/d' \ - -e 's/((\(7z_SOURCES\)|WindowOut\.h).*)[[:blank:]]*\\/\1/' \ - Makefile.am -# Fix up #include paths. The find-then-modify pattern keeps us from discarding -# mtimes on any sources that do not need modification. -find . -type f -exec gawk \ - '/^[[:blank:]]*#include.*zopfli/ { print FILENAME; nextfile }' \ - '{}' '+' | - xargs -r -t sed -r -i -e 's@^([[:blank:]]*#include.*)zopfli/@\1@' -%endif %build %set_build_flags autoreconf --force --install --verbose -%if ! 0%{?el7} # Link against system libdeflate export CFLAGS="$(pkgconf --cflags libdeflate) ${CFLAGS-}" export CXXFLAGS="$(pkgconf --cflags libdeflate) ${CXXFLAGS-}" export LDFLAGS="$(pkgconf --libs libdeflate) ${LDFLAGS-}" -%endif - -%if !(0%{?el9} || 0%{?el8} || 0%{?el7}) -# Link against system zopfli -export LDFLAGS="-lzopfli ${LDFLAGS-}" -%endif %configure %make_build From 240798db1253847af67be6972d932b7ee43ec343 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 28 Sep 2022 17:21:51 -0400 Subject: [PATCH 02/15] Stricter file globs --- advancecomp.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/advancecomp.spec b/advancecomp.spec index a4459a5..9ce60bc 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -113,11 +113,13 @@ export LDFLAGS="$(pkgconf --libs libdeflate) ${LDFLAGS-}" %files %license COPYING -%doc AUTHORS HISTORY README -%doc doc/adv*.txt +%doc AUTHORS +%doc HISTORY +%doc README +%doc doc/adv{def,mng,png,zip}.txt -%{_bindir}/* -%{_mandir}/man1/* +%{_bindir}/adv{def,mng,png,zip} +%{_mandir}/man1/adv{def,mng,png,zip}.1* %changelog From d231025a38ddf13ba4e77f84759debfeabc70582 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 28 Sep 2022 17:24:48 -0400 Subject: [PATCH 03/15] Add a comment about upstream tests --- advancecomp.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/advancecomp.spec b/advancecomp.spec index 9ce60bc..fb58992 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -111,6 +111,11 @@ export LDFLAGS="$(pkgconf --libs libdeflate) ${LDFLAGS-}" %make_install +# We don’t run upstream tests (%%make_build check) because they are too +# brittle, expecting recompressed outputs to be identical. Across platforms, +# compilers, and unbundled library versions, this doesn’t hold up. + + %files %license COPYING %doc AUTHORS From ae9b9166a2074ac1cf8ef03f74e9230dc4881098 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 29 Sep 2022 08:21:33 -0400 Subject: [PATCH 04/15] =?UTF-8?q?Identify=20bundled=207-Zip=20as=20?= =?UTF-8?q?=E2=80=9C7zip=E2=80=9D=20rather=20than=20=E2=80=9C7z=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is closer to the upstream name, to “p7zip”, and to existing usage in the “retroarch” package. --- advancecomp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advancecomp.spec b/advancecomp.spec index fb58992..32e1442 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -62,7 +62,7 @@ Provides: bundled(zopfli) = 1.0.2^20160527git6818a08 # library, and because the implementation is modified, there is no possibility # of unbundling. Note that this was forked from the original 7-Zip, not from # p7zip. -Provides: bundled(7z) +Provides: bundled(7zip) %description AdvanceCOMP contains recompression utilities for your .zip archives, From 58d6ca937795926414238429e9a76b5dd38bcaf4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 23 Nov 2022 15:45:08 -0500 Subject: [PATCH 05/15] Update to 2.4 (close RHBZ#2145023) - Security fix for CVE-2022-35014, CVE-2022-35015, CVE-2022-35016, CVE-2022-35017, CVE-2022-35018, CVE-2022-35019, CVE-2022-35020 --- .gitignore | 1 + advancecomp.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2ec630f..90d97e9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ advancecomp-1.15.tar.gz /advancecomp-1.23.tar.gz /advancecomp-2.1.tar.gz /advancecomp-2.3.tar.gz +/advancecomp-2.4.tar.gz diff --git a/advancecomp.spec b/advancecomp.spec index 32e1442..643e388 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -1,5 +1,5 @@ Name: advancecomp -Version: 2.3 +Version: 2.4 Release: %autorelease Summary: Recompression utilities for .png, .mng, .zip and .gz files diff --git a/sources b/sources index 59b074f..3b60e66 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (advancecomp-2.3.tar.gz) = 129bb820a044b03b94d9980c7fc675ee5c273ba8ba84f1fdd341c6b2d9847c3f379cc21e64bb75c0a3c5a45a3df9e560d92143728adb4e8834ae0525ff7d5d1c +SHA512 (advancecomp-2.4.tar.gz) = 648e89b684725743df4338a0958cdb9c37a7676f4b1a7209d016be0348d089eae9a0d20b3531838fc42887990f4c57749926c27e619887d8106a197961696a06 From 8889cf26b556e55d3446a9d7f9385eaabe2cabf2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 22 Jan 2023 13:43:51 -0500 Subject: [PATCH 06/15] Update to 2.5 (close RHBZ#2162990; fix RHBZ#2161641) --- .gitignore | 1 + advancecomp.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 90d97e9..91d5d6f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ advancecomp-1.15.tar.gz /advancecomp-2.1.tar.gz /advancecomp-2.3.tar.gz /advancecomp-2.4.tar.gz +/advancecomp-2.5.tar.gz diff --git a/advancecomp.spec b/advancecomp.spec index 643e388..97cc941 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -1,5 +1,5 @@ Name: advancecomp -Version: 2.4 +Version: 2.5 Release: %autorelease Summary: Recompression utilities for .png, .mng, .zip and .gz files diff --git a/sources b/sources index 3b60e66..04420d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (advancecomp-2.4.tar.gz) = 648e89b684725743df4338a0958cdb9c37a7676f4b1a7209d016be0348d089eae9a0d20b3531838fc42887990f4c57749926c27e619887d8106a197961696a06 +SHA512 (advancecomp-2.5.tar.gz) = c508526415dc002dad442e3f55202494ab2c49ecac3f5ea6e1a3fe27d224dd9a1a33dace02f59c18123d3f4bc74e3f03556b1cff6541cb88dcaaa32ac35c0043 From 157407d90f359a4a88b98146432814403bd25483 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 11 May 2023 10:19:34 -0400 Subject: [PATCH 07/15] Add an rpmlintrc file --- advancecomp.rpmlintrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 advancecomp.rpmlintrc diff --git a/advancecomp.rpmlintrc b/advancecomp.rpmlintrc new file mode 100644 index 0000000..f783f4d --- /dev/null +++ b/advancecomp.rpmlintrc @@ -0,0 +1,4 @@ +# There is really no version information available. +addFilter(r' unversioned-explicit-provides bundled\(7zip\)') +# Every RPM has this… +addFilter(r' strange-permission advancecomp\.spec 600$') From e657c43f327efa71f0cc0b6cb362eb4eb71ff8c1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 26 May 2023 09:27:20 -0400 Subject: [PATCH 08/15] Do not number the sole Source [skip changelog] --- advancecomp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advancecomp.spec b/advancecomp.spec index 97cc941..6770c04 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -22,7 +22,7 @@ Summary: Recompression utilities for .png, .mng, .zip and .gz files # interpret this as an overall license of GPL-3.0-only. License: GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later URL: https://www.advancemame.it/ -Source0: https://github.com/amadvance/advancecomp/archive/v%{version}/advancecomp-%{version}.tar.gz +Source: https://github.com/amadvance/advancecomp/archive/v%{version}/advancecomp-%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake From b1cfafe52dc77c24c9e163ca24ddd046d58a71d3 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 26 May 2023 09:28:09 -0400 Subject: [PATCH 09/15] Break a long line with a macro [skip changelog] --- advancecomp.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/advancecomp.spec b/advancecomp.spec index 6770c04..4748deb 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -22,7 +22,8 @@ Summary: Recompression utilities for .png, .mng, .zip and .gz files # interpret this as an overall license of GPL-3.0-only. License: GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later URL: https://www.advancemame.it/ -Source: https://github.com/amadvance/advancecomp/archive/v%{version}/advancecomp-%{version}.tar.gz +%global forgeurl https://github.com/amadvance/advancecomp +Source: %{forgeurl}/archive/v%{version}/advancecomp-%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake From e4002e09f4a904e697789724b775ddbd4075ecd6 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 26 May 2023 09:29:06 -0400 Subject: [PATCH 10/15] Trivial tidying [skip changelog] --- advancecomp.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/advancecomp.spec b/advancecomp.spec index 4748deb..b9606ef 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -81,7 +81,8 @@ This package contains: %prep -%autosetup -p1 +%autosetup + dos2unix -k doc/*.txt # Patch out bundled libdeflate From ecfcb6a461f5aa72090a33a55b183e4f1ad3965b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 11 Dec 2024 16:45:23 -0500 Subject: [PATCH 11/15] Unbundle zopfli - We now have libzopfli/zopfli-devel in EPEL9 --- advancecomp.spec | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/advancecomp.spec b/advancecomp.spec index b9606ef..b8e7d1c 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -39,13 +39,7 @@ BuildRequires: zlib-devel # Unbundled downstream BuildRequires: pkgconfig(libdeflate) - -# No libzopfli/zopfli-devel in EPEL9. -# -# Version number based on HISTORY, which mentions that upstream commit -# 6818a0859063b946094fb6f94732836404a0d89a was used from -# https://github.com/google/zopfli/. -Provides: bundled(zopfli) = 1.0.2^20160527git6818a08 +BuildRequires: zopfli-devel # From 7z/README: # @@ -95,6 +89,19 @@ find . -type f -exec gawk \ '{}' '+' | xargs -r -t sed -r -i 's@^([[:blank:]]*#include.*)libdeflate/@\1@' +# Patch out bundled zopfli +rm -rv zopfli +sed -r -i \ + -e '/zopfli[\/_]/d' \ + -e 's/((\(7z_SOURCES\)|WindowOut\.h).*)[[:blank:]]*\\/\1/' \ + Makefile.am +# Fix up #include paths. The find-then-modify pattern keeps us from discarding +# mtimes on any sources that do not need modification. +find . -type f -exec gawk \ + '/^[[:blank:]]*#include.*zopfli/ { print FILENAME; nextfile }' \ + '{}' '+' | + xargs -r -t sed -r -i -e 's@^([[:blank:]]*#include.*)zopfli/@\1@' + %build %set_build_flags @@ -105,6 +112,9 @@ export CFLAGS="$(pkgconf --cflags libdeflate) ${CFLAGS-}" export CXXFLAGS="$(pkgconf --cflags libdeflate) ${CXXFLAGS-}" export LDFLAGS="$(pkgconf --libs libdeflate) ${LDFLAGS-}" +# Link against system zopfli +export LDFLAGS="-lzopfli ${LDFLAGS-}" + %configure %make_build From 0801ef07cfdbf7b5532b5b1276a64a3cad5427f5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 9 Nov 2023 10:46:52 -0500 Subject: [PATCH 12/15] Update to 2.6 (close RHBZ#2243085) --- .gitignore | 1 + advancecomp.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 91d5d6f..6e4a9e6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ advancecomp-1.15.tar.gz /advancecomp-2.3.tar.gz /advancecomp-2.4.tar.gz /advancecomp-2.5.tar.gz +/advancecomp-2.6.tar.gz diff --git a/advancecomp.spec b/advancecomp.spec index b8e7d1c..354fd69 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -1,5 +1,5 @@ Name: advancecomp -Version: 2.5 +Version: 2.6 Release: %autorelease Summary: Recompression utilities for .png, .mng, .zip and .gz files @@ -38,9 +38,13 @@ BuildRequires: dos2unix BuildRequires: zlib-devel # Unbundled downstream -BuildRequires: pkgconfig(libdeflate) +BuildRequires: pkgconfig(libdeflate) >= 1.19 BuildRequires: zopfli-devel +# The point of the 2.6 release was to upgrade the bundled libdeflate; enforce +# this on the unbundled libdeflate. +Requires: libdeflate >= 1.19 + # From 7z/README: # # This directory contains some source files from the @@ -80,7 +84,7 @@ This package contains: dos2unix -k doc/*.txt # Patch out bundled libdeflate -rm -rvf libdeflate +rm -rv libdeflate sed -r -i '/libdeflate[\/_]/d' Makefile.am # Fix up #include paths. The find-then-modify pattern keeps us from discarding # mtimes on any sources that do not need modification. diff --git a/sources b/sources index 04420d1..a8812ed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (advancecomp-2.5.tar.gz) = c508526415dc002dad442e3f55202494ab2c49ecac3f5ea6e1a3fe27d224dd9a1a33dace02f59c18123d3f4bc74e3f03556b1cff6541cb88dcaaa32ac35c0043 +SHA512 (advancecomp-2.6.tar.gz) = 63cbb0578f96fd3f55ccb49e31bfe945649d36a11558aa482332440943d6d347f161de797b8d4469562b1d551b274c22fe08818179926d56aa4746581d3926dd From 618e4aaaab4e4dab19e139e79fe2b8526daaafa5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 5 Mar 2024 08:55:52 -0500 Subject: [PATCH 13/15] Improve the rpmlintrc file [skip changelog] --- advancecomp.rpmlintrc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/advancecomp.rpmlintrc b/advancecomp.rpmlintrc index f783f4d..483f617 100644 --- a/advancecomp.rpmlintrc +++ b/advancecomp.rpmlintrc @@ -1,4 +1,6 @@ -# There is really no version information available. -addFilter(r' unversioned-explicit-provides bundled\(7zip\)') -# Every RPM has this… -addFilter(r' strange-permission advancecomp\.spec 600$') +# Spec file comment shows that exact version is unknown +addFilter(r" unversioned-explicit-provides bundled\(7zip\)") +# Not real spelling errors +addFilter(r" spelling-error \('[Rr]ecompression',") +addFilter(r" spelling-error \('([pm]ng|gz)',") +addFilter(r" spelling-error \('adv(zip|[pm]ng|def)',") From 6151049d5b44082abd0451567dec7281a2ba02b0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 11 Dec 2024 14:03:31 -0500 Subject: [PATCH 14/15] Improve the license-breakdown spec-file comment --- advancecomp.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/advancecomp.spec b/advancecomp.spec index 354fd69..3f3997f 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -14,13 +14,17 @@ Summary: Recompression utilities for .png, .mng, .zip and .gz files # of the sources that would be covered by the “unRAR license restriction” or # the BSD-3-Clause license for LZFSE are present in this fork. # -# Certain build-system files, which do not contribute to the license of the -# binary RPM, are under other permissible licenses. -# # However, in version 1.17, the COPYING file was updated to GPLv3, with a # changelog message (in HISTORY and elsewhere) of “Changes to GPL3.” We # interpret this as an overall license of GPL-3.0-only. License: GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later +# Additionally, the following bundled libraries are removed in %%prep and do +# not contribute to the licenses of the binary RPMs: +# +# Apache-2.0: +# - zopfli/ +# MIT: +# - libdeflate/ URL: https://www.advancemame.it/ %global forgeurl https://github.com/amadvance/advancecomp Source: %{forgeurl}/archive/v%{version}/advancecomp-%{version}.tar.gz From 46d6a5814d9621ab4aaba7cf1dcd403d128443f4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 11 Dec 2024 14:05:55 -0500 Subject: [PATCH 15/15] Add a SourceLicense field --- advancecomp.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/advancecomp.spec b/advancecomp.spec index 3f3997f..97e6fca 100644 --- a/advancecomp.spec +++ b/advancecomp.spec @@ -25,6 +25,7 @@ License: GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later # - zopfli/ # MIT: # - libdeflate/ +SourceLicense: %{license} AND Apache-2.0 AND MIT URL: https://www.advancemame.it/ %global forgeurl https://github.com/amadvance/advancecomp Source: %{forgeurl}/archive/v%{version}/advancecomp-%{version}.tar.gz