public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gif2png] rawhide: fix tests F45FTBFS rhbz#2503919
Date: Wed, 22 Jul 2026 01:34:55 GMT [thread overview]
Message-ID: <178468409507.1.550540435674617781.rpms-gif2png-c1f389bc8dd9@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gif2png
Branch : rawhide
Commit : c1f389bc8dd99c1add61914816799528378ac68e
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-07-21T22:34:48-03:00
Stats : +82/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gif2png/c/c1f389bc8dd99c1add61914816799528378ac68e?branch=rawhide
Log:
fix tests F45FTBFS rhbz#2503919
---
diff --git a/gif2png-3.0.4-test-compare.patch b/gif2png-3.0.4-test-compare.patch
new file mode 100644
index 0000000..cd49ff0
--- /dev/null
+++ b/gif2png-3.0.4-test-compare.patch
@@ -0,0 +1,79 @@
+diff -urN gif2png-3.0.4-orig/tests/compare_png.go gif2png-3.0.4/tests/compare_png.go
+--- gif2png-3.0.4-orig/tests/compare_png.go 1969-12-31 21:00:00.000000000 -0300
++++ gif2png-3.0.4/tests/compare_png.go 2026-07-21 21:27:54.071750193 -0300
+@@ -0,0 +1,52 @@
++package main
++
++import (
++ "fmt"
++ "image"
++ _ "image/gif"
++ _ "image/png"
++ "os"
++)
++
++func main() {
++ if len(os.Args) < 3 {
++ fmt.Println("Usage: compare <file1> <file2>")
++ os.Exit(1)
++ }
++ f1, err := os.Open(os.Args[1])
++ if err != nil {
++ fmt.Printf("Error opening %s: %v\n", os.Args[1], err)
++ os.Exit(1)
++ }
++ defer f1.Close()
++ f2, err := os.Open(os.Args[2])
++ if err != nil {
++ fmt.Printf("Error opening %s: %v\n", os.Args[2], err)
++ os.Exit(1)
++ }
++ defer f2.Close()
++ img1, _, err := image.Decode(f1)
++ if err != nil {
++ fmt.Printf("Error decoding %s: %v\n", os.Args[1], err)
++ os.Exit(1)
++ }
++ img2, _, err := image.Decode(f2)
++ if err != nil {
++ fmt.Printf("Error decoding %s: %v\n", os.Args[2], err)
++ os.Exit(1)
++ }
++ b1 := img1.Bounds()
++ b2 := img2.Bounds()
++ if b1 != b2 {
++ fmt.Printf("Bounds differ: %v vs %v\n", b1, b2)
++ os.Exit(1)
++ }
++ for y := b1.Min.Y; y < b1.Max.Y; y++ {
++ for x := b1.Min.X; x < b1.Max.X; x++ {
++ if img1.At(x, y) != img2.At(x, y) {
++ fmt.Printf("Pixels differ at (%d, %d)\n", x, y)
++ os.Exit(1)
++ }
++ }
++ }
++}
+diff -urN gif2png-3.0.4-orig/tests/Makefile gif2png-3.0.4/tests/Makefile
+--- gif2png-3.0.4-orig/tests/Makefile 2026-07-21 21:27:52.299976167 -0300
++++ gif2png-3.0.4/tests/Makefile 2026-07-21 21:27:56.455722911 -0300
+@@ -7,8 +7,11 @@
+ test: gif2png-test web2png-test
+
+ # Run this to regression-test the converter
+-gif2png-test:
+- for x in $(IMAGESTEMS); do echo "$${x}:"; ../gif2png -v $${x}.gif; cmp $${x}.png $${x}.png-check; done
++gif2png-test: compare_png
++ for x in $(IMAGESTEMS); do echo "$${x}:"; ../gif2png -v $${x}.gif; ./compare_png $${x}.png $${x}.png-check; done
++
++compare_png: compare_png.go
++ go build -mod=vendor -o compare_png compare_png.go
+
+ # Run this as a visual check. The thing to do is 'Next' a couple times
+ # on each pair to verify that the image and its conversion are visually
+@@ -30,4 +33,4 @@
+ -diff -u style.css-gif style.css
+
+ clean:
+- rm -f *.png *.bak
++ rm -f *.png *.bak compare_png
diff --git a/gif2png.spec b/gif2png.spec
index a498490..7a51e71 100644
--- a/gif2png.spec
+++ b/gif2png.spec
@@ -16,11 +16,12 @@ URL: http://www.catb.org/~esr/gif2png/
Source0: %{url}%{name}-%{version}.tar.gz
Source1: vendor.tar.bz2
Source2: go-vendor-tools.toml
+Patch: gif2png-3.0.4-test-compare.patch
-BuildRequires: go-vendor-tools
BuildRequires: compiler(go-compiler)
-BuildRequires: make
BuildRequires: diffutils
+BuildRequires: go-vendor-tools
+BuildRequires: make
%description
The gif2png program converts files from the Graphic Interchange Format (GIF) to
reply other threads:[~2026-07-22 1:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178468409507.1.550540435674617781.rpms-gif2png-c1f389bc8dd9@fedoraproject.org \
--to=rosset.filipe@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox