Skip to content

Commit cbb12ce

Browse files
committed
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.
1 parent cf7f591 commit cbb12ce

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/plugins/rubygem-foreman_templates/rubygem-foreman_templates.spec

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Name: rubygem-%{gem_name}
77
Version: 9.5.1
8-
Release: 1%{?foremandist}%{?dist}
8+
Release: 2%{?foremandist}%{?dist}
99
Summary: Template-syncing engine for Foreman
1010
License: GPLv3
1111
URL: https://github.com/theforeman/foreman_templates
@@ -67,6 +67,10 @@ cp -a .%{gem_dir}/* \
6767
%foreman_bundlerd_file
6868
%foreman_precompile_plugin -s
6969

70+
# Ensure a git config file exists
71+
mkdir -p %{buildroot}%{foreman_dir}/.config/git
72+
touch %{buildroot}%{foreman_dir}/.config/git/config
73+
7074
%files
7175
%dir %{gem_instdir}
7276
%license %{gem_instdir}/LICENSE
@@ -84,6 +88,9 @@ cp -a .%{gem_dir}/* \
8488
%{foreman_assets_foreman}
8589
%{foreman_webpack_plugin}
8690
%{foreman_webpack_foreman}
91+
%attr(-, foreman, foreman) %dir %{foreman_dir}/.config
92+
%attr(-, foreman, foreman) %dir %{foreman_dir}/.config/git
93+
%attr(0600, foreman, foreman) %config(noreplace) %{foreman_dir}/.config/git/config
8794

8895
%files doc
8996
%doc %{gem_docdir}
@@ -94,6 +101,9 @@ cp -a .%{gem_dir}/* \
94101
%{foreman_plugin_log}
95102

96103
%changelog
104+
* Wed Aug 28 2024 Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl> - 9.5.1-2
105+
- Add ownership of the git configuration file
106+
97107
* Sun Aug 11 2024 Foreman Packaging Automation <packaging@theforeman.org> - 9.5.1-1
98108
- Update to 9.5.1
99109

0 commit comments

Comments
 (0)