Blob Blame History Raw
Name:           fedora-chromium-config
Version:        1.2
Release:        %autorelease
Summary:        Fedora customizations for Chromium/Chrome
License:        GPLv2+
# The upstream for this is a dist-git
URL:            https://src.fedoraproject.org/rpms/fedora-chromium-config
Source0:        https://src.fedoraproject.org/rpms/fedora-chromium-config/raw/master/f/LICENSE
# Configuration to support Kerberos GSSAPI logins to the Fedora Account System
Source2:        00_gssapi.json
Source3:        %{name}-tmpfiles.conf

BuildArch:      noarch

# For the _tmpfilesdir macro
BuildRequires:  systemd-rpm-macros

Obsoletes:      fedora-user-agent-chrome < 1.0

# Starting with Chromium 83, the Kerberos support works properly
Conflicts:      chromium < 83


%description
This package is used to install customizations for Chromium/Chrome that are
recommended by Fedora.

It includes a GSSAPI configuration that enables access to many Fedora Project
services. To add support for other domains, replace the symlink
/etc/chromium/policies/recommended/00_gssapi.json with your own content.


%prep
mkdir -p %{_builddir}/licenses
cp -a %{SOURCE0} %{_builddir}/licenses/


%build


%install
# Install the FAS kerberos configuration for Chrome
# The recommended policy directory does not merge identical keys and we don't want
# to accidentally override any configuration that a site has installed here, so
# we install it as 00_gssapi.json. If another file is present in this directory
# that includes the same keys and a filename that sorts alphabetically higher,
# it will supersede this file. "00" is chosen to sort as low as possible.
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/%{name}-tmpfiles.conf

mkdir -p %{buildroot}%{_sysconfdir}/opt/chrome/policies/recommended \
         %{buildroot}%{_sysconfdir}/chromium/policies/recommended \
         %{buildroot}%{_datadir}/chromium/policies/recommended

cp -a %{SOURCE2} %{buildroot}%{_datadir}/chromium/policies/recommended


%files
%license licenses/LICENSE

# GSSAPI default configuration for fedoraproject.org
%{_datadir}/chromium/policies/recommended/00_gssapi.json

# Chromium GSSAPI configuration symlinks
# By default, the Chromium configuration is symlinked to the
# default configuration in /usr/share/chromium using tmpfiles.d
%dir %{_sysconfdir}/chromium/
%dir %{_sysconfdir}/chromium/policies
%dir %{_sysconfdir}/chromium/policies/recommended
%ghost %{_sysconfdir}/chromium/policies/recommended/00_gssapi.json

# Google Chrome GSSAPI configuration symlinks
# By default, the Chrome configuration is symlinked to the Chromium
# policy. That way there is a single place to modify both together.
%dir %{_sysconfdir}/opt/chrome/
%dir %{_sysconfdir}/opt/chrome/policies
%dir %{_sysconfdir}/opt/chrome/policies/recommended
%ghost %{_sysconfdir}/opt/chrome/policies/recommended/00_gssapi.json

# systemd-tmpfilesd configuration for symlinks
%{_tmpfilesdir}/%{name}-tmpfiles.conf


%changelog
%autochangelog