Notification time stamped 2022-11-29 15:18:02 UTC
From d9d11e9215db53a55e71fd097fd1eb91d8a6d568 Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 03:47:48 +0000
Subject: General tidying of spec file
- Use modern macros
- Install HTML format description as documentation
---
diff --git a/woff.spec b/woff.spec
index e01647d..dc90c41 100644
--- a/woff.spec
+++ b/woff.spec
@@ -15,33 +15,41 @@ URL: https://web.archive.org/web/20170630235618/%{original_url}
# There is no longer a working URL for this archive.
Source0: %{original_url}/woff-code-latest.zip
-BuildRequires: make
-BuildRequires: zlib-devel
+BuildRequires: make
BuildRequires: gcc
+BuildRequires: zlib-devel
+
%description
Encoding and Decoding for Web Open Font Format(Woff)
%prep
-%autosetup -c
+%autosetup -c
+
%build
-make CFLAGS="${RPM_OPT_FLAGS}" %{?_smp_mflags}
+%set_build_flags
+%make_build CFLAGS="${CFLAGS}"
%install
-mkdir -m 755 -p $RPM_BUILD_ROOT/%{_bindir}
-install -m755 sfnt2woff woff2sfnt $RPM_BUILD_ROOT/%{_bindir}/
+# The Makefile has no install target.
+install -d '%{buildroot}%{_bindir}'
+install -t '%{buildroot}%{_bindir}' -p sfnt2woff woff2sfnt
+
%files
-%doc
+%doc woff-2009-10-03.html
%{_bindir}/sfnt2woff
%{_bindir}/woff2sfnt
+
%changelog
* Tue Nov 29 2022 Benjamin A. Beasley <code(a)musicinmybrain.net> - 0.20091126-27
- Clarify URL/Source situation, and do not claim to have a working source
archive URL
+- General tidying of spec file; use modern macros and install HTML format
+ description as documentation
* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.20091126-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuildhttps://src.fedoraproject.org/rpms/woff/c/d9d11e9215db53a55e71fd097fd1eb91d…
Notification time stamped 2022-11-29 15:18:02 UTC
From a88484f1d97ae2eec2a4c44908cc9aa66c774acf Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 15:10:56 +0000
Subject: Patch a possible double-free bug
---
diff --git a/possible-double-free.patch b/possible-double-free.patch
new file mode 100644
index 0000000..09a5660
--- /dev/null
+++ b/possible-double-free.patch
@@ -0,0 +1,11 @@
+diff -Naur a/woff.c b/woff.c
+--- a/woff.c 2009-09-25 09:54:13.000000000 -0400
++++ b/woff.c 2022-11-29 10:09:15.091798523 -0500
+@@ -354,6 +354,7 @@
+ newHeader->privLen = 0;
+
+ free(tableOrder);
++ tableOrder = 0;
+
+ if ((status & eWOFF_warn_checksum_mismatch) != 0) {
+ /* The original font had checksum errors, so we now decode our WOFF data
diff --git a/woff.spec b/woff.spec
index 41efbab..c90be54 100644
--- a/woff.spec
+++ b/woff.spec
@@ -18,6 +18,11 @@ Source0: %{original_url}/woff-code-latest.zip
Source1: sfnt2woff.1
Source2: woff2sfnt.1
+# It’s possible that tableOrder could be freed twice if a failure occurs. Set
+# the pointer null after freeing it to prevent this. There is no current
+# upstream to which this could be reported.
+Patch: possible-double-free.patch
+
BuildRequires: make
BuildRequires: gcc
@@ -27,7 +32,7 @@ BuildRequires: zlib-devel
Encoding and Decoding for Web Open Font Format(Woff)
%prep
-%autosetup -c
+%autosetup -c -p1
%build
https://src.fedoraproject.org/rpms/woff/c/a88484f1d97ae2eec2a4c44908cc9aa66…
Notification time stamped 2022-11-29 15:18:02 UTC
From 43978d0613210c7b61bf121671a17ae4947ffa16 Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 03:39:24 +0000
Subject: Clarify URL/Source situation
- Do not claim to have a working source archive URL
---
diff --git a/woff.spec b/woff.spec
index adcb482..e01647d 100644
--- a/woff.spec
+++ b/woff.spec
@@ -1,11 +1,20 @@
Name: woff
Version: 0.20091126
-Release: 26%{?dist}
+Release: 27%{?dist}
Summary: Encoding and Decoding for Web Open Font Format(Woff)
License: GPLv2+ or LGPLv2+ or MPLv1.1
-URL: https://web.archive.org/web/20170630235618/https://people-mozilla.org/~jkew…
-Source0: %{url}/woff-code-latest.zip
+# Note that the URL http://people.mozilla.org/~jkew/woff/, where the original
+# WOFF reference implementation sources were published, is no longer available.
+# A copy of that page can be found at
+# https://web.archive.org/web/20170630235618/https://people-mozilla.org/~jkew…,
+# and the sources are mirrored at https://github.com/TheJessieKirk/sfnt2woff.
+%global original_url https://people-mozilla.org/~jkew/woff/
+# The URL is no longer active, so we reference an archived copy:
+URL: https://web.archive.org/web/20170630235618/%{original_url}
+# There is no longer a working URL for this archive.
+Source0: %{original_url}/woff-code-latest.zip
+
BuildRequires: make
BuildRequires: zlib-devel
BuildRequires: gcc
@@ -30,6 +39,10 @@ install -m755 sfnt2woff woff2sfnt $RPM_BUILD_ROOT/%{_bindir}/
%{_bindir}/woff2sfnt
%changelog
+* Tue Nov 29 2022 Benjamin A. Beasley <code(a)musicinmybrain.net> - 0.20091126-27
+- Clarify URL/Source situation, and do not claim to have a working source
+ archive URL
+
* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.20091126-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuildhttps://src.fedoraproject.org/rpms/woff/c/43978d0613210c7b61bf121671a17ae49…
Notification time stamped 2022-11-29 15:15:26 UTC
From 43978d0613210c7b61bf121671a17ae4947ffa16 Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 03:39:24 +0000
Subject: Clarify URL/Source situation
- Do not claim to have a working source archive URL
---
diff --git a/woff.spec b/woff.spec
index adcb482..e01647d 100644
--- a/woff.spec
+++ b/woff.spec
@@ -1,11 +1,20 @@
Name: woff
Version: 0.20091126
-Release: 26%{?dist}
+Release: 27%{?dist}
Summary: Encoding and Decoding for Web Open Font Format(Woff)
License: GPLv2+ or LGPLv2+ or MPLv1.1
-URL: https://web.archive.org/web/20170630235618/https://people-mozilla.org/~jkew…
-Source0: %{url}/woff-code-latest.zip
+# Note that the URL http://people.mozilla.org/~jkew/woff/, where the original
+# WOFF reference implementation sources were published, is no longer available.
+# A copy of that page can be found at
+# https://web.archive.org/web/20170630235618/https://people-mozilla.org/~jkew…,
+# and the sources are mirrored at https://github.com/TheJessieKirk/sfnt2woff.
+%global original_url https://people-mozilla.org/~jkew/woff/
+# The URL is no longer active, so we reference an archived copy:
+URL: https://web.archive.org/web/20170630235618/%{original_url}
+# There is no longer a working URL for this archive.
+Source0: %{original_url}/woff-code-latest.zip
+
BuildRequires: make
BuildRequires: zlib-devel
BuildRequires: gcc
@@ -30,6 +39,10 @@ install -m755 sfnt2woff woff2sfnt $RPM_BUILD_ROOT/%{_bindir}/
%{_bindir}/woff2sfnt
%changelog
+* Tue Nov 29 2022 Benjamin A. Beasley <code(a)musicinmybrain.net> - 0.20091126-27
+- Clarify URL/Source situation, and do not claim to have a working source
+ archive URL
+
* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.20091126-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuildhttps://src.fedoraproject.org/rpms/woff/c/43978d0613210c7b61bf121671a17ae49…