diff --git a/.gitignore b/.gitignore index b4f8969..1e8e515 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,28 @@ /64b3b9401c1c3ed5f3c43c1cac00b91f83597ab8.tar.gz /gn-64b3b940.tar.gz /gn-b2e3d862.tar.gz +/gn-a95c8a3c.tar.gz +/gn-dba01723.tar.gz +/gn-6771ce56.tar.gz +/gn-39a87c0b.tar.gz +/gn-d2dce752.tar.gz +/gn-e9b84332.tar.gz +/gn-d924640c.tar.gz +/gn-4d207c94.tar.gz +/gn-24e2f7df.tar.gz +/gn-d565aa3e.tar.gz +/gn-eea3906f.tar.gz +/gn-69ec4fca.tar.gz +/gn-46b572ce.tar.gz +/gn-07e2e1b9.tar.gz +/gn-de86ec41.tar.gz +/gn-0153d369.tar.gz +/gn-693f9fb8.tar.gz +/gn-8926696a.tar.gz +/gn-90294ccd.tar.gz +/gn-18512455.tar.gz +/gn-4aa9bdfa.tar.gz +/gn-b7903130.tar.gz +/gn-e0afadf7.tar.gz +/gn-5e19d2fb.tar.gz +/gn-5e19d2fb166f.tar.gz diff --git a/changelog b/changelog new file mode 100644 index 0000000..8ababe5 --- /dev/null +++ b/changelog @@ -0,0 +1,24 @@ +* Mon Mar 29 2021 Benjamin A. Beasley - 1894-4.20210329gitb2e3d862 +- Update to version 1894 + +* Wed Mar 17 2021 Benjamin A. Beasley - 1893-3.20210314git64b3b940 +- Stop installing xemacs plugins + (https://fedoraproject.org/wiki/Changes/Deprecate_xemacs) + +* Wed Mar 17 2021 Benjamin A. Beasley - 1893-2.20210314git64b3b940 +- Improved source URL based on package review feedback + +* Mon Mar 1 2021 Benjamin A. Beasley - 1893-1.20210314git64b3b940 +- Update to version 1893 + +* Mon Mar 1 2021 Benjamin A. Beasley - 1891-1.20210127gitdfcbc6fe +- Update to version 1891 + +* Sun Jan 3 2021 Benjamin A. Beasley - 1884-1.20210127git94bda7cc +- Update to version 1884 + +* Sun Jan 3 2021 Benjamin A. Beasley - 1876-1.20210103git0d67e272 +- Update to version 1876 + +* Sat Dec 19 2020 Benjamin A. Beasley - 1875-1.20201219git4e260f1d +- Initial spec file diff --git a/chromium-84.0.4147.105-gn-gcc-cleanup.patch b/chromium-84.0.4147.105-gn-gcc-cleanup.patch deleted file mode 100644 index cc8ad7c..0000000 --- a/chromium-84.0.4147.105-gn-gcc-cleanup.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up chromium-84.0.4147.105/tools/gn/src/gn/err.h.gn-gcc-cleanup chromium-84.0.4147.105/tools/gn/src/gn/err.h ---- chromium-84.0.4147.105/tools/gn/src/gn/err.h.gn-gcc-cleanup 2020-08-01 10:04:57.354719575 -0400 -+++ chromium-84.0.4147.105/tools/gn/src/gn/err.h 2020-08-01 10:04:51.653974728 -0400 -@@ -55,7 +55,7 @@ class Err { - const std::string& help_text = std::string()); - - Err(const Err& other); -- -+ Err& operator=(const Err& other) = default; - ~Err(); - - bool has_error() const { return has_error_; } -diff -up chromium-84.0.4147.105/tools/gn/src/gn/label_pattern.h.gn-gcc-cleanup chromium-84.0.4147.105/tools/gn/src/gn/label_pattern.h ---- chromium-84.0.4147.105/tools/gn/src/gn/label_pattern.h.gn-gcc-cleanup 2020-08-01 10:24:18.405934036 -0400 -+++ chromium-84.0.4147.105/tools/gn/src/gn/label_pattern.h 2020-08-01 10:24:56.664265755 -0400 -@@ -33,6 +33,7 @@ class LabelPattern { - const std::string_view& name, - const Label& toolchain_label); - LabelPattern(const LabelPattern& other); -+ LabelPattern& operator=(const LabelPattern& other) = default; - ~LabelPattern(); - - // Converts the given input string to a pattern. This does special stuff -diff -up chromium-84.0.4147.105/tools/gn/src/gn/substitution_list.h.gn-gcc-cleanup chromium-84.0.4147.105/tools/gn/src/gn/substitution_list.h ---- chromium-84.0.4147.105/tools/gn/src/gn/substitution_list.h.gn-gcc-cleanup 2020-08-01 10:04:51.721971684 -0400 -+++ chromium-84.0.4147.105/tools/gn/src/gn/substitution_list.h 2020-08-01 10:04:51.765969715 -0400 -@@ -15,6 +15,7 @@ class SubstitutionList { - public: - SubstitutionList(); - SubstitutionList(const SubstitutionList& other); -+ SubstitutionList& operator=(const SubstitutionList& other) = default; - ~SubstitutionList(); - - bool Parse(const Value& value, Err* err); -diff -up chromium-84.0.4147.105/tools/gn/src/gn/substitution_pattern.h.gn-gcc-cleanup chromium-84.0.4147.105/tools/gn/src/gn/substitution_pattern.h ---- chromium-84.0.4147.105/tools/gn/src/gn/substitution_pattern.h.gn-gcc-cleanup 2020-08-01 10:04:51.637975444 -0400 -+++ chromium-84.0.4147.105/tools/gn/src/gn/substitution_pattern.h 2020-08-01 10:04:57.305721767 -0400 -@@ -35,6 +35,7 @@ class SubstitutionPattern { - - SubstitutionPattern(); - SubstitutionPattern(const SubstitutionPattern& other); -+ SubstitutionPattern& operator=(const SubstitutionPattern& other) = default; - ~SubstitutionPattern(); - - // Parses the given string and fills in the pattern. The pattern must only diff --git a/gn-0153d369-no-O3.patch b/gn-0153d369-no-O3.patch new file mode 100644 index 0000000..13a4820 --- /dev/null +++ b/gn-0153d369-no-O3.patch @@ -0,0 +1,14 @@ +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.spec b/gn.spec index 49858f4..9d6a8c7 100644 --- a/gn.spec +++ b/gn.spec @@ -21,40 +21,42 @@ Name: gn # 4. Download the source tarball (spectool -g) # 5. Update the sources (fedpkg new-sources %%{commit}.tar.gz) # 6. Stage all changes in git -%global commit b2e3d8622c1ce1bd853c7a11f62a739946669cdd -%global access 20210329 -%global shortcommit %(echo %{commit} | cut -b -8) -Version: 1894 -Release: 4.%{access}git%{shortcommit}%{?dist} +# 7. Commit the changes +# +# See https://gn.googlesource.com/gn/+log for the latest changes. +%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 -# 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-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 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 -URL: https://%{name}.googlesource.com/%{name} -Source0: %{url}/+archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz +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: Source1: last_commit_position.h Source2: update-version -# Clean up compiler warnings on gcc/g++: -Patch0: https://src.fedoraproject.org/rpms/chromium/raw/ce30313f5e4af121140c037bf026453355534f24/f/chromium-84.0.4147.105-gn-gcc-cleanup.patch +# Stop overriding optimization flags; not sent upstream because this is +# intentional on their part +Patch0: gn-0153d369-no-O3.patch -# The python3_pkgversion macro is required for EPEL; see -# https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL. On Fedora (and -# EPEL8) it simply expands to “3”. -BuildRequires: python%{python3_pkgversion} -BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python3-devel BuildRequires: ninja-build BuildRequires: gcc-c++ -BuildRequires: /usr/bin/pathfix.py +# For RPM macros: +BuildRequires: emacs-common %if %{with html_docs} BuildRequires: pandoc @@ -63,13 +65,25 @@ BuildRequires: parallel BuildRequires: help2man Requires: vim-filesystem -Requires: python%{python3_pkgversion} -Provides: vim-%{name} = %{version}-%{release} +Requires: python3 +Provides: vim-gn = %{version}-%{release} -BuildRequires: emacs Requires: emacs-filesystem >= %{_emacs_version} -Provides: emacs-%{name} = %{version}-%{release} +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. @@ -80,11 +94,11 @@ Summary: Documentation for GN BuildArch: noarch %description doc -The %{name}-doc package contains detailed documentation for GN. +The gn-doc package contains detailed documentation for GN. %prep -%autosetup -c -n %{name}-%{commit} -p3 +%autosetup -c -n gn-%{commit} -p1 # Use pre-generated last_commit_position.h. mkdir -p ./out @@ -96,8 +110,6 @@ cp -vp misc/vim/README.md README-vim.md # Fix shebangs in examples and such. %py3_shebang_fix . -# On EPEL7, we would have to work around the missing py3_shebang_fix macro, but -# the package would not build anyway because it requires C++17 support. %build @@ -106,14 +118,17 @@ CC='gcc'; export CC CXX='g++'; export CXX 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 \ +%{python3} build/gen.py \ + --allow-warnings \ --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 @@ -123,30 +138,29 @@ find . -type f -name '*.md' | parallel -v pandoc -o '{.}.html' '{}' help2man \ --name='%{summary}' \ - --version-string="%{name} $(./out/%{name} --version)" \ + --version-string="gn $(./out/gn --version)" \ --no-info \ - ./out/%{name} | + ./out/gn | # Clean up a couple of stray binary bytes in the help output tr -d '\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/%{name}.1 + -e 's/\[([^]]+)\]/\\fI[\1]\\fR/g' > out/gn.1 %install -install -d '%{buildroot}%{_bindir}' -install -t '%{buildroot}%{_bindir}' -p out/%{name} +install -t '%{buildroot}%{_bindir}' -D -p out/gn install -d '%{buildroot}%{_datadir}/vim/vimfiles' cp -vrp misc/vim/* '%{buildroot}%{_datadir}/vim/vimfiles' -%py_byte_compile %{__python3} '%{buildroot}%{_datadir}/vim/vimfiles/%{name}-format.py' +find '%{buildroot}%{_datadir}/vim/vimfiles' \ + -type f -name 'README.*' -print -delete +%py_byte_compile %{python3} '%{buildroot}%{_datadir}/vim/vimfiles/gn-format.py' -install -d '%{buildroot}%{_emacs_sitestartdir}' -install -t '%{buildroot}%{_emacs_sitestartdir}' -p -m 0644 misc/emacs/*.el +install -t '%{buildroot}%{_emacs_sitestartdir}' -D -p -m 0644 misc/emacs/*.el -install -d '%{buildroot}%{_mandir}/man1' -install -t '%{buildroot}%{_mandir}/man1' -m 0644 -p out/%{name}.1 +install -t '%{buildroot}%{_mandir}/man1' -D -m 0644 -p out/gn.1 %check @@ -163,56 +177,32 @@ grep -E '^#define[[:blank:]]+LAST_COMMIT_POSITION[[:blank:]]+'\ %files %license LICENSE -%{_bindir}/%{name} +%{_bindir}/gn -%{_mandir}/man1/%{name}.1* +%{_mandir}/man1/gn.1* -%exclude %{_datadir}/vim/vimfiles/README.* -%{_datadir}/vim/vimfiles/%{name}-format.py -%{_datadir}/vim/vimfiles/autoload/%{name}.vim -%{_datadir}/vim/vimfiles/ftdetect/%{name}filetype.vim -%{_datadir}/vim/vimfiles/ftplugin/%{name}.vim -%{_datadir}/vim/vimfiles/syntax/%{name}.vim +%{_datadir}/vim/vimfiles/gn-format.py +%{_datadir}/vim/vimfiles/autoload/gn.vim +%{_datadir}/vim/vimfiles/ftdetect/gnfiletype.vim +%{_datadir}/vim/vimfiles/ftplugin/gn.vim +%{_datadir}/vim/vimfiles/syntax/gn.vim -%{_emacs_sitestartdir}/%{name}-mode.el +%{_emacs_sitestartdir}/gn-mode.el %files doc -%license LICENSE +%license LICENSE src/base/third_party/icu/README.chromium %doc AUTHORS %doc OWNERS %doc README*.md %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 -* Mon Mar 29 2021 Benjamin A. Beasley - 1894-4.20210329gitb2e3d862 -- Update to version 1894 - -* Wed Mar 17 2021 Benjamin A. Beasley - 1893-3.20210314git64b3b940 -- Stop installing xemacs plugins - (https://fedoraproject.org/wiki/Changes/Deprecate_xemacs) - -* Wed Mar 17 2021 Benjamin A. Beasley - 1893-2.20210314git64b3b940 -- Improved source URL based on package review feedback - -* Mon Mar 1 2021 Benjamin A. Beasley - 1893-1.20210314git64b3b940 -- Update to version 1893 - -* Mon Mar 1 2021 Benjamin A. Beasley - 1891-1.20210127gitdfcbc6fe -- Update to version 1891 - -* Sun Jan 3 2021 Benjamin A. Beasley - 1884-1.20210127git94bda7cc -- Update to version 1884 - -* Sun Jan 3 2021 Benjamin A. Beasley - 1876-1.20210103git0d67e272 -- Update to version 1876 - -* Sat Dec 19 2020 Benjamin A. Beasley - 1875-1.20201219git4e260f1d -- Initial spec file +%autochangelog diff --git a/last_commit_position.h b/last_commit_position.h index ce2614a..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 1894 -#define LAST_COMMIT_POSITION "1894 (b2e3d862)" +#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 77a1e9b..6782902 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gn-b2e3d862.tar.gz) = 1eb535474fa731bb8d92814b0a4d3fea9dad0a29b6b3fcee6f6a2477e8adec3ec765068cd099a11f7b6368a67eb2f5658eb3270f69731bd837207485f5baf7d1 +SHA512 (gn-5e19d2fb166f.tar.gz) = 618fc914f21721f819a232430862b4a42ef68cf6d8fe5e354aae3d9ebb30f92bd3d74b0079f1b37f987a9687a37c4cad2d57782cd27ca8a1fea3b461a921866e diff --git a/update-version b/update-version index fa30370..68ca726 100755 --- a/update-version +++ b/update-version @@ -14,7 +14,7 @@ then fi elif [ "$#" = '0' ] then - COMMIT='master' + COMMIT='main' fi if [ -z "${COMMIT}" ] then @@ -23,7 +23,7 @@ Usage: $0 [COMMIT] Parameters: COMMIT - full commit hash from upstream git (${REPO}); - otherwise the latest commit in master is used + otherwise the latest commit in main is used EOF exit 1 fi @@ -95,7 +95,7 @@ fedpkg new-sources "$( grep -E '^Source0:' | sed -r 's|.*/||' )" -rpmdev-bumpspec -c 'Update to version 1894' gn.spec +fedpkg commit -m "Update to version ${POSITION}" git add 'last_commit_position.h' gn.spec # vim: tw=78 ts=2 sw=2 sts=2 et ai nojs