From 3089d157dca130ebbb46ae2dae8cd7629457c8d9 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 | 10 +++++++++- 1 file changed, 9 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 9f2d9d49e4e..6ec21962734 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,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} @@ -94,6 +99,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