From a064ac6cad515776501a6bc68c91858e3f512e84 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 6 Dec 2021 14:57:04 -0500 Subject: [PATCH 01/17] Disable HTML docs in EPEL9 for now --- gn.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index 847fcdc..edac511 100644 --- a/gn.spec +++ b/gn.spec @@ -1,5 +1,6 @@ # Build HTML docs from markdown using pandoc? -%bcond_without html_docs +# Currently, neither pandoc nor parallel is available in EPEL9. +%bcond_with html_docs Name: gn # Upstream uses the number of commits in the git history as the version number. From a27a9b36103db2e6c8bd7819cfbc5a5ab46017fb Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 4 Feb 2022 08:06:17 -0500 Subject: [PATCH 02/17] BR emacs-nox instead of full emacs --- gn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index edac511..251143b 100644 --- a/gn.spec +++ b/gn.spec @@ -64,7 +64,7 @@ Requires: vim-filesystem Requires: python3 Provides: vim-gn = %{version}-%{release} -BuildRequires: emacs +BuildRequires: emacs-nox Requires: emacs-filesystem >= %{_emacs_version} Provides: emacs-gn = %{version}-%{release} From 5b157831d2b35ef58a6e55352482fc76351192e9 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 4 Feb 2022 08:12:49 -0500 Subject: [PATCH 03/17] Drop even the emacs-nox BR We are just installing a mode file. --- gn.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/gn.spec b/gn.spec index 251143b..b8888fd 100644 --- a/gn.spec +++ b/gn.spec @@ -64,7 +64,6 @@ Requires: vim-filesystem Requires: python3 Provides: vim-gn = %{version}-%{release} -BuildRequires: emacs-nox Requires: emacs-filesystem >= %{_emacs_version} Provides: emacs-gn = %{version}-%{release} From d3316e27c6200a872b197d8db19d510a28a35f88 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 11 Feb 2022 23:29:00 -0500 Subject: [PATCH 04/17] BR emacs-common for RPM macros --- gn.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gn.spec b/gn.spec index b8888fd..1b34e03 100644 --- a/gn.spec +++ b/gn.spec @@ -54,6 +54,9 @@ BuildRequires: python3-devel BuildRequires: ninja-build BuildRequires: gcc-c++ +# For RPM macros: +BuildRequires: emacs-common + %if %{with html_docs} BuildRequires: pandoc BuildRequires: parallel From 42b93dec17b5fd441615fcc084a9faad045bf3a9 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 16 Apr 2022 08:24:05 -0400 Subject: [PATCH 05/17] Stop numbering patches --- gn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index 1b34e03..0e4671a 100644 --- a/gn.spec +++ b/gn.spec @@ -48,7 +48,7 @@ Source1: last_commit_position.h Source2: update-version # Stop overriding optimization flags -Patch0: gn-0153d369-no-O3.patch +Patch: gn-0153d369-no-O3.patch BuildRequires: python3-devel BuildRequires: ninja-build From 3bd9cb4727eb1827f021ed64802737b62c096fe4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 30 Apr 2022 08:45:02 -0400 Subject: [PATCH 06/17] Improve handling of bundled ICU components --- gn.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index 0e4671a..d9146c4 100644 --- a/gn.spec +++ b/gn.spec @@ -70,6 +70,19 @@ Provides: vim-gn = %{version}-%{release} Requires: emacs-filesystem >= %{_emacs_version} Provides: emacs-gn = %{version}-%{release} +# src/base/third_party/icu/icu_utf.h: +# +# This file has the relevant components from ICU copied to handle basic +# UTF8/16/32 conversions. Components are copied from umachine.h, utf.h, +# utf8.h, and utf16.h into icu_utf.h. +# +# The forked, bundled ICU components are copied from Chromium. Because of the +# downstream changes (primarily, changing namespaces and symbol prefixes), +# there is no clear path to unbundling. +# +# See src/base/third_party/icu/README.chromium, from which the version number +# is taken. +Provides: bundled(icu) = 60 %description GN is a meta-build system that generates build files for Ninja. @@ -171,7 +184,7 @@ grep -E '^#define[[:blank:]]+LAST_COMMIT_POSITION[[:blank:]]+'\ %files doc -%license LICENSE +%license LICENSE src/base/third_party/icu/README.chromium %doc AUTHORS %doc OWNERS %doc README*.md From 699eb0e31a5bba6d4b361973eab4e308b1469cd1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 25 May 2023 08:48:51 -0400 Subject: [PATCH 07/17] Form the short commit hash with only shell builtins [skip changelog] --- gn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index d9146c4..5916740 100644 --- a/gn.spec +++ b/gn.spec @@ -27,7 +27,7 @@ Name: gn # See https://gn.googlesource.com/gn/+log for the latest changes. %global commit e0afadf7a743d5b14737bd454df45d5f1caf0d23 %global access 20211205 -%global shortcommit %(echo %{commit} | cut -b -8) +%global shortcommit %(c='%{commit}'; echo "${c:0:8}") Version: 1953 Release: %autorelease -s %{access}git%{shortcommit} Summary: Meta-build system that generates build files for Ninja From 1971a8a3114cc47a3f55c68826ab456c03575a43 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 2 May 2022 16:30:40 -0400 Subject: [PATCH 08/17] Add patch upstream status for gn-0153d369-no-O3.patch --- gn.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index 5916740..2be1bc6 100644 --- a/gn.spec +++ b/gn.spec @@ -47,7 +47,8 @@ Source0: %{url}/+archive/%{commit}.tar.gz#/gn-%{shortcommit}.tar.gz Source1: last_commit_position.h Source2: update-version -# Stop overriding optimization flags +# Stop overriding optimization flags; not sent upstream because this is +# intentional on their part Patch: gn-0153d369-no-O3.patch BuildRequires: python3-devel From b7813d1e813eb8844bbf0e27ac6391f80ccc5b05 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 3 Aug 2022 15:15:43 -0400 Subject: [PATCH 09/17] Convert License to SPDX --- gn.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gn.spec b/gn.spec index 2be1bc6..90124e4 100644 --- a/gn.spec +++ b/gn.spec @@ -32,15 +32,16 @@ Version: 1953 Release: %autorelease -s %{access}git%{shortcommit} Summary: Meta-build system that generates build files for Ninja -# BSD except for src/base/third_party/icu/, which is (Unicode and MIT); note -# that the “ICU License” is MIT, -# https://fedoraproject.org/wiki/Licensing:MIT#Modern_style_.28ICU_Variant.29 +# The entire source is BSD-3-Clause, except: +# - src/base/third_party/icu/ is (Unicode AND ICU); see +# src/base/third_party/icu/LICENSE and also the header comment in +# src/base/third_party/icu/icu_utf.h. # -# Note that src/util/test/gn_test.cc, which is licensed ASL 2.0, does not -# contribute to the installed RPM, only to the gn_unittests executable; you may -# verify this with: +# Note that src/util/test/gn_test.cc, which is licensed Apache-2.0, does not +# contribute to the binary RPMs, only to the gn_unittests executable, which is +# not installed; you may verify this with: # gdb -ex 'set pagination off' -ex 'info sources' gn | grep -F gn_test.cc -License: BSD and Unicode and MIT +License: BSD-3-Clause AND Unicode AND ICU URL: https://gn.googlesource.com/gn Source0: %{url}/+archive/%{commit}.tar.gz#/gn-%{shortcommit}.tar.gz # Generated using script update-version: From 58c213a6bcc7db062a4a9e1b2ad2030ff6aa58f4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 19 Dec 2022 22:19:44 -0500 Subject: [PATCH 10/17] Indicate dirs. in files list with trailing slashes --- gn.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gn.spec b/gn.spec index 90124e4..721f5d5 100644 --- a/gn.spec +++ b/gn.spec @@ -193,10 +193,10 @@ grep -E '^#define[[:blank:]]+LAST_COMMIT_POSITION[[:blank:]]+'\ %if %{with html_docs} %doc README*.html %endif -%doc docs -%doc examples -%doc infra -%doc tools +%doc docs/ +%doc examples/ +%doc infra/ +%doc tools/ %changelog From 69a2a53eddb0455e5a06efd8a18e656b1ff8d2d2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 20 Dec 2023 08:20:00 -0500 Subject: [PATCH 11/17] Update to version 2077 --- .gitignore | 2 ++ gn.spec | 8 ++++---- last_commit_position.h | 4 ++-- sources | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 5dbc255..1e8e515 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ /gn-4aa9bdfa.tar.gz /gn-b7903130.tar.gz /gn-e0afadf7.tar.gz +/gn-5e19d2fb.tar.gz +/gn-5e19d2fb166f.tar.gz diff --git a/gn.spec b/gn.spec index 721f5d5..2515bb0 100644 --- a/gn.spec +++ b/gn.spec @@ -25,10 +25,10 @@ Name: gn # 7. Commit the changes # # See https://gn.googlesource.com/gn/+log for the latest changes. -%global commit e0afadf7a743d5b14737bd454df45d5f1caf0d23 -%global access 20211205 -%global shortcommit %(c='%{commit}'; echo "${c:0:8}") -Version: 1953 +%global commit 5e19d2fb166fbd4f6f32147fbb2f497091a54ad8 +%global access 20231220 +%global shortcommit %(c='%{commit}'; echo "${c:0:12}") +Version: 2077 Release: %autorelease -s %{access}git%{shortcommit} Summary: Meta-build system that generates build files for Ninja diff --git a/last_commit_position.h b/last_commit_position.h index d71ef29..1eb41de 100644 --- a/last_commit_position.h +++ b/last_commit_position.h @@ -3,7 +3,7 @@ #ifndef OUT_LAST_COMMIT_POSITION_H_ #define OUT_LAST_COMMIT_POSITION_H_ -#define LAST_COMMIT_POSITION_NUM 1953 -#define LAST_COMMIT_POSITION "1953 (e0afadf7)" +#define LAST_COMMIT_POSITION_NUM 2077 +#define LAST_COMMIT_POSITION "2077 (5e19d2fb166f)" #endif // OUT_LAST_COMMIT_POSITION_H_ diff --git a/sources b/sources index 8d57f1c..6782902 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gn-e0afadf7.tar.gz) = 240c23311efad56c70e0f7e1639f709ca56ae375fea6293a93167029b40759b584fc865a9ad9799f5bb4b04a2e55c6be21d0278a214d5601350df4f280e63c96 +SHA512 (gn-5e19d2fb166f.tar.gz) = 618fc914f21721f819a232430862b4a42ef68cf6d8fe5e354aae3d9ebb30f92bd3d74b0079f1b37f987a9687a37c4cad2d57782cd27ca8a1fea3b461a921866e From 0f743e2408cfd02611e39f60b0c8df4d922f5346 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Oct 2023 07:35:49 -0400 Subject: [PATCH 12/17] Allow warnings in the build Turning all warnings into errors is too strict for downstream packaging. --- gn.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gn.spec b/gn.spec index 2515bb0..403a5a6 100644 --- a/gn.spec +++ b/gn.spec @@ -116,10 +116,13 @@ cp -vp misc/vim/README.md README-vim.md %build AR='gcc-ar'; export AR %set_build_flags +# Treating warnings as errors is too strict for downstream builds. +# # Both --use-icf and --use-lto add compiler flags that only work with clang++, # not with g++. We do get LTO on Fedora anyway, since we respect the # distribution’s build flags. %{python3} build/gen.py \ + --allow-warnings \ --no-last-commit-position \ --no-strip \ --no-static-libstdc++ From 9394eed1cc3f36661f80485317cdd90103d86f00 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 20 Dec 2023 08:27:22 -0500 Subject: [PATCH 13/17] Enable HTML documentation --- gn.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gn.spec b/gn.spec index 403a5a6..c8cf2bd 100644 --- a/gn.spec +++ b/gn.spec @@ -1,6 +1,5 @@ # Build HTML docs from markdown using pandoc? -# Currently, neither pandoc nor parallel is available in EPEL9. -%bcond_with html_docs +%bcond_without html_docs Name: gn # Upstream uses the number of commits in the git history as the version number. From f8de5c547a724958d0bb28b51283699c6b4b68f3 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Dec 2024 14:13:34 -0500 Subject: [PATCH 14/17] Respect %_smp_build_ncpus --- gn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index c8cf2bd..8cf3175 100644 --- a/gn.spec +++ b/gn.spec @@ -125,7 +125,7 @@ AR='gcc-ar'; export AR --no-last-commit-position \ --no-strip \ --no-static-libstdc++ -ninja -C out -v +ninja -j %{_smp_build_ncpus} -C out -v %if %{with html_docs} # There is a script, misc/help_as_html.py, that generates some HTML help, but From 3490c86d1d258813c37f005de61cbffc62ec3cfa Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Dec 2024 14:14:17 -0500 Subject: [PATCH 15/17] Use modern bcond style --- gn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn.spec b/gn.spec index 8cf3175..1720369 100644 --- a/gn.spec +++ b/gn.spec @@ -1,5 +1,5 @@ # Build HTML docs from markdown using pandoc? -%bcond_without html_docs +%bcond html_docs 1 Name: gn # Upstream uses the number of commits in the git history as the version number. From 97e898f3c9b8f6e6adf6714e2497cb5f1cde87d1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 31 May 2024 15:21:30 -0400 Subject: [PATCH 16/17] Correct SPDX License expression --- gn.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gn.spec b/gn.spec index 1720369..18946b3 100644 --- a/gn.spec +++ b/gn.spec @@ -32,7 +32,7 @@ Release: %autorelease -s %{access}git%{shortcommit} Summary: Meta-build system that generates build files for Ninja # The entire source is BSD-3-Clause, except: -# - src/base/third_party/icu/ is (Unicode AND ICU); see +# - src/base/third_party/icu/ is (Unicode-DFS-2016 AND ICU); see # src/base/third_party/icu/LICENSE and also the header comment in # src/base/third_party/icu/icu_utf.h. # @@ -40,7 +40,7 @@ Summary: Meta-build system that generates build files for Ninja # contribute to the binary RPMs, only to the gn_unittests executable, which is # not installed; you may verify this with: # gdb -ex 'set pagination off' -ex 'info sources' gn | grep -F gn_test.cc -License: BSD-3-Clause AND Unicode AND ICU +License: BSD-3-Clause AND Unicode-DFS-2016 AND ICU URL: https://gn.googlesource.com/gn Source0: %{url}/+archive/%{commit}.tar.gz#/gn-%{shortcommit}.tar.gz # Generated using script update-version: From 85f60778c2b5ab601185c1868d5ffba3d4abc1a2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Dec 2024 11:15:26 -0500 Subject: [PATCH 17/17] Add a SourceLicense field --- gn.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/gn.spec b/gn.spec index 18946b3..ac643a5 100644 --- a/gn.spec +++ b/gn.spec @@ -41,6 +41,7 @@ Summary: Meta-build system that generates build files for Ninja # not installed; you may verify this with: # gdb -ex 'set pagination off' -ex 'info sources' gn | grep -F gn_test.cc License: BSD-3-Clause AND Unicode-DFS-2016 AND ICU +SourceLicense: %{license} AND Apache-2.0 URL: https://gn.googlesource.com/gn Source0: %{url}/+archive/%{commit}.tar.gz#/gn-%{shortcommit}.tar.gz # Generated using script update-version: