%define name smeserver-git %define version 1.0.0 %define release 54 Summary: Centralised Git repositories with setup and configuration through SME Server admin panels. Name: %{name} Version: %{version} Release: %{release}%{?dist} Distribution: SME Server License: GNU GPL version 2 URL: http://www.through-ip.com Group: SMEserver/addon Source: smeserver-git-%{version}.tar.gz Patch0: smeserver-git-1.0.0-locale-2016-03-09.patch Patch1: smeserver-git-1.0.0-fix_missing_group_modify_event_check.patch Patch2: smeserver-git-1.0.0-rewriterules_for_dot_git.patch Patch3: smeserver-git-1.0.0-LocationMatch.patch Patch4: smeserver-git-1.0.0-locale-2017-03-25.patch Packager: Marco Hess BuildArchitectures: noarch BuildRoot: /var/tmp/%{name}-%{version} BuildRequires: e-smith-devtools Requires: e-smith-release >= 8.0 Requires: git AutoReqProv: no %description smeserver-git enables centralised git repositories on an SME server and enables access to these repositories through HTTP/HTTPS. Repositories are created and managed through a server-manager panel that also configures the access permissions to the repositories based on the existing SME users and groups. The package installs and enables the git server on the current host like in host.com/git. Repositories are then available as https://host.com/git/gitrepo.git. %changelog * Sat Mar 25 2017 Jean-Philipe Pialasse 1.0.0-54.sme - apply locale 2017-03-25 * Fri Jun 24 2016 Jean-Philipe Pialasse 1.0.0-53.sme - reverting git db to 644 as default-initialize_database will chown it root:admin * Fri Jun 24 2016 Jean-Philipe Pialasse 1.0.0-51.sme - remove wrong migrate fragment [SME: 9619] * Wed Jun 22 2016 Jean-Philipe Pialasse 1.0.0-50.sme - fix missing ; in migrate fragment 80git to revert db permissions [SME: 9619] * Wed Jun 22 2016 Jean-Philipe Pialasse 1.0.0-49.sme - fix too permissive permissions on db accounts networks and git [SME: 9615] [SME: 9616] - ported from SME9 * Sat Jun 11 2016 Jean-Philipe Pialasse 1.0.0-47.sme - commented out back the rewrite rule on HEAD etc to allow CLI git * Sat Jun 11 2016 Jean-Philipe Pialasse 1.0.0-46.sme - fix auth not asked with Location after RewriteRule [SME: 9202] - add trailing slash to root git url if omited - only using git/repo.git or git/gitweb.cgi/repo.git will ask for auth - bump to 46 to fix typo * Fri Jun 10 2016 Jean-Philipe Pialasse 1.0.0-44.sme - fix allow to see .git short url with gitweb [SME: 9202] * Fri Jun 10 2016 Jean-Philipe Pialasse 1.0.0-43.sme - fix group-modify invalid event [SME: 9251] - patch by Marco Hess * Wed Mar 09 2016 JP Pialasse 1.0.0-42.sme - apply locale 2016-03-09 patch * Mon Feb 2 2015 Marco Hess 1.0.0-40 - Fixups of 1.1 incompatibilities with older apache. - Allow adjustment of gitweb static path for git 1.7 vs. git 1.8 * Mon Feb 2 2015 Marco Hess 1.0.0-40 - Fixup of GitWeb CSS/JS files under 'static' in this version. * Mon Feb 2 2015 Marco Hess 1.0.0-38 - Backport changes from 1.1. * Fri May 30 2014 Marco Hess 1.0.0-37 - Fixed the HTTPS redirection loop. HTTPS redirection is now only done on the HTTP part of of the web server configuration and the full Git configuration part is only done in the HTTPS section. * Tue May 27 2014 Marco Hess 1.0.0-36 - Changed how git update-server-info is run as the location of the executable changed in git 1.8. * Fri Jan 24 2014 Marco Hess 1.0.0-35 - Systax error in 29GitRepositories that I though I fixed. * Fri Jan 24 2014 Marco Hess 1.0.0-34 - git version 1.8 has shifted the location of some executables. Modified the scripts to test on these locations so we generate the right paths. * Tue May 21 2013 Marco Hess 1.0.0-33 - Set permissions on git repository databaase for GitWeb access also on upgrade install. * Tue May 21 2013 Marco Hess 1.0.0-32 - Fixed a problem in the repository delete script where File::Path is needed to reference rmtree. - Also cleanup the entry from the database so that repositories of the same name can be created again. * Tue May 21 2013 Marco Hess 1.0.0-31 - Changed the repository-delete script to ensure the SME Git database permissions are Ok for use by GitWeb after a delete. - Ensure that on 64-bit systems we use /usr/lib64/httpd/modules/pwauth * Sat Jul 21 2012 Marco Hess 1.0.0-3 - Ensure git database is present in /home/e-smith/db - Create default config database entries for 'git' - Moved retrieving maxNameLength for panel validations from config 'git' - In the user and group list boxes, added support to the special group admin and shared to allow either the admin or everybody to be included in the access lists. - Updated the HTTP config db error messages to be more clear as to which property needs to be configured. * Sun Jun 17 2012 Jonathan Martens 1.0.0-2 - Rip out gitweb and create tgz file * Sun Apr 29 2012 Marco Hess 1.0.0-1 - initial release %prep %setup mkdir -p root/home/e-smith/files/git/ %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %build perl createlinks %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist %clean rm -rf $RPM_BUILD_ROOT %post echo "---------------------------------------------------------" if [ $1 -eq 1 ] ; then echo "Initial installation:" echo " - Ensuring git repositories configuration database exist ..." touch /home/e-smith/db/git echo " - Ensuring git repositories root directory exist with the right permissions ..." mkdir -p /home/e-smith/files/git chmod 770 /home/e-smith/files/git chmod g+s /home/e-smith/files/git echo " - Rebuilding server-manager ..." /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /etc/e-smith/events/actions/navigation-conf fi chown admin:www /home/e-smith/files/git /etc/rc7.d/S86httpd-e-smith sighup echo "---------------------------------------------------------" # fixing needed permissions # fixing previous mess chmod 644 /home/e-smith/db/git chmod 640 /home/e-smith/db/accounts chmod 640 /home/e-smith/db/networks %postun if [ $1 -eq 0 ] ; then echo "---------------------------------------------------------" echo " - Rebuilding server-manager ..." /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /etc/e-smith/events/actions/navigation-conf echo " - Final Uninstall:" echo " smeserver-git has been removed but the git repositories and the git config database are left in place ..." echo " To manually remove the git repositories, use: 'rm -rf /home/e-smith/files/git'" echo " To manually remove the git config database, use: 'rm -rf /home/e-smith/db/git'" echo "---------------------------------------------------------" fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)