public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gn] epel8: Update to version 2614; Fixes RHBZ#2565644
@ 2026-11-03 16:56 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-11-03 16:56 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gn
Branch : epel8
Commit : b558eca3e8d58bcbb3197e0bdb80304520a48bae
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-11-03T16:55:16+00:00
Stats : +473/-84 in 11 file(s)
URL : https://src.fedoraproject.org/rpms/gn/c/b558eca3e8d58bcbb3197e0bdb80304520a48bae?branch=epel8
Log:
Update to version 2614; Fixes RHBZ#2565644
- Build with gcc-toolset-15 for C++23 support
---
diff --git a/0001-Downstream-only-do-not-override-optimization-flags.patch b/0001-Downstream-only-do-not-override-optimization-flags.patch
new file mode 100644
index 0000000..322b6d0
--- /dev/null
+++ b/0001-Downstream-only-do-not-override-optimization-flags.patch
@@ -0,0 +1,31 @@
+From 81c20b70dfb7b56b170b34fe2521ad2ed1947d9e Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Thu, 30 May 2024 08:49:32 -0400
+Subject: [PATCH 1/3] Downstream-only: do not override optimization flags
+
+Stop overriding optimization flags; not sent upstream because this is
+intentional on their part.
+
+https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags
+---
+ build/gen.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/build/gen.py b/build/gen.py
+index 5cb10156..14271053 100755
+--- a/build/gen.py
++++ b/build/gen.py
+@@ -521,10 +521,8 @@ def WriteGNNinja(path, platform, host, options, args_list):
+ cflags.extend(['-D_LIBCPP_DEBUG=1', '-D_GLIBCXX_DEBUG=1'])
+ else:
+ cflags.append('-DNDEBUG')
+- cflags.append('-O3')
+ if options.no_strip:
+ cflags.append('-g')
+- ldflags.append('-O3')
+ # Use -fdata-sections and -ffunction-sections to place each function
+ # or data item into its own section so --gc-sections can eliminate any
+ # unused functions and data items.
+--
+2.55.0
+
diff --git a/0002-Downstream-only-do-not-build-with-Wno-format.patch b/0002-Downstream-only-do-not-build-with-Wno-format.patch
new file mode 100644
index 0000000..72b3001
--- /dev/null
+++ b/0002-Downstream-only-do-not-build-with-Wno-format.patch
@@ -0,0 +1,25 @@
+From ab2e5c61e531b2282345c8d1dc346947438d1d69 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Thu, 30 May 2024 08:56:58 -0400
+Subject: [PATCH 2/3] Downstream-only: do not build with -Wno-format
+
+This conflicts with -Werror=format-security.
+---
+ build/gen.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/build/gen.py b/build/gen.py
+index 14271053..cdae2626 100755
+--- a/build/gen.py
++++ b/build/gen.py
+@@ -606,7 +606,6 @@ def WriteGNNinja(path, platform, host, options, args_list):
+ '-Wno-implicit-fallthrough',
+ '-Wno-redundant-move',
+ '-Wno-unused-variable',
+- '-Wno-format', # Use of %llx, which is supported by _UCRT, false positive
+ '-Wno-strict-aliasing', # Dereferencing punned pointer
+ '-Wno-cast-function-type', # Casting FARPROC to RegDeleteKeyExPtr
+ ])
+--
+2.55.0
+
diff --git a/0003-Downstream-only-omit-check_formatter-test.patch b/0003-Downstream-only-omit-check_formatter-test.patch
new file mode 100644
index 0000000..b2e7917
--- /dev/null
+++ b/0003-Downstream-only-omit-check_formatter-test.patch
@@ -0,0 +1,35 @@
+From e6ad5a4f7acaefb5ecabd298b0447044d9009417 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Mon, 17 Aug 2026 08:18:32 +0100
+Subject: [PATCH 3/3] =?UTF-8?q?Downstream-only:=20omit=20=E2=80=9Ccheck=5F?=
+ =?UTF-8?q?formatter=E2=80=9D=20test?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is only suitable for upstream CI; our version of clang-format may
+not produce identical results.
+---
+ build/gen.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/build/gen.py b/build/gen.py
+index cdae2626..086b2940 100755
+--- a/build/gen.py
++++ b/build/gen.py
+@@ -440,12 +440,6 @@ def WriteGenericNinja(path, static_libraries, executables,
+ ninja.Phony(
+ 'check_all',
+ inputs=[
+- ninja.RunBinary(
+- 'check_formatter',
+- inputs=[ninja.source_file('tools/run_formatter.sh')],
+- implicit_inputs=ninja.directory(ninja.source_file('src'), ['target']),
+- args='--diff',
+- ),
+ ninja.RunBinary(
+ 'check_reference',
+ inputs=[ninja.source_file('tools/update_reference.sh')],
+--
+2.55.0
+
diff --git a/LICENSE-2.0.txt b/LICENSE-2.0.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/LICENSE-MIT b/LICENSE-MIT
new file mode 100644
index 0000000..31aa793
--- /dev/null
+++ b/LICENSE-MIT
@@ -0,0 +1,23 @@
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without
+limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/gn-0153d369-no-O3.patch b/gn-0153d369-no-O3.patch
deleted file mode 100644
index 13a4820..0000000
--- a/gn-0153d369-no-O3.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur gn-0153d369bbccc908f4da4993b1ba82728055926a-original/build/gen.py gn-0153d369bbccc908f4da4993b1ba82728055926a/build/gen.py
---- gn-0153d369bbccc908f4da4993b1ba82728055926a-original/build/gen.py 2021-09-27 14:58:14.000000000 -0400
-+++ gn-0153d369bbccc908f4da4993b1ba82728055926a/build/gen.py 2021-09-27 15:59:42.330405195 -0400
-@@ -344,10 +344,8 @@
- cflags.extend(['-O0', '-g'])
- else:
- cflags.append('-DNDEBUG')
-- cflags.append('-O3')
- if options.no_strip:
- cflags.append('-g')
-- ldflags.append('-O3')
- # Use -fdata-sections and -ffunction-sections to place each function
- # or data item into its own section so --gc-sections can eliminate any
- # unused functions and data items.
diff --git a/gn.rpmlintrc b/gn.rpmlintrc
index d96c788..3ad63bf 100644
--- a/gn.rpmlintrc
+++ b/gn.rpmlintrc
@@ -1,8 +1,11 @@
-# This is a maintainer script, so it should indeed be executable:
-addFilter(r' strange-permission update-version 775$')
-# The source URL exports a tarball directly from git; while the contents are
-# stable since it references a particular commit, the tarball checksum and even
-# file size are different every time. I haven’t looked too closely, but I
-# suspect this is due to timestamps in the tar stream being based on the access
-# time rather than the time of the commit.
-addFilter(r' file-size-mismatch gn-[0-9A-Fa-f]{8}\.tar\.gz = ')
+# Hardlinking duplicates is not worthwhile because these files are small and few
+# in number.
+addFilter(r"gn-doc\..*: files-duplicate /.*\.json")
+# This script is for documentation only; it has a weird polyglot self-exec
+# trick.
+addFilter(r"gn-doc\..*: (potential-bashisms|bin-sh-syntax-error) /.*/infra/recipes\.py")
+# These are all acceptable in the context of sample projects in the docs:
+addFilter(r"gn-doc\..*: (zero-length|version-control-internal-file) /.*/examples/")
+addFilter(r"gn-doc\..*: hidden-file-or-dir /.*/examples/.*/\.(gitignore|gn)")
+# This script is for looking at, not for executing:
+addFilter(r"gn-doc\..*: env-script-interpreter /.*/infra/config/main\.star .*")
diff --git a/gn.spec b/gn.spec
index 9d6a8c7..1cef04c 100644
--- a/gn.spec
+++ b/gn.spec
@@ -1,5 +1,7 @@
-# Build HTML docs from markdown using pandoc?
-%bcond_without html_docs
+# We ought to be able to re-generate source files that come from cxxbridge, but
+# this currently fails with an “unsupported attribute” error for
+# #[cxx_return_type = "…"] in src/gn/starlark/crates/ffi/src/bridge.rs.
+%bcond_with regenerate_bridge
Name: gn
# Upstream uses the number of commits in the git history as the version number.
@@ -24,51 +26,99 @@ Name: gn
# 7. Commit the changes
#
# See https://gn.googlesource.com/gn/+log for the latest changes.
-%global commit 5e19d2fb166fbd4f6f32147fbb2f497091a54ad8
-%global access 20231220
+%global commit ed7fee04cb30b96ed40ef188acfad5417349e399
+%global access 20261103
%global shortcommit %(c='%{commit}'; echo "${c:0:12}")
-Version: 2077
+%global position 2614
+Version: %{position}
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-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.
#
-# 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-3-Clause AND Unicode-DFS-2016 AND ICU
+# - 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.
+# - src/gn/starlark/vendor/cxx/include/cxx.h is (MIT OR Apache-2.0); per
+# src/gn/starlark/vendor/cxx/README.md, it is
+# https://github.com/dtolnay/cxx/blob/1.0.194/include/cxx.h, but it is most
+# likely actually based on the version in src/gn/starlark/Cargo.lock at any
+# given time.
+%global bundled_cxx_version 1.0.196
+# The license texts for this are missing,
+# https://gn.issues.chromium.org/issues/529413117.
+# - gn/src/util/test/gn_test.cc, gn/infra/recipes/gn.py, and
+# gn/infra/recipes.py are Apache-2.0. The first does not contribute to the
+# binary RPMs, only to the gn_unittests executable, which is not installed;
+# not installed; you may verify this with:
+# gdb -ex 'set pagination off' -ex 'info sources' gn | grep -F gn_test.cc
+# However, the two files from gn/infra/ are installed in the -doc subpackage.
+# The required Apache-2.0 license text is missing,
+# https://gn.issues.chromium.org/issues/529413117.
+License: %{shrink:
+ BSD-3-Clause AND
+ ICU AND
+ Unicode-DFS-2016 AND
+ (Apache-2.0 OR MIT)
+ }
URL: https://gn.googlesource.com/gn
Source0: %{url}/+archive/%{commit}.tar.gz#/gn-%{shortcommit}.tar.gz
# Generated using script update-version:
Source1: last_commit_position.h
Source2: update-version
-
+# Missing Apache-2.0 license text for src/gn/starlark/vendor/cxx/include/cxx.h,
+# gn/src/util/test/gn_test.cc, gn/infra/recipes/gn.py, and gn/infra/recipes.py.
+# https://gn.issues.chromium.org/issues/529413117
+Source3: https://www.apache.org/licenses/LICENSE-2.0.txt
+# Missing MIT license text for src/gn/starlark/vendor/cxx/include/cxx.h; the
+# corresponding LICENSE-APACHE would be identical to LICENSE-2.0.txt, above, so
+# we don’t need another copy.
+# https://gn.issues.chromium.org/issues/529413117
+Source4: https://github.com/dtolnay/cxx/raw/refs/tags/%{bundled_cxx_version}/LICENSE-MIT
+
+# Downstream-only: do not override optimization flags
+#
# Stop overriding optimization flags; not sent upstream because this is
-# intentional on their part
-Patch0: gn-0153d369-no-O3.patch
+# intentional on their part.
+#
+# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags
+Patch1: 0001-Downstream-only-do-not-override-optimization-flags.patch
+# Downstream-only: do not build with -Wno-format
+#
+# This conflicts with -Werror=format-security.
+Patch2: 0002-Downstream-only-do-not-build-with-Wno-format.patch
+# Downstream-only: omit “check_formatter” test
+#
+# This is only suitable for upstream CI; our version of clang-format may not
+# produce identical results.
+Patch3: 0003-Downstream-only-omit-check_formatter-test.patch
+
+# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
+ExcludeArch: %{ix86}
-BuildRequires: python3-devel
+# The build/gen.py script contains the walrus (:=) operator, so it requires at
+# least Python 3.8; the system Python is 3.6.
+BuildRequires: python3.12-devel
BuildRequires: ninja-build
-BuildRequires: gcc-c++
+# C++23 is now required, so the system toolchain won’t do. As long as we are
+# using a non-default toolchain, let’s choose the newest available gcc-toolset.
+BuildRequires: gcc-toolset-15-gcc-c++
+BuildRequires: gcc-toolset-15-gcc-plugin-annobin
# For RPM macros:
BuildRequires: emacs-common
-%if %{with html_docs}
-BuildRequires: pandoc
-BuildRequires: parallel
-%endif
BuildRequires: help2man
+%if %{with regenerate_bridge}
+BuildRequires: cxxbridge
+%endif
Requires: vim-filesystem
+# For vimfiles/gn-format.py; should be OK with system Python 3.6 interpreter
Requires: python3
Provides: vim-gn = %{version}-%{release}
-Requires: emacs-filesystem >= %{_emacs_version}
+Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
Provides: emacs-gn = %{version}-%{release}
# src/base/third_party/icu/icu_utf.h:
@@ -84,6 +134,10 @@ Provides: emacs-gn = %{version}-%{release}
# See src/base/third_party/icu/README.chromium, from which the version number
# is taken.
Provides: bundled(icu) = 60
+%if %{without regenerate_bridge}
+# src/gn/starlark/vendor/cxx/include/cxx.h
+Provides: bundled(crate(cxx)) = %{bundled_cxx_version}
+%endif
%description
GN is a meta-build system that generates build files for Ninja.
@@ -93,6 +147,13 @@ GN is a meta-build system that generates build files for Ninja.
Summary: Documentation for GN
BuildArch: noarch
+# The entire source is BSD-3-Clause, except where otherwise noted in the
+# comment above the base package’s License field.
+#
+# The -doc subpackage contains files that are Apache-2.0:
+# gn/infra/recipes/gn.py and gn/infra/recipes.py.
+License: BSD-3-Clause AND Apache-2.0
+
%description doc
The gn-doc package contains detailed documentation for GN.
@@ -100,24 +161,39 @@ The gn-doc package contains detailed documentation for GN.
%prep
%autosetup -c -n gn-%{commit} -p1
-# Use pre-generated last_commit_position.h.
-mkdir -p ./out
-cp -vp '%{SOURCE1}' ./out
-
# Copy and rename vim extensions readme for use in the main documentation
# directory.
-cp -vp misc/vim/README.md README-vim.md
+cp --preserve misc/vim/README.md README-vim.md
# Fix shebangs in examples and such.
%py3_shebang_fix .
+# Copy in missing license texts.
+cp --preserve '%{SOURCE3}' '%{SOURCE4}' .
+# Put the ICU license text somewhere it’s easy to install, with a unique name.
+cp --preserve src/base/third_party/icu/LICENSE LICENSE-ICU
+
+rm src/gn/starlark/Cargo.lock
+
%build
-# We need to set CC and CXX explicitly before Fedora 33, including on the EPELs.
-CC='gcc'; export CC
-CXX='g++'; export CXX
-AR='gcc-ar'; export AR
%set_build_flags
+export CC="${CC-gcc}"
+export CXX="${CXX-g++}"
+export AR="${AR-gcc-ar}"
+. /opt/rh/gcc-toolset-15/enable
+
+%if %{with regenerate_bridge}
+# Trick src/gn/ffi/update_bridge.sh into finding the system-wide cxxbridge
+# executable and not trying to build one with cargo.
+ln -s /usr src/gn/ffi/.bin
+# Re-generate:
+# - src/gn/starlark/vendor/cxx/include/cxx.h
+# - src/gn/ffi/bridge.h
+# - src/gn/ffi/bridge.cc
+bash -x src/gn/ffi/update_bridge.sh
+%endif
+
# Treating warnings as errors is too strict for downstream builds.
#
# Both --use-icf and --use-lto add compiler flags that only work with clang++,
@@ -128,13 +204,18 @@ AR='gcc-ar'; export AR
--no-last-commit-position \
--no-strip \
--no-static-libstdc++
-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
-# pandoc does a better job and we can cover more Markdown sources.
-find . -type f -name '*.md' | parallel -v pandoc -o '{.}.html' '{}'
-%endif
+# Even with --no-last-commit-position, build/gen.py now generates a dummy
+# out/last_commit_position.h with:
+#
+# #define LAST_COMMIT_POSITION_NUM 0
+# #define LAST_COMMIT_POSITION "0 (UNKNOWN)"
+#
+# Therefore, we must wait until after we have run build/gen.py to copy in the
+# correct, pre-generated last_commit_position.h.
+cp --preserve '%{SOURCE1}' ./out/
+
+%ninja_build -C out
help2man \
--name='%{summary}' \
@@ -142,41 +223,45 @@ help2man \
--no-info \
./out/gn |
# Clean up a couple of stray binary bytes in the help output
- tr -d '\302\240' |
+ tr --delete '\302\240' |
# Format the entries within the sections as tagged paragraphs, and italicise
# [placeholders in square brackets].
- sed -r -e 's/(^[[:alnum:]_]+:)/.TP\n.B \1\n/' \
- -e 's/\[([^]]+)\]/\\fI[\1]\\fR/g' > out/gn.1
+ sed --regexp-extended --expression='s/(^[[:alnum:]_]+:)/.TP\n.B \1\n/' \
+ --expression='s/\[([^]]+)\]/\\fI[\1]\\fR/g' > out/gn.1
%install
-install -t '%{buildroot}%{_bindir}' -D -p out/gn
+install -D --preserve-timestamps --target='%{buildroot}%{_bindir}' out/gn
-install -d '%{buildroot}%{_datadir}/vim/vimfiles'
-cp -vrp misc/vim/* '%{buildroot}%{_datadir}/vim/vimfiles'
+install --directory '%{buildroot}%{_datadir}/vim/vimfiles'
+cp --verbose --recursive --preserve misc/vim/* \
+ '%{buildroot}%{_datadir}/vim/vimfiles'
find '%{buildroot}%{_datadir}/vim/vimfiles' \
-type f -name 'README.*' -print -delete
-%py_byte_compile %{python3} '%{buildroot}%{_datadir}/vim/vimfiles/gn-format.py'
-install -t '%{buildroot}%{_emacs_sitestartdir}' -D -p -m 0644 misc/emacs/*.el
+install -D --preserve-timestamps --mode=0644 \
+ --target='%{buildroot}%{_emacs_sitestartdir}' misc/emacs/*.el
-install -t '%{buildroot}%{_mandir}/man1' -D -m 0644 -p out/gn.1
+install -D --preserve-timestamps --mode=0644 \
+ --target='%{buildroot}%{_mandir}/man1' out/gn.1
%check
out/gn_unittests
# Verify consistency of the version header with the spec file
-grep -E '^#define[[:blank:]]+LAST_COMMIT_POSITION_NUM[[:blank:]]+'\
-'%{version}[[:blank:]]*' \
+grep --extended-regexp \
+ '^#define[[:blank:]]+LAST_COMMIT_POSITION_NUM[[:blank:]]+'\
+'%{position}[[:blank:]]*' \
'out/last_commit_position.h' >/dev/null
-grep -E '^#define[[:blank:]]+LAST_COMMIT_POSITION[[:blank:]]+'\
-'"%{version} \(%{shortcommit}\)"[[:blank:]]*' \
+grep --extended-regexp \
+ '^#define[[:blank:]]+LAST_COMMIT_POSITION[[:blank:]]+'\
+'"%{position} \(%{shortcommit}\)"[[:blank:]]*' \
'out/last_commit_position.h' >/dev/null
%files
-%license LICENSE
+%license LICENSE LICENSE-ICU LICENSE-2.0.txt LICENSE-MIT
%{_bindir}/gn
%{_mandir}/man1/gn.1*
@@ -191,13 +276,10 @@ grep -E '^#define[[:blank:]]+LAST_COMMIT_POSITION[[:blank:]]+'\
%files doc
-%license LICENSE src/base/third_party/icu/README.chromium
+%license LICENSE LICENSE-2.0.txt
%doc AUTHORS
%doc OWNERS
%doc README*.md
-%if %{with html_docs}
-%doc README*.html
-%endif
%doc docs/
%doc examples/
%doc infra/
diff --git a/last_commit_position.h b/last_commit_position.h
index 1eb41de..8a58d9f 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 2077
-#define LAST_COMMIT_POSITION "2077 (5e19d2fb166f)"
+#define LAST_COMMIT_POSITION_NUM 2614
+#define LAST_COMMIT_POSITION "2614 (ed7fee04cb30)"
#endif // OUT_LAST_COMMIT_POSITION_H_
diff --git a/sources b/sources
index 6782902..898dcad 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gn-5e19d2fb166f.tar.gz) = 618fc914f21721f819a232430862b4a42ef68cf6d8fe5e354aae3d9ebb30f92bd3d74b0079f1b37f987a9687a37c4cad2d57782cd27ca8a1fea3b461a921866e
+SHA512 (gn-ed7fee04cb30.tar.gz) = 51472f467a4c23950ad76eee3532a71fe14a3fbc830920c7f235f0b1cc47c0c8c4b6feda475c0b6efd022daaa58ffbdf25bb316e2a4f991d6a6bae968080a5de
diff --git a/update-version b/update-version
index 68ca726..8d63b64 100755
--- a/update-version
+++ b/update-version
@@ -65,7 +65,9 @@ then
check_equal_commits "${COMMIT}"
fi
git checkout "${COMMIT}"
-python3 './build/gen.py'
+# If we don’t set CXX, the script tries to install a hermetic clang toolchain
+# from the network.
+CXX='g++' python3 './build/gen.py'
cp -vp './out/last_commit_position.h' "${SRCDIR}/"
cd "${SRCDIR}"
@@ -83,7 +85,7 @@ sed -r -i \
-e 's/(%global[[:blank:]]+access[[:blank:]]+)[[:digit:]]{8}[[:blank:]]*$/\1'"$(
date -u '+%Y%m%d'
)/" \
- -e 's/(Version:[[:blank:]]+)[[:digit:]]+[[:blank:]]*$/\1'"${POSITION}/" \
+ -e 's/(%global[[:blank:]]+position[[:blank:]]+)[[:digit:]]+[[:blank:]]*$/\1'"${POSITION}/" \
"${SPEC}"
# Download the new tarball
@@ -95,7 +97,7 @@ fedpkg new-sources "$(
grep -E '^Source0:' |
sed -r 's|.*/||'
)"
-fedpkg commit -m "Update to version ${POSITION}"
git add 'last_commit_position.h' gn.spec
+fedpkg commit -m "Update to version ${POSITION}"
# vim: tw=78 ts=2 sw=2 sts=2 et ai nojs
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 16:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 16:56 [rpms/gn] epel8: Update to version 2614; Fixes RHBZ#2565644 Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox