From cbb12ce821a9e9b1b76f2a5ba8e4951fb403f46c Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Wed, 28 Aug 2024 18:50:13 +0200 Subject: [PATCH] Add ownership of the git configuration file 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. --- .../rubygem-foreman_templates.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/plugins/rubygem-foreman_templates/rubygem-foreman_templates.spec b/packages/plugins/rubygem-foreman_templates/rubygem-foreman_templates.spec index 9f2d9d49e4..e0fb75f72d 100644 --- a/packages/plugins/rubygem-foreman_templates/rubygem-foreman_templates.spec +++ b/packages/plugins/rubygem-foreman_templates/rubygem-foreman_templates.spec @@ -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 @@ -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 @@ -84,6 +88,9 @@ cp -a .%{gem_dir}/* \ %{foreman_assets_foreman} %{foreman_webpack_plugin} %{foreman_webpack_foreman} +%attr(-, foreman, foreman) %dir %{foreman_dir}/.config +%attr(-, foreman, foreman) %dir %{foreman_dir}/.config/git +%attr(0600, foreman, foreman) %config(noreplace) %{foreman_dir}/.config/git/config %files doc %doc %{gem_docdir} @@ -94,6 +101,9 @@ cp -a .%{gem_dir}/* \ %{foreman_plugin_log} %changelog +* Wed Aug 28 2024 Ewoud Kohl van Wijngaarden - 9.5.1-2 +- Add ownership of the git configuration file + * Sun Aug 11 2024 Foreman Packaging Automation - 9.5.1-1 - Update to 9.5.1