Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dynamic version building #111

Merged
merged 4 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions build/chromium.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,26 @@
%global __provides_exclude_from ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*)$
%global __requires_exclude ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*)$

Source69: chromium-version.txt

Name: hardened-chromium%{chromium_channel}
Version: 131.0.6778.69
Release: 1%{?dist}
%{lua:
local f = io.open(macros['_sourcedir']..'/chromium-version.txt', 'r')
local content = f:read "*all"
print("Version: "..content.."\n")
}
Release: %autorelease
Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
Url: http://www.chromium.org/Home
License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only)

Source0: chromium-%{version}-clean.tar.xz
Source2: chromium.conf
Source3: chromium-browser.sh
RoyalOughtness marked this conversation as resolved.
Show resolved Hide resolved
Source4: %{chromium_browser_channel}.desktop
Source9: chromium-browser.xml
Source11: master_preferences

### Patches ###
%{lua:
rpm.execute("pwd")
Expand Down Expand Up @@ -83,18 +95,6 @@ License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND G
os.execute("echo 'Autopatch H: "..macros['_hardeningPatchCount'].."'")
}

# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
# http://build.chromium.org/buildbot/official/
# For Chromium Fedora use chromium-latest.py --stable --ffmpegclean --ffmpegarm
# If you want to include the ffmpeg arm sources append the --ffmpegarm switch
# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%%{version}.tar.xz
Source0: chromium-%{version}-clean.tar.xz
Source2: chromium.conf
Source3: chromium-browser.sh
Source4: %{chromium_browser_channel}.desktop
Source9: chromium-browser.xml
Source11: master_preferences

BuildRequires: golang-github-evanw-esbuild
BuildRequires: clang
BuildRequires: clang-tools-extra
Expand Down
3 changes: 3 additions & 0 deletions copr_script.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#! /bin/bash -x

wget https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions/all/releases?filter=endtime=none -O chromium-version.json
cat chromium-version.json | grep \"version\" | grep -oh "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" > chromium-version.txt

cd hardened-chromium

# copy Fedora patches to the build dir
Expand Down