From 593b00c7affb3a3748732093a68201589aae82640ea0ae1df2c4af01676be7a6 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 1 Aug 2024 10:26:45 +0000 Subject: [PATCH] Accepting request 1190278 from home:bmwiedemann:branches:X11:XOrg Add reproducible.patch to override build date in font files for reproducible builds of xorg-x11-fonts (boo#1173396) OBS-URL: https://build.opensuse.org/request/show/1190278 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/fonttosfnt?expand=0&rev=19 --- .gitattributes | 23 +++++++++ .gitignore | 1 + fonttosfnt-1.2.3.tar.xz | 3 ++ fonttosfnt.changes | 101 ++++++++++++++++++++++++++++++++++++++++ fonttosfnt.spec | 56 ++++++++++++++++++++++ reproducible.patch | 70 ++++++++++++++++++++++++++++ 6 files changed, 254 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 fonttosfnt-1.2.3.tar.xz create mode 100644 fonttosfnt.changes create mode 100644 fonttosfnt.spec create mode 100644 reproducible.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fonttosfnt-1.2.3.tar.xz b/fonttosfnt-1.2.3.tar.xz new file mode 100644 index 0000000..4cb6842 --- /dev/null +++ b/fonttosfnt-1.2.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa7a93f240cbd0f5cdfe6be7c1b934b4f74d23de6257883a9f1b4bf21d7d61af +size 140068 diff --git a/fonttosfnt.changes b/fonttosfnt.changes new file mode 100644 index 0000000..e57e857 --- /dev/null +++ b/fonttosfnt.changes @@ -0,0 +1,101 @@ +------------------------------------------------------------------- +Mon Jul 29 13:37:47 UTC 2024 - Bernhard Wiedemann + +- Add reproducible.patch to override build date in font files + for reproducible builds of xorg-x11-fonts (boo#1173396) + +------------------------------------------------------------------- +Thu Sep 28 10:47:13 UTC 2023 - Stefan Dirsch + +- update to 1.2.3 + * Build xz tarballs instead of bzip2 + * gitlab CI: enable commit & merge request checks + * gitlab CI: enable gitlab's builtin static analysis + * Variable scope reductions as recommended by cppcheck + * args_copy variable is unused if HAVE_DECL_VA_COPY is not defined + * makeBitmap: declare raster parameter const as recommended by cppcheck + * Remove unused function findIndex + * Allow inlining makeName + * Use C99 compound literals to initialize newly allocated structs + * Add CI tests + +------------------------------------------------------------------- +Tue Jun 15 09:00:18 UTC 2021 - Stefan Dirsch + +- update to 1.2.2 + * fix for recent versions that mixed up font size with font height. + +------------------------------------------------------------------- +Tue Dec 22 08:40:19 UTC 2020 - Dirk Müller + +- update to 1.2.1: + * Resolves issues found by Oracle Parfait 4.0 static analyser: + * Fall back to using FONT property as family name + * fix sign of calculated descent + * handle empty foundry encoded as NULL + +------------------------------------------------------------------- +Wed Oct 21 09:17:35 UTC 2020 - Stefan Dirsch + +- Update to version 1.2.0 + * This release contains a bunch of fixes all over the place + +------------------------------------------------------------------- +Tue Jan 7 09:38:28 UTC 2020 - Stefan Dirsch + +- Update to version 1.1.0 + * Update README for gitlab migration + * Update configure.ac bug URL for gitlab migration + * Correct a string literal + * Mention .otb as an extension + * Accept a BDF font on stdin + * Avoid undefined behaviour + * Round font size to integer value when reading bitmap font + * Mark vsprintf_alloc as printf-like function + * check for freetype NULL atoms + * let freetype handle ISO-8859-1 mapping + * allow ISO-646.1991-IRV as well, adobe standard for bdf + +------------------------------------------------------------------- +Fri Aug 17 10:46:14 UTC 2018 - sndirsch@suse.com + +- Update to version 1.0.5 + * Is it a bird? is it a plane? No it's a fonttofs.. fontstof.. + fonttofn... it's a release of the tool that wraps a bitmap + font into a truetype wrapper! Bringing you the last 9 years + of exciting changes including ansification and lots of + autotools cleanup changes, because that is how we rolled 7 + years ago. (Almost) no source files were harmed in the + making of this release. +- get rid of _service/_servicedata files + +------------------------------------------------------------------- +Wed May 31 23:11:34 UTC 2017 - zaitor@opensuse.org + +- Update to version 1.0.5+20170126.aead36f: + * config: + - Replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS. + - Move man pages into their own directory. + - Add missing AC_CONFIG_SRCDIR. + * man: + - Remove trailing spaces and tabs. + - Replace hard coded man page section with substitution + strings. + * configure: Drop AM_MAINTAINER_MODE. + * autogen.sh: + - Honor NOCONFIGURE=1. + - Use exec instead of waiting for configure to finish. + - Use quoted string variables. + - Add default patch prefix. +- Switch to source service git checkout. +- Following the above, add libtool BuildRequires, and pass + NOCONFIGURE=1 ./autogen.sh: Needed now that we build from a git + checkout. +- Add pkgconfig(xorg-macros) BuildRequires: New dependency. +- Stop packaging ChangeLog and NEWS, dropped upstream. + +------------------------------------------------------------------- +Fri Apr 13 08:46:08 UTC 2012 - vuntz@opensuse.org + +- Split fonttosfnt from xorg-x11. Initial version: 1.0.4. + diff --git a/fonttosfnt.spec b/fonttosfnt.spec new file mode 100644 index 0000000..181a5e9 --- /dev/null +++ b/fonttosfnt.spec @@ -0,0 +1,56 @@ +# +# spec file for package fonttosfnt +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: fonttosfnt +Version: 1.2.3 +Release: 0 +Summary: Utility to wrap a bitmap font in a sfnt (TrueType) wrapper +License: MIT +Group: System/X11/Utilities +URL: https://xorg.freedesktop.org/ +Source0: https://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.xz +Patch0: https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/merge_requests/22.patch#/reproducible.patch +BuildRequires: pkgconfig +BuildRequires: pkgconfig(fontenc) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(xorg-macros) >= 1.8 +BuildRequires: pkgconfig(xproto) +# This was part of the xorg-x11 package up to version 7.6 +Conflicts: xorg-x11 <= 7.6 + +%description +Wrap a bitmap font or a set of bitmap fonts in a sfnt (TrueType or +OpenType) wrapper. + +%prep +%autosetup -p1 + +%build +%configure +%make_build + +%install +%make_install + +%files +%license COPYING +%doc README.md +%{_bindir}/fonttosfnt +%{_mandir}/man1/fonttosfnt.1%{?ext_man} + +%changelog diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..3f67183 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,70 @@ +From 6e3754966240b62819e9ea4ba4c461ba3c719a2b Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Wed, 24 Jul 2024 16:27:35 +0200 +Subject: [PATCH 1/2] Use long long for timestamp diff + +to avoid integer overflows in the future +--- + util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util.c b/util.c +index a393e55..a810c87 100644 +--- a/util.c ++++ b/util.c +@@ -181,7 +181,7 @@ mktime_gmt(struct tm *tm) + int + macTime(int *hi, unsigned *lo) + { +- unsigned long diff; /* Not time_t */ ++ unsigned long long diff; /* Not time_t */ + time_t macEpoch, current; + struct tm tm; + tm.tm_sec = 0; +-- +GitLab + + +From 910868fc95546cd16522c0a4ca67887e783329e7 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Wed, 24 Jul 2024 16:28:43 +0200 +Subject: [PATCH 2/2] Allow to override build date with SOURCE_DATE_EPOCH + +to make builds reproducible. +See https://reproducible-builds.org/ for why this is good +and https://reproducible-builds.org/specs/source-date-epoch/ +for the definition of this variable. + +This patch was done while working on reproducible builds for openSUSE, sponsored by the NLnet NGI0 fund. +--- + util.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/util.c b/util.c +index a810c87..a7207f8 100644 +--- a/util.c ++++ b/util.c +@@ -182,6 +182,7 @@ int + macTime(int *hi, unsigned *lo) + { + unsigned long long diff; /* Not time_t */ ++ char *source_date_epoch; + time_t macEpoch, current; + struct tm tm; + tm.tm_sec = 0; +@@ -195,7 +196,11 @@ macTime(int *hi, unsigned *lo) + macEpoch = mktime_gmt(&tm); + if(macEpoch == -1) return -1; + +- current = time(NULL); ++ /* This assumes that the SOURCE_DATE_EPOCH environment variable will contain ++ a correct, positive integer in the time_t range */ ++ if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL || ++ (current = (time_t)strtoll(source_date_epoch, NULL, 10)) <= 0) ++ current = time(NULL); + if(current == -1) + return -1; + +-- +GitLab +