summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2021-06-07 01:41:23 -0400
committerTodd Zullinger <tmz@pobox.com>2022-01-01 23:45:33 -0500
commitda736d6412c48c744637cfd2c9a63b7fa5646c97 (patch)
treea9bb1c5bc7cf451de6cc6c9761bd501e7adde15c
parenta2235531e1ac4f07954229e845700329dead34da (diff)
downloadcgit_EL6-da736d6412c48c744637cfd2c9a63b7fa5646c97.tar.gz
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.
-rw-r--r--cgit.spec5
1 files changed, 4 insertions, 1 deletions
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 <releng@fedoraproject.org> - 1.2.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild