From b7b34fde02e3d7ea1fc0c3bfd3058bb8ddac9ead Mon Sep 17 00:00:00 2001 From: Rootkit404 <175176948+RKNF404@users.noreply.github.com> Date: Sun, 23 Nov 2025 21:26:42 -0500 Subject: [PATCH 1/2] fix(spec): properly check off version tag --- build/trivalent.spec | 59 ++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/build/trivalent.spec b/build/trivalent.spec index 0dd3eed1..e41c5989 100644 --- a/build/trivalent.spec +++ b/build/trivalent.spec @@ -35,30 +35,47 @@ Source69: chromium-version.txt Name: %{chromium_name} %{lua: - local f = io.open(macros['_sourcedir']..'/chromium-version.txt', 'r') - local version_tag = f:read "*all" - - -- This IS NOT the version of the browser - -- It is only used if it is greater than the automated version detection - -- The point is to update to an arbitrary greater release tag, like early stable or beta tags - local off_version_tag = "141.0.7390.127" -- "142.0.7444.52" - -- This was added because Google shipped an update but forgot to ship a security fix: - -- https://github.com/uazo/cromite/issues/2427 - -- And didn't ship said update in stable. - -- Instead just pushed the fix the next major version instead. - - -- Strip the dots to make it just a number and compare - -- If greater than, we use the off-version - if string.gsub(off_version_tag, "%.", "") > string.gsub(version_tag, "%.", "") then - version_tag = off_version_tag - end + function splitVersionTag(vtag) + local a = {} + local i = 1 + for n in string.gmatch(vtag, ".") do + a[i] = n + i = i + 1 + end + return a + end + + local f = io.open(macros['_sourcedir']..'/chromium-version.txt', 'r') + local version_tag = f:read "*all" + + -- This IS NOT the version of the browser + -- It is only used if it is greater than the automated version detection + -- The point is to update to an arbitrary greater release tag, like early stable or beta tags + local off_version_tag = "141.0.7390.127" + -- This was added because Google shipped an update but forgot to ship a security fix: + -- https://github.com/uazo/cromite/issues/2427 + -- And didn't ship said update in stable. + -- Instead just pushed the fix the next major version instead. + + local vt = splitVersionTag(version_tag) + local ovt = splitVersionTag(off_version_tag) + + for i = 1, # vt do + if vt[i] > ovt[i] then + break + elseif ovt[i] > vt[i] then + version_tag = off_version_tag + break + end + end - -- This will dynamically set the version based on chromium's latest stable release channel - print("Version: "..version_tag.."\n") + -- This will dynamically set the version based on chromium's latest stable release channel + print("Version: "..version_tag.."\n") - -- This will automatically increment the release every ~1 hour - print("Release: "..(os.time() // 4000).."\n") + -- This will automatically increment the release every ~1 hour + print("Release: "..(os.time() // 4000).."\n") } + Summary: A security-focused browser built upon Google's Chromium web browser Url: https://github.com/secureblue/Trivalent License: (GPL-2.0-only WITH (Apache-2.0-note AND FTL-note AND WebView-note)) AND BSD-3-Clause AND BSD-2-Clause AND dtoa AND SunPro AND Zlib AND Libpng AND libtiff AND FTL AND LGPL-2.1 AND LGPL-2.1-or-later AND LGPL-3.0-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) From db285e740b573490b6c3d3a6cb88846751487976 Mon Sep 17 00:00:00 2001 From: Rootkit404 <175176948+RKNF404@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:46:56 -0500 Subject: [PATCH 2/2] chore(spec): use more descriptive variable names in version split --- build/trivalent.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/trivalent.spec b/build/trivalent.spec index e41c5989..bc5813de 100644 --- a/build/trivalent.spec +++ b/build/trivalent.spec @@ -36,13 +36,13 @@ Source69: chromium-version.txt Name: %{chromium_name} %{lua: function splitVersionTag(vtag) - local a = {} - local i = 1 - for n in string.gmatch(vtag, ".") do - a[i] = n - i = i + 1 + local vtag_array = {} + local index = 1 + for version_block in string.gmatch(vtag, ".") do + vtag_array[index] = version_block + index = index + 1 end - return a + return vtag_array end local f = io.open(macros['_sourcedir']..'/chromium-version.txt', 'r')