Merge pull request 'Added Chromium Gost build' (#3) from i9e-common-gost into i9e

Reviewed-on: #3
i8ce
Arkady L. Shane 12 months ago
commit 798709746a

@ -5,3 +5,4 @@ dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
3e94bb4f999c636293bc745b02d98e7925da5616 SOURCES/node-v20.6.1-linux-arm64.tar.xz
0c4c4f30f072ddca7762f6fb9a1a0b414cf471da SOURCES/chromium-gost-2c81b2fed144086340d5220ef707350b7fb18ec9.tar.gz
36abebc8fd96cdcb5bf8ecd598055586ec434380 SOURCES/msspi-3c50c2d33a4bdf4effb01aaeb9ff5d5b67635a18.tar.gz
8e9bc55cce3899627b2810ecfe87116c5a9147b5 SOURCES/chromium-browser-gost-icons.tar.xz

1
.gitignore vendored

@ -5,3 +5,4 @@ SOURCES/node-v20.6.1-linux-x64.tar.xz
SOURCES/node-v20.6.1-linux-arm64.tar.xz
SOURCES/chromium-gost-2c81b2fed144086340d5220ef707350b7fb18ec9.tar.gz
SOURCES/msspi-3c50c2d33a4bdf4effb01aaeb9ff5d5b67635a18.tar.gz
SOURCES/chromium-browser-gost-icons.tar.xz

@ -0,0 +1,222 @@
[Desktop Entry]
Version=1.0
Name=Chromium Gost Web Browser
Name[ru]=Веб-браузер Chromium Gost
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[bg]=Уеб браузър
GenericName[ca]=Navegador web
GenericName[cs]=WWW prohlížeč
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής ιστού
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=ウェブブラウザ
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
GenericName[ko]=웹 브라우저
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Tīmekļa pārlūks
GenericName[ml]=വെബ് ബ്രൌസര്‍
GenericName[mr]=वेब ब्राऊजर
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador da Internet
GenericName[ro]=Navigator de Internet
GenericName[ru]=Веб-браузер
GenericName[sl]=Spletni brskalnik
GenericName[sv]=Webbläsare
GenericName[ta]=இணைய உலாவி
GenericName[th]=เว็บเบราว์เซอร์
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Навігатор Тенет
GenericName[zh_CN]=网页浏览器
GenericName[zh_HK]=網頁瀏覽器
GenericName[zh_TW]=網頁瀏覽器
# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[fil]=Web Browser
GenericName[hr]=Web preglednik
GenericName[id]=Browser Web
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
GenericName[sk]=WWW prehliadač
GenericName[sr]=Интернет прегледник
GenericName[te]=మహాతల అన్వేషి
GenericName[vi]=Bộ duyệt Web
# Gnome and KDE 3 uses Comment.
Comment=Access the Internet
Comment[ar]=الدخول إلى الإنترنت
Comment[bg]=Достъп до интернет
Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
Comment[ca]=Accedeix a Internet
Comment[cs]=Přístup k internetu
Comment[da]=Få adgang til internettet
Comment[de]=Internetzugriff
Comment[el]=Πρόσβαση στο Διαδίκτυο
Comment[en_GB]=Access the Internet
Comment[es]=Accede a Internet.
Comment[et]=Pääs Internetti
Comment[fi]=Käytä internetiä
Comment[fil]=I-access ang Internet
Comment[fr]=Accéder à Internet
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
Comment[he]=גישה אל האינטרנט
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
Comment[hr]=Pristup Internetu
Comment[hu]=Internetelérés
Comment[id]=Akses Internet
Comment[it]=Accesso a Internet
Comment[ja]=インターネットにアクセス
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
Comment[ko]=인터넷 연결
Comment[lt]=Interneto prieiga
Comment[lv]=Piekļūt internetam
Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
Comment[nb]=Gå til Internett
Comment[nl]=Verbinding maken met internet
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
Comment[pl]=Skorzystaj z internetu
Comment[pt]=Aceder à Internet
Comment[pt_BR]=Acessar a internet
Comment[ro]=Accesaţi Internetul
Comment[ru]=Доступ в Интернет
Comment[sk]=Prístup do siete Internet
Comment[sl]=Dostop do interneta
Comment[sr]=Приступите Интернету
Comment[sv]=Gå ut på Internet
Comment[ta]=இணையத்தை அணுகுதல்
Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
Comment[th]=เข้าถึงอินเทอร์เน็ต
Comment[tr]=İnternet'e erişin
Comment[uk]=Доступ до Інтернету
Comment[vi]=Truy cập Internet
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
Exec=/usr/bin/chromium-browser-gost %U
StartupNotify=true
Terminal=false
Icon=chromium-browser-gost
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=New Window
Name[am]=አዲስ መስኮት
Name[ar]=نافذة جديدة
Name[bg]=Нов прозорец
Name[bn]=নতুন উইন্ডো
Name[ca]=Finestra nova
Name[cs]=Nové okno
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[el]=Νέο Παράθυρο
Name[en_GB]=New Window
Name[es]=Nueva ventana
Name[et]=Uus aken
Name[fa]=پنجره جدید
Name[fi]=Uusi ikkuna
Name[fil]=New Window
Name[fr]=Nouvelle fenêtre
Name[gu]=નવી વિંડો
Name[hi]=नई विंडो
Name[hr]=Novi prozor
Name[hu]=Új ablak
Name[id]=Jendela Baru
Name[it]=Nuova finestra
Name[iw]=חלון חדש
Name[ja]=新規ウインドウ
Name[kn]=ಹೊಸ ವಿಂಡೊ
Name[ko]=새 창
Name[lt]=Naujas langas
Name[lv]=Jauns logs
Name[ml]=പുതിയ വിന്‍ഡോ
Name[mr]=नवीन विंडो
Name[nl]=Nieuw venster
Name[no]=Nytt vindu
Name[pl]=Nowe okno
Name[pt]=Nova janela
Name[pt_BR]=Nova janela
Name[ro]=Fereastră nouă
Name[ru]=Новое окно
Name[sk]=Nové okno
Name[sl]=Novo okno
Name[sr]=Нови прозор
Name[sv]=Nytt fönster
Name[sw]=Dirisha Jipya
Name[ta]=புதிய சாளரம்
Name[te]=క్రొత్త విండో
Name[th]=หน้าต่างใหม่
Name[tr]=Yeni Pencere
Name[uk]=Нове вікно
Name[vi]=Cửa sổ Mới
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=/usr/bin/chromium-browser-gost
[Desktop Action new-private-window]
Name=New Incognito Window
Name[ar]=نافذة جديدة للتصفح المتخفي
Name[bg]=Нов прозорец „инкогнито“
Name[bn]=নতুন ছদ্মবেশী উইন্ডো
Name[ca]=Finestra d'incògnit nova
Name[cs]=Nové anonymní okno
Name[da]=Nyt inkognitovindue
Name[de]=Neues Inkognito-Fenster
Name[el]=Νέο παράθυρο για ανώνυμη περιήγηση
Name[en_GB]=New Incognito window
Name[es]=Nueva ventana de incógnito
Name[et]=Uus inkognito aken
Name[fa]=پنجره جدید حالت ناشناس
Name[fi]=Uusi incognito-ikkuna
Name[fil]=Bagong Incognito window
Name[fr]=Nouvelle fenêtre de navigation privée
Name[gu]=નવી છુપી વિંડો
Name[hi]=नई गुप्त विंडो
Name[hr]=Novi anoniman prozor
Name[hu]=Új Inkognitóablak
Name[id]=Jendela Penyamaran baru
Name[it]=Nuova finestra di navigazione in incognito
Name[iw]=חלון חדש לגלישה בסתר
Name[ja]=新しいシークレット ウィンドウ
Name[kn]=ಹೊಸ ಅಜ್ಞಾತ ವಿಂಡೋ
Name[ko]=새 시크릿 창
Name[lt]=Naujas inkognito langas
Name[lv]=Jauns inkognito režīma logs
Name[ml]=പുതിയ വേഷ പ്രച്ഛന്ന വിന്‍ഡോ
Name[mr]=नवीन गुप्त विंडो
Name[nl]=Nieuw incognitovenster
Name[no]=Nytt inkognitovindu
Name[pl]=Nowe okno incognito
Name[pt]=Nova janela de navegação anónima
Name[pt_BR]=Nova janela anônima
Name[ro]=Fereastră nouă incognito
Name[ru]=Новое окно в режиме инкогнито
Name[sk]=Nové okno inkognito
Name[sl]=Novo okno brez beleženja zgodovine
Name[sr]=Нови прозор за прегледање без архивирања
Name[sv]=Nytt inkognitofönster
Name[ta]=புதிய மறைநிலைச் சாளரம்
Name[te]=క్రొత్త అజ్ఞాత విండో
Name[th]=หน้าต่างใหม่ที่ไม่ระบุตัวตน
Name[tr]=Yeni Gizli pencere
Name[uk]=Нове вікно в режимі анонімного перегляду
Name[vi]=Cửa sổ ẩn danh mới
Name[zh_CN]=新建隐身窗口
Name[zh_TW]=新增無痕式視窗
Exec=/usr/bin/chromium-browser-gost --incognito

@ -1,3 +1,6 @@
# Build Chromium with GOST
%bcond_with gost
%define _lto_cflags %{nil}
# enable|disable system build flags
@ -36,7 +39,23 @@
ninja -j %{numjobs} -C '%1' '%2'
# enable|disable headless client build
%if %{with gost}
%global build_headless 0
%else
%global build_headless 1
%endif
# exclude build-id files for chromium-gost
%if %{with gost}
%define _build_id_links none
%endif
# enable|disable headless client build
%if %{with gost}
%global build_chromedriver 0
%else
%global build_chromedriver 1
%endif
# enable|disable chrome-remote-desktop build
%global build_remoting 0
@ -133,7 +152,11 @@
# %%{nil} for Stable; -beta for Beta; -dev for Devel
# dash in -beta and -dev is intentional !
%if %{with gost}
%global chromium_channel -gost
%else
%global chromium_channel %{nil}
%endif
%global chromium_menu_name Chromium
%global chromium_browser_channel chromium-browser%{chromium_channel}
%global chromium_path %{_libdir}/chromium-browser%{chromium_channel}
@ -232,12 +255,14 @@
%endif
%endif
%if %{with gost}
# Build with GOST patches
# https://github.com/deemru/chromium-gost/
%global gost 1
%global gost_build 1
%define chromium_gost_commit 2c81b2fed144086340d5220ef707350b7fb18ec9
%define msspi_commit 3c50c2d33a4bdf4effb01aaeb9ff5d5b67635a18
%define chromium_path_gost %{_builddir}/chromium-gost
%endif
### From 2013 until early 2021, Google permitted distribution builds of
### Chromium to access Google APIs that added significant features to
@ -274,7 +299,7 @@
Name: chromium%{chromium_channel}
Version: 119.0.6045.159
Release: 1%{?dist}.inferit.gost
Release: 2%{?dist}.inferit
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)
@ -475,9 +500,12 @@ BuildRequires: golang-github-evanw-esbuild
# Yandex logo
Source50: https://upload.wikimedia.org/wikipedia/commons/f/f1/Yandex_logo_2021_Russian.svg
%if %{with gost}
# GOST
Source101: https://github.com/deemru/chromium-gost/archive/%{chromium_gost_commit}.tar.gz?/chromium-gost-%{chromium_gost_commit}.tar.gz
Source102: https://github.com/deemru/msspi/archive/%{msspi_commit}.tar.gz?/msspi-%{msspi_commit}.tar.gz
Source103: chromium-browser-gost-icons.tar.xz
%endif
%if %{clang}
%if 0%{?rhel} == 7
@ -511,12 +539,12 @@ BuildRequires: binutils
#BuildRequires: pkgconfig(libavutil)
# chromium fail to start for rpmfusion users due to ABI break in ffmpeg-free-6.0.1
# bethween fedora and rpmfussion.
#%%if 0%{?rhel} == 9 || 0%%{?fedora} == 37
#Conflicts: libavformat-free%{_isa} < 5.1.4
#Conflicts: ffmpeg-libs%{_isa} < 5.1.4
#%%if 0%%{?rhel} == 9 || 0%%{?fedora} == 37
#Conflicts: libavformat-free%%{_isa} < 5.1.4
#Conflicts: ffmpeg-libs%%{_isa} < 5.1.4
#%%else
#Conflicts: libavformat-free%{_isa} < 6.0.1
#Conflicts: ffmpeg-libs%{_isa} < 6.0.1-2
#Conflicts: libavformat-free%%{_isa} < 6.0.1
#Conflicts: ffmpeg-libs%%{_isa} < 6.0.1-2
#%%endif
#%%endif
@ -892,14 +920,10 @@ Provides: bundled(xdg-user-dirs)
Requires(post): /usr/sbin/semanage
Requires(post): /usr/sbin/restorecon
%if %{gost}
Provides: %{name}-gost-lib = %{version}-%{release}
%endif
%description
Chromium is an open-source web browser, powered by WebKit (Blink).
%if %{gost}
chromium-gost patches are integrated, this Chromium supports GOST TLS
%if %{with gost}
Chromium GOST patches are integrated, this Chromium supports GOST TLS
if proprietary CryptoPro is installed.
%endif
@ -955,7 +979,7 @@ udev.
%prep
%setup -q -n chromium-%{version}
%if %{gost}
%if %{with gost}
rm -rf %{chromium_path_gost}
mkdir -p %{chromium_path_gost}
tar -C %{chromium_path_gost} --strip 1 -xf %{SOURCE101}
@ -964,12 +988,8 @@ sed -i \
%{chromium_path_gost}/src/gostssl.cpp
tar -C %{chromium_path_gost}/src/msspi --strip 1 -xf %{SOURCE102}
sed -i'' %{chromium_path_gost}/patch/chromium.patch \
-e 's/ (Chromium GOST)//g' \
-e 's/Chromium GOST/Chromium/g' \
-e 's/Chromium-Gost/Chromium/g' \
-e 's/"chromium-gost"/"chromium-browser"/g' \
-e 's/"chromium-gost.desktop"/"chromium-browser.desktop"/g' \
-e 's/(%s; Chromium GOST)/(%s)/' \
-e 's/"chromium-gost"/"chromium-browser-gost"/g' \
-e 's/"chromium-gost.desktop"/"chromium-browser-gost.desktop"/g' \
--
# make backups before GOST patching
for i in \
@ -1175,7 +1195,7 @@ cp -a %{_includedir}/libusb-1.0/libusb.h third_party/libusb/src/libusb/libusb.h
%endif
# Hard code extra version
sed -i 's/getenv("CHROME_VERSION_EXTRA")/"%{?gost: GOST TLS via CryptoPro}"/' chrome/common/channel_info_posix.cc
sed -i 's/getenv("CHROME_VERSION_EXTRA")/"%{?gost_build: GOST TLS via CryptoPro}"/' chrome/common/channel_info_posix.cc
# Fix hardcoded path in remoting code
sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/daemon_controller_delegate_linux.cc
@ -1435,7 +1455,9 @@ mkdir -p %{builddir} && cp -a %{_bindir}/gn %{builddir}/
%build_target %{builddir} chrome
%build_target %{builddir} chrome_sandbox
%if %{build_chromedriver}
%build_target %{builddir} chromedriver
%endif
%build_target %{builddir} libffmpeg.so
%if %{build_clear_key_cdm}
@ -1473,13 +1495,16 @@ export CHROMIUM_BROWSER_CHANNEL=%{chromium_browser_channel}
sed -i "s|@@BUILD_TARGET@@|$BUILD_TARGET|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
sed -i "s|@@CHROMIUM_PATH@@|$CHROMIUM_PATH|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
sed -i "s|@@CHROMIUM_BROWSER_CHANNEL@@|$CHROMIUM_BROWSER_CHANNEL|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%if %{with gost}
sed -i "s|/etc/chromium/chromium.conf|/etc/chromium-gost/chromium-gost.conf|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%endif
%if "%{chromium_channel}" == "%{nil}"
sed -i "s|@@EXTRA_FLAGS@@||g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%else
%if "%{chromium_channel}" == "-beta" || "%{chromium_channel}" == "-dev"
# Enable debug outputs for beta and dev channels
export EXTRA_FLAGS="--enable-logging=stderr --v=2"
sed -i "s|@@EXTRA_FLAGS@@|$EXTRA_FLAGS|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%else
sed -i "s|@@EXTRA_FLAGS@@||g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%endif
ln -s ../..%{chromium_path}/%{chromium_browser_channel}.sh %{buildroot}%{_bindir}/%{chromium_browser_channel}
@ -1523,9 +1548,11 @@ pushd %{builddir}
%endif
%endif
%if %{build_chromedriver}
# chromedriver
cp -a chromedriver %{buildroot}%{chromium_path}/chromedriver
ln -s ../..%{chromium_path}/chromedriver %{buildroot}%{_bindir}/chromedriver
%endif
%if %{build_remoting}
# Remote desktop bits
@ -1590,19 +1617,23 @@ popd
# need to strip binaries explicitly when debug is disable
%if ! %{enable_debug}
pushd %{buildroot}%{chromium_path}/
for f in *.so chrome_crashpad_handler chrome-sandbox chromium-browser headless_shell chromedriver ; do
for f in *.so chrome_crashpad_handler chrome-sandbox chromium-browser headless_shell %{?build_chromedriver: chromedriver} ; do
[ -f $f ] && strip $f
done
popd
%endif
# Add directories for policy management
mkdir -p %{buildroot}%{_sysconfdir}/chromium/policies/managed
mkdir -p %{buildroot}%{_sysconfdir}/chromium/policies/recommended
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/policies/managed
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/policies/recommended
cp -a out/Release/gen/chrome/app/policy/common/html/en-US/*.html .
cp -a out/Release/gen/chrome/app/policy/linux/examples/chrome.json .
%if %{with gost}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/
tar xavf %{SOURCE103} -C %{buildroot}%{_datadir}/icons/hicolor/
%else
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/256x256/apps
cp -a chrome/app/theme/chromium/product_logo_256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{chromium_browser_channel}.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
@ -1613,6 +1644,7 @@ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
cp -a chrome/app/theme/chromium/product_logo_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{chromium_browser_channel}.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/24x24/apps
cp -a chrome/app/theme/chromium/product_logo_24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{chromium_browser_channel}.png
%endif
# Install the master_preferences file
install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/%{name}/
@ -1667,7 +1699,7 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%doc AUTHORS README.fedora
%doc chrome_policy_list.html *.json
%license LICENSE
%config(noreplace) %{_sysconfdir}/%{name}/chromium.conf
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config %{_sysconfdir}/%{name}/master_preferences
%config %{_sysconfdir}/%{name}/policies/
%if %{build_remoting}
@ -1795,14 +1827,16 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
/var/lib/chrome-remote-desktop/
%endif
%if %{build_chromedriver}
%files -n chromedriver
%doc AUTHORS
%license LICENSE
%{_bindir}/chromedriver
%{chromium_path}/chromedriver
%endif
%changelog
* Sat Nov 25 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 119.0.6045.159-1.inferit.gost
* Sat Nov 25 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 119.0.6045.159-2.inferit
- Apply GOST patches
* Mon Nov 20 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 119.0.6045.159-1.inferit

Loading…
Cancel
Save