Compare commits

...
Sign in to create a new pull request.

20 commits

Author SHA1 Message Date
Dominik 'Rathann' Mierzejewski
7c9a58a579 Rebuilt for FFmpeg 9 2026-09-03 22:08:31 +02:00
Fedora Release Engineering
13f711d6e0 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:12:44 +00:00
Fedora Release Engineering
2c735bbae3 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 19:38:06 +00:00
Dominik 'Rathann' Mierzejewski
1f69bae87f Rebuilt for FFmpeg 8 2025-10-15 10:43:03 +02:00
Fedora Release Engineering
e23cea17b8 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:48:43 +00:00
Petr Písař
ecca12cc73 Require more gating tests 2025-06-06 16:03:18 +02:00
Fedora Release Engineering
04c71f9e1a Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 13:48:52 +00:00
Fabio Valentini
682354d6fd
Rebuild for ffmpeg 7 2024-09-23 17:02:04 +02:00
Petr Písař
7a7db7ee98 Modernize a spec file 2024-09-23 09:45:52 +02:00
Fedora Release Engineering
105ecf0d1c Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 08:18:46 +00:00
Fedora Release Engineering
8f726eedd3 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 07:09:41 +00:00
Fedora Release Engineering
1a8fccbf3d Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 17:09:39 +00:00
fd67f13a77 Rebuild for ffmpeg 6.0 2023-03-12 15:38:10 -04:00
Petr Písař
cd0cb68ef9 Convert license tags to an SPDX format 2023-02-08 12:27:46 +01:00
Fedora Release Engineering
10ff7477c0 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 05:51:37 +00:00
Petr Písař
422f187bde Escape all percents in a comment 2022-10-10 14:47:13 +02:00
Petr Písař
54f9913222 Set an update option to supress a warning with ffmpeg-5.1 2022-10-10 14:41:02 +02:00
Petr Písař
52fb09cf39 Correct an URL in RPM metadata 2022-08-31 09:57:30 +02:00
094ed21243 Rebuild for ffmpeg 5.1 (#2121070) 2022-08-29 19:16:35 -04:00
Fedora Release Engineering
0ef0a7fee6 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 11:26:16 +00:00
4 changed files with 194 additions and 26 deletions

View file

@ -1,7 +1,16 @@
--- !Policy
product_versions:
- fedora-rawhide
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

View file

@ -0,0 +1,44 @@
From a2a88fe837fd6770ac94f08b2eb841f0dc9d2430 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.com>
Date: Sat, 8 Oct 2022 10:14:46 +0100
Subject: [PATCH] Set the `update` option to suppress the ffmpeg 5.1 warning.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This addresses Issue #113, the spurious warning coming from ffmpeg 5.1+
about the filename not being an image sequence (we do our own sequencing
so we do not want it to be seen by ffmpeg at all!)
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
file.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/file.c b/file.c
index fc24a4c..53ef727 100644
--- a/file.c
+++ b/file.c
@@ -13,6 +13,7 @@
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>
+#include <libavutil/opt.h>
#include "tools.h"
#include "unpaper.h"
@@ -142,6 +143,11 @@ void saveImage(char *filename, AVFrame *input, int outputPixFmt) {
errOutput("unable to allocate output context.");
}
+ if ((ret = av_opt_set(out_ctx->priv_data, "update", "true", 0)) < 0) {
+ av_strerror(ret, errbuff, sizeof(errbuff));
+ errOutput("unable to configure update option: %s", errbuff);
+ }
+
switch (outputPixFmt) {
case AV_PIX_FMT_RGB24:
output_codec = AV_CODEC_ID_PPM;
--
2.37.3

View file

@ -0,0 +1,55 @@
From d29fd2cf84ea386c67ecb0302adebc0700088d94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.com>
Date: Sat, 8 Oct 2022 00:16:20 +0100
Subject: [PATCH] Use avformat_alloc_output_context2() to create the out
context.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This simplifies the API usage quite a bit, while maintaining the same
logic as previously.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
file.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/file.c b/file.c
index d9c239e..fc24a4c 100644
--- a/file.c
+++ b/file.c
@@ -127,7 +127,6 @@ void loadImage(const char *filename, AVFrame **image) {
* @return true on success, false on failure
*/
void saveImage(char *filename, AVFrame *input, int outputPixFmt) {
- const AVOutputFormat *fmt = NULL;
enum AVCodecID output_codec = -1;
const AVCodec *codec;
AVFormatContext *out_ctx;
@@ -138,20 +137,11 @@ void saveImage(char *filename, AVFrame *input, int outputPixFmt) {
int ret;
char errbuff[1024];
- fmt = av_guess_format("image2", NULL, NULL);
-
- if (!fmt) {
- errOutput("could not find suitable output fmt.");
- }
-
- out_ctx = avformat_alloc_context();
- if (!out_ctx) {
+ if (avformat_alloc_output_context2(&out_ctx, NULL, "image2", filename) < 0 ||
+ out_ctx == NULL) {
errOutput("unable to allocate output context.");
}
- out_ctx->oformat = fmt;
- out_ctx->url = av_strdup(filename);
-
switch (outputPixFmt) {
case AV_PIX_FMT_RGB24:
output_codec = AV_CODEC_ID_PPM;
--
2.37.3

View file

@ -1,47 +1,56 @@
Name: unpaper
Version: 7.0.0
Release: 1%{?dist}
Release: 18%{?dist}
Summary: Post-processing of scanned and photocopied book pages
# AUTHORS: GPLv2
# constants.h: GPLv2
# doc/basic-concepts.md: GPLv2
# doc/file-formats.md: GPLv2
# doc/image-processing.md: GPLv2
# doc/img/*.png.license: GPLv2
# doc/unpaper.1.rst: GPLv2
# file.c: GPLv2
# imageprocess.c: GPLv2
# imageprocess.h: GPLv2
# AUTHORS: GPL-2.0-only
# constants.h: GPL-2.0-only
# doc/basic-concepts.md: GPL-2.0-only
# doc/file-formats.md: GPL-2.0-only
# doc/image-processing.md: GPL-2.0-only
# doc/img/*.png.license: GPL-2.0-only
# doc/unpaper.1.rst: GPL-2.0-only
# file.c: GPL-2.0-only
# imageprocess.c: GPL-2.0-only
# imageprocess.h: GPL-2.0-only
# LICENSES/0BSD.txt: 0BSD text
# LICENSES/GPL-2.0-only.txt: GPLv2 text
# other files: GPLv2
# README.md: GPLv2
# LICENSES/GPL-2.0-only.txt: GPL-2.0 text
# other files: GPL-2.0-only
# README.md: GPL-2.0-only
# version.h.in: 0BSD
## In tests subpackage
# LICENSES/MIT.txt: MIT text
# tests/golden_images/*.license GPLv2
# tests/source_images/*.license GPLv2
# tests/unpaper_tests.py: GPLv2 and MIT
## Not in the binary package
# tests/golden_images/*.license GPL-2.0-only
# tests/source_images/*.license GPL-2.0-only
# tests/unpaper_tests.py: GPL-2.0-only AND MIT
## Not in any binary package
# doc/conf.py: MIT
# LICENSES/Apache-2.0.txt: ASL 2.0 text
# LICENSES/Apache-2.0.txt: Apache-2.0 text
# meson.build: MIT
# .dir-locals.el: MIT
# .editorconfig: 0BSD
# .github/workflows/meson-build-and-test.yml: ASL 2.0
# .github/workflows/meson-build-and-test.yml: Apache-2.0
# .github/workflows/pre-commit.yml: MIT
# .gitignore: MIT
# .mailmap: MIT
# .mergify.yml: MIT
# .pre-commit-config.yaml: MIT
License: GPLv2 and 0BSD
URL: https://www.flameeyes.eu/projects/{%name}
SourceLicense: GPL-2.0-only AND 0BSD AND MIT AND Apache-2.0
License: GPL-2.0-only AND 0BSD
URL: https://www.flameeyes.eu/projects/%{name}
Source0: https://www.flameeyes.eu/files/%{name}-%{version}.tar.xz
# Missing a signature, requested by e-mail
# <https://flameeyes.blog/2022/05/10/unpaper-7-0-0-release/>.
#Source1: https://www.flameeyes.eu/files/%%{name}-%%{version}.tar.xz.sig
## A key exported from keyserver <hkp://pgp.surfnet.nl> on 2022-02-25.
#Source2: gpgkey-BDAEF3008A1CC62079C2A16847664B94E36B629F.gpg
# 1/2Set an update option to supress a warning with ffmpeg-5.1,
# in upstream after 7.0.0,
# <https://github.com/unpaper/unpaper/issues/113>
Patch0: unpaper-7.0.0-Use-avformat_alloc_output_context2-to-create-the-out.patch
# 2/2 Set an update option to supress a warning with ffmpeg-5.1,
# in upstream after 7.0.0,
# <https://github.com/unpaper/unpaper/issues/113>
Patch1: unpaper-7.0.0-Set-the-update-option-to-suppress-the-ffmpeg-5.1-war.patch
BuildRequires: gcc
#BuildRequires: gnupg2
BuildRequires: meson >= 0.57
@ -72,7 +81,7 @@ angle. This process is called "deskewing".
%package tests
Summary: Tests for %{name}
License: GPLv2 and MIT
License: GPL-2.0-only AND MIT
BuildArch: noarch
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
# python3-pillow for PIL Python module
@ -86,7 +95,7 @@ Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
#%%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
#%%{gpgverify} --keyring='%%{SOURCE2}' --signature='%%{SOURCE1}' --data='%%{SOURCE0}'
%autosetup -p1
%build
@ -113,8 +122,8 @@ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%files
%license LICENSES/0BSD.txt LICENSES/GPL-2.0-only.txt
%{_bindir}/*
%{_mandir}/man1/*
%{_bindir}/unpaper
%{_mandir}/man1/unpaper.*
%doc AUTHORS doc/*.md doc/img NEWS README.md
%files tests
@ -122,6 +131,57 @@ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%{_libexecdir}/%{name}
%changelog
* Thu Sep 03 2026 Dominik Mierzejewski <dominik@greysector.net> - 7.0.0-18
- Rebuilt for FFmpeg 9
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Oct 15 2025 Dominik Mierzejewski <dominik@greysector.net> - 7.0.0-15
- Rebuilt for FFmpeg 8
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Sep 23 2024 Fabio Valentini <decathorpe@gmail.com> - 7.0.0-12
- Rebuild for ffmpeg 7
* Mon Sep 23 2024 Petr Pisar <ppisar@redhat.com> - 7.0.0-11
- Define a license of a source package
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun Mar 12 2023 Neal Gompa <ngompa@fedoraproject.org> - 7.0.0-7
- Rebuild for ffmpeg 6.0
* Wed Feb 08 2023 Petr Pisar <ppisar@redhat.com> - 7.0.0-6
- Convert license tags to an SPDX format
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Oct 10 2022 Petr Pisar <ppisar@redhat.com> - 7.0.0-4
- Set an update option to supress a warning with ffmpeg-5.1 (upstream #113)
* Mon Aug 29 2022 Neal Gompa <ngompa@fedoraproject.org> - 7.0.0-3
- Rebuild for ffmpeg 5.1 (#2121070)
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue May 31 2022 Petr Pisar <ppisar@redhat.com> - 7.0.0-1
- 7.0.0 bump
- License changed from (GPLv2) to (GPLv2 and 0BSD and MIT)