From da736d6412c48c744637cfd2c9a63b7fa5646c97 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 7 Jun 2021 01:41:23 -0400 Subject: create /var/lib/git to improve SELinux compatibility The README.SELinux file says that the default directory has its context set automatically. This is only true it the cgit package installs the directory. Creating it manually does not result in the proper SELinux context being set. Create and own the directory so that the context is set when the package is installed. This directory is shared with the git-daemon package. We share ownership because cgit is frequently used without git-daemon -- particularly now that the smart http git protocol is widely deployed. --- cgit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cgit.spec b/cgit.spec index ced9e6f..dcf72d7 100644 --- a/cgit.spec +++ b/cgit.spec @@ -7,6 +7,7 @@ %global scriptdir %{_localstatedir}/www/cgi-bin %global cgitdata %{_datadir}/%{name} %global httpdconfd %{_sysconfdir}/httpd/conf.d +%global gitrepodir %{_localstatedir}/lib/git # GPG signing key fingerprints %global gpg_cgit AB9942E6D4A4CFC3412620A749FC7012A5DE03AE @@ -183,7 +184,7 @@ highlight --print-style --style-outfile=stdout >> cgit.css %install %make_install install install-man -mkdir -p %{buildroot}%{cachedir} +mkdir -p %{buildroot}%{cachedir} %{buildroot}%{gitrepodir} install -Dp -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/cgitrc install -Dp -m0644 httpd.conf %{buildroot}%{httpdconfd}/%{name}.conf @@ -209,6 +210,7 @@ make test %{?el7:%exclude %{filterdir}/*.py[co]} %{scriptdir}/%{name} %{_mandir}/man*/* +%dir %{gitrepodir} %changelog @@ -217,6 +219,7 @@ make test - simplify install commands - improve httpd config file creation - explicitly list the cgit cgi-bin script +- create /var/lib/git to improve SELinux compatibility * Wed Jul 21 2021 Fedora Release Engineering - 1.2.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -- cgit