From df82a23e0211af977a16ab65ec22c22fc3a9957c66f9920f5f7cbfa0bce570a9 Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Tue, 29 Mar 2022 12:32:06 +0000 Subject: [PATCH 1/5] - Update epub2text2 version to 2.03: * Fixed buffer overrun bug - Update patches: * Add bmwiedemann/sort patch for reproducible builds * Use `%autopatch -p1` in spec file OBS-URL: https://build.opensuse.org/package/show/utilities/epub2txt2?expand=0&rev=3 --- bmwiedemann-sort.patch | 26 ++++++++++++++++++++++++++ epub2txt2.changes | 10 ++++++++++ epub2txt2.spec | 16 ++++++++-------- v2.01.tar.gz | 3 --- v2.03.tar.gz | 3 +++ 5 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 bmwiedemann-sort.patch delete mode 100644 v2.01.tar.gz create mode 100644 v2.03.tar.gz diff --git a/bmwiedemann-sort.patch b/bmwiedemann-sort.patch new file mode 100644 index 0000000..19bb0ad --- /dev/null +++ b/bmwiedemann-sort.patch @@ -0,0 +1,26 @@ +From e2e366c0b3d0d2e50bfe6908d61785f6ee321a5c Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Fri, 18 Mar 2022 19:51:22 +0100 +Subject: [PATCH] Sort input file list + +so that `epub2txt` builds in a reproducible way +in spite of indeterministic filesystem readdir order + +See https://reproducible-builds.org/ for why this is good. +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 2013cf1..449be7f 100644 +--- a/Makefile ++++ b/Makefile +@@ -9,7 +9,7 @@ MANDIR := /share/man + APPNAME := epub2txt + + TARGET := epub2txt +-SOURCES := $(shell find src/ -type f -name *.c) ++SOURCES := $(sort $(shell find src/ -type f -name *.c)) + OBJECTS := $(patsubst src/%,build/%,$(SOURCES:.c=.o)) + DEPS := $(OBJECTS:.o=.deps) + diff --git a/epub2txt2.changes b/epub2txt2.changes index 43b99fd..555eca1 100644 --- a/epub2txt2.changes +++ b/epub2txt2.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Mar 29 12:20:59 UTC 2022 - Soc Virnyl Estela + +- Update epub2text2 version to 2.03: + * Fixed buffer overrun bug + +- Update patches: + * Add bmwiedemann/sort patch for reproducible builds + * Use `%autopatch -p1` in spec file + ------------------------------------------------------------------- Sat Mar 12 23:32:20 UTC 2022 - Soc Virnyl Estela diff --git a/epub2txt2.spec b/epub2txt2.spec index 69cbf56..aeca995 100644 --- a/epub2txt2.spec +++ b/epub2txt2.spec @@ -12,21 +12,22 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: epub2txt2 -Version: 2.01 +Version: 2.03 Release: 0 -Summary: Simple command-line utility for extracting text from EPUB documents +Summary: Simple command-line utility for extracting text from EPUB documents License: GPL-3.0-only Group: Productivity/Text/Utilities -Url: https://github.com/kevinboone/epub2txt2 +URL: https://github.com/kevinboone/epub2txt2 Source: https://github.com/kevinboone/epub2txt2/archive/v%{version}.tar.gz -Patch: LICENSE.patch -BuildRequires: make +Patch0: LICENSE.patch +Patch1: bmwiedemann-sort.patch BuildRequires: gcc +BuildRequires: make Requires: unzip %description @@ -34,7 +35,7 @@ Simple command-line utility for extracting text from EPUB documents %prep %setup -q -%patch -p1 +%autopatch -p1 %build %make_build @@ -49,4 +50,3 @@ Simple command-line utility for extracting text from EPUB documents %{_mandir}/man1/epub2txt.1%{?ext_man} %changelog - diff --git a/v2.01.tar.gz b/v2.01.tar.gz deleted file mode 100644 index 559b2eb..0000000 --- a/v2.01.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:82c96c713c8a6e10d7b37e96db83a9d5f50fcb4b65034b4a1df1024776b6591f -size 57171 diff --git a/v2.03.tar.gz b/v2.03.tar.gz new file mode 100644 index 0000000..38b3df8 --- /dev/null +++ b/v2.03.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59aeb3fc46161b93154659d585b73abc961365f7f4a9756584c7611a81cd2b6f +size 71275 From 7bd8ca941a978cf746d164911d9ce1d11d738c5b7a3dd74de7f2278741cda6a2 Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Tue, 29 Mar 2022 12:46:21 +0000 Subject: [PATCH 2/5] - Fix spec and update sources. OBS-URL: https://build.opensuse.org/package/show/utilities/epub2txt2?expand=0&rev=4 --- 10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz | 3 +++ epub2txt2.changes | 5 +++++ epub2txt2.spec | 3 ++- v2.03.tar.gz | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz diff --git a/10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz b/10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz new file mode 100644 index 0000000..75b614e --- /dev/null +++ b/10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb62e76b7de9f4445697c2bb3d420009f007d8dbf2261af9846c29d2aca2ff5f +size 67707 diff --git a/epub2txt2.changes b/epub2txt2.changes index 555eca1..e46e982 100644 --- a/epub2txt2.changes +++ b/epub2txt2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 29 12:45:00 UTC 2022 - Soc Virnyl Estela + +- Fix spec and sources. + ------------------------------------------------------------------- Tue Mar 29 12:20:59 UTC 2022 - Soc Virnyl Estela diff --git a/epub2txt2.spec b/epub2txt2.spec index aeca995..8be656e 100644 --- a/epub2txt2.spec +++ b/epub2txt2.spec @@ -23,7 +23,8 @@ Summary: Simple command-line utility for extracting text from EPUB docume License: GPL-3.0-only Group: Productivity/Text/Utilities URL: https://github.com/kevinboone/epub2txt2 -Source: https://github.com/kevinboone/epub2txt2/archive/v%{version}.tar.gz +Source0: v2.03.tar.gz +Source1: https://github.com/kevinboone/epub2txt2/archive/10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz Patch0: LICENSE.patch Patch1: bmwiedemann-sort.patch BuildRequires: gcc diff --git a/v2.03.tar.gz b/v2.03.tar.gz index 38b3df8..633845f 100644 --- a/v2.03.tar.gz +++ b/v2.03.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59aeb3fc46161b93154659d585b73abc961365f7f4a9756584c7611a81cd2b6f -size 71275 +oid sha256:a554b3a6af4d29186cb89c67e807fa64d314f7b76f2426c8073bc9a06b619252 +size 71293 From 02719780d46d422ff8ee6bd59aa7ded6e7d7a302f22c04c7fd6b932c2881459c Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Tue, 29 Mar 2022 13:05:54 +0000 Subject: [PATCH 3/5] - add bmwiedemann-sort.patch OBS-URL: https://build.opensuse.org/package/show/utilities/epub2txt2?expand=0&rev=5 --- epub2txt2.changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epub2txt2.changes b/epub2txt2.changes index e46e982..ce7211c 100644 --- a/epub2txt2.changes +++ b/epub2txt2.changes @@ -13,6 +13,8 @@ Tue Mar 29 12:20:59 UTC 2022 - Soc Virnyl Estela * Add bmwiedemann/sort patch for reproducible builds * Use `%autopatch -p1` in spec file +- add bmwiedemann-sort.patch + ------------------------------------------------------------------- Sat Mar 12 23:32:20 UTC 2022 - Soc Virnyl Estela From 22b495f2373822f02999aa666131650e64b837b26e5a7d8f62b4719c5ac4eb27 Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Wed, 30 Mar 2022 00:01:08 +0000 Subject: [PATCH 4/5] - Use the commit hash instead. Upstream maintainer didn't tagged a release and only changed the README that it is version 2.03. This is to clarify that commit `10e9ac86df9a823d7470deaaa50c44d2857ee6f7` is 2.03. OBS-URL: https://build.opensuse.org/package/show/utilities/epub2txt2?expand=0&rev=6 --- epub2txt2.changes | 7 +++++++ epub2txt2.spec | 5 ++--- v2.03.tar.gz | 3 --- 3 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 v2.03.tar.gz diff --git a/epub2txt2.changes b/epub2txt2.changes index ce7211c..5fd845c 100644 --- a/epub2txt2.changes +++ b/epub2txt2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 29 23:58:55 UTC 2022 - Soc Virnyl Estela + +- Use the commit hash instead. Upstream maintainer didn't tagged a release + and only changed the README that it is version 2.03. This is to clarify + that commit `10e9ac86df9a823d7470deaaa50c44d2857ee6f7` is 2.03. + ------------------------------------------------------------------- Tue Mar 29 12:45:00 UTC 2022 - Soc Virnyl Estela diff --git a/epub2txt2.spec b/epub2txt2.spec index 8be656e..074727d 100644 --- a/epub2txt2.spec +++ b/epub2txt2.spec @@ -23,8 +23,7 @@ Summary: Simple command-line utility for extracting text from EPUB docume License: GPL-3.0-only Group: Productivity/Text/Utilities URL: https://github.com/kevinboone/epub2txt2 -Source0: v2.03.tar.gz -Source1: https://github.com/kevinboone/epub2txt2/archive/10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz +Source0: https://github.com/kevinboone/epub2txt2/archive/10e9ac86df9a823d7470deaaa50c44d2857ee6f7.tar.gz Patch0: LICENSE.patch Patch1: bmwiedemann-sort.patch BuildRequires: gcc @@ -35,7 +34,7 @@ Requires: unzip Simple command-line utility for extracting text from EPUB documents %prep -%setup -q +%setup -q -n %{name}-%{version} %autopatch -p1 %build diff --git a/v2.03.tar.gz b/v2.03.tar.gz deleted file mode 100644 index 633845f..0000000 --- a/v2.03.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a554b3a6af4d29186cb89c67e807fa64d314f7b76f2426c8073bc9a06b619252 -size 71293 From 6d96e6777cb3237c719a7e53293d188e9f8b6a49554a49a5317d333b1d8852a2 Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Wed, 30 Mar 2022 00:05:07 +0000 Subject: [PATCH 5/5] - replace %{version} to a custom %{_commit_hash} to fix build errors OBS-URL: https://build.opensuse.org/package/show/utilities/epub2txt2?expand=0&rev=7 --- epub2txt2.changes | 5 +++++ epub2txt2.spec | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/epub2txt2.changes b/epub2txt2.changes index 5fd845c..37036ed 100644 --- a/epub2txt2.changes +++ b/epub2txt2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 30 00:04:30 UTC 2022 - Soc Virnyl Estela + +- replace %{version} to a custom %{_commit_hash} to fix build errors + ------------------------------------------------------------------- Tue Mar 29 23:58:55 UTC 2022 - Soc Virnyl Estela diff --git a/epub2txt2.spec b/epub2txt2.spec index 074727d..3f84c2b 100644 --- a/epub2txt2.spec +++ b/epub2txt2.spec @@ -16,6 +16,8 @@ # +%global _commit_hash "10e9ac86df9a823d7470deaaa50c44d2857ee6f7" + Name: epub2txt2 Version: 2.03 Release: 0 @@ -34,7 +36,7 @@ Requires: unzip Simple command-line utility for extracting text from EPUB documents %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name}-%{_commit_hash} %autopatch -p1 %build