%define name smeserver-git %define version 1.2.0 %define release 8 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 Packager: Marco Hess BuildArchitectures: noarch BuildRoot: /var/tmp/%{name}-%{version} BuildRequires: e-smith-devtools Requires: e-smith-release >= 10.0 Requires: e-smith-apache >= 2.6.0-19 Requires: git AutoReqProv: no Patch1: smeserver-git-1.2.0.bz10464-warn-on-missing-files.patch Patch2: smeserver-git-1.2.0-Set-debugging-disabled.patch Patch3: smeserver-git-1.2.0-Add-Update-event-to-createlinks.patch Patch4: smeserver-git-1.2.0-locale-2021-08-22.patch Patch5: smeserver-git-1.2.0-bz12048-httpd24.patch %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 * Fri Jul 22 2022 Jean-Philippe Pialasse 1.2.0-8.sme - update to httpd 2.4 syntax [SME: 12048] fix Argument for 'Require all' must be 'granted' or 'denied' * Sun Aug 22 2021 Terry Fage 1.2.0-5.sme - apply locale 2021-08-22.patch * Fri Mar 26 2021 Brian Read 1.2.0-4.sme - Add Update event to createlinks [SME: 11286 ] * Sun Dec 20 2020 BogusDateBot - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, - by assuming the date is correct and changing the weekday. - Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... * Sun Dec 20 2020 Brian Read 1.2.0-3.sme - Initial import to SME10 tree [SME: 11286] - Set-debugging-disabled * Tue Nov 28 2017 Jean-Philipe Pialasse 1.2.0-2.sme - Add Update event to createlinks smeserver-git prevents httpd.conf template expansion [SME: 10464] - now if gitweb is enabled but smeserver-gitweb is not installed a warning is issued instead of an error and template consider it disabled. Same thing if gitweb_theme is enabled but smeserver-gitweb-theme is missing. * Tue Nov 28 2017 Jean-Philipe Pialasse 1.2.0-0.sme - new sources with unix formated line returns * Wed Feb 01 2017 Jean-Philipe Pialasse 1.1.0-9.sme - apply locale 2017-02-02.patch * Fri Jun 24 2016 Jean-Philipe Pialasse 1.1.0-8.sme - reverting git db to 644 as default-initialize_database will chown it root:admin * Fri Jun 24 2016 Jean-Philipe Pialasse 1.1.0-7.sme - removing fragment migrate as it should not be used for that [SME: 9619] * Wed Jun 22 2016 Jean-Philipe Pialasse 1.1.0-6.sme - Add Update event to createlinks missing ; in migrate fragment 80git to revert db permissions [SME: 9619] * Wed Jun 22 2016 Jean-Philipe Pialasse 1.1.0-5.sme - Add Update event to createlinks too permissive permissions on db accounts networks and git [SME: 9615] [SME: 9616] * Sat Jun 11 2016 Jean-Philipe Pialasse 1.1.0-4.sme - commented out back the rewrite rule on HEAD etc to allow CLI git - Add Update event to createlinks 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 * Fri Jun 10 2016 Jean-Philipe Pialasse 1.1.0-3.sme - Add Update event to createlinks allow to see .git short url with gitweb [SME: 9202] * Wed Mar 09 2016 JP Pialasse 1.1.0-2.sme - apply locale 2016-03-09 patch * Wed Feb 17 2016 Marco Hess 1.1.0-3 - Fixed erronous error message when updating a group due to missing check for 'group-modify' in git user access list handling [SME: 9133] * Fri Jan 30 2015 Marco Hess 1.1.0-0 - Require >= SME9. - Moved /usr/lib/perl5/site_perl to /usr/share/perl5/vendor_perl. - Fixed pwauth setup. - Added AuthBasicProvider external in authentication setup. - Fixed GitWebRoot variable scope. - Allow adjustment of gitweb static path for git 1.7 vs. git 1.8 * 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 Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... - Set permissions on git repository databaase for GitWeb access also on upgrade install. * Tue May 21 2013 Marco Hess 1.0.0-32 Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... - 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 Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... - 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 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 mkdir -p root/home/e-smith/files/git/ %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 # 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)