Skip to content

Commit

Permalink
Add ownership of the git configuration file
Browse files Browse the repository at this point in the history
This allows users to run git config commands without having to set up
permissions. The config file is marked as noreplace to respect the
user's content.
  • Loading branch information
ekohl committed Aug 28, 2024
1 parent cf7f591 commit 3089d15
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name: rubygem-%{gem_name}
Version: 9.5.1
Release: 1%{?foremandist}%{?dist}
Release: 2%{?foremandist}%{?dist}
Summary: Template-syncing engine for Foreman
License: GPLv3
URL: https://github.com/theforeman/foreman_templates
Expand Down Expand Up @@ -67,6 +67,10 @@ cp -a .%{gem_dir}/* \
%foreman_bundlerd_file
%foreman_precompile_plugin -s

# Ensure a git config file exists
mkdir -p %{buildroot}%{foreman_dir}/.config/git
touch %{buildroot}%{foreman_dir}/.config/git/config

%files
%dir %{gem_instdir}
%license %{gem_instdir}/LICENSE
Expand All @@ -84,6 +88,7 @@ cp -a .%{gem_dir}/* \
%{foreman_assets_foreman}
%{foreman_webpack_plugin}
%{foreman_webpack_foreman}
%attr(0600, foreman, foreman) %config(noreplace) %{foreman_dir}/.config/git/config

%files doc
%doc %{gem_docdir}
Expand All @@ -94,6 +99,9 @@ cp -a .%{gem_dir}/* \
%{foreman_plugin_log}

%changelog
* Wed Aug 28 2024 Ewoud Kohl van Wijngaarden <[email protected]> - 9.5.1-2
- Add ownership of the git configuration file

* Sun Aug 11 2024 Foreman Packaging Automation <[email protected]> - 9.5.1-1
- Update to 9.5.1

Expand Down

0 comments on commit 3089d15

Please sign in to comment.