1 |
%define name smeserver-git |
2 |
%define version 1.0.0 |
3 |
%define release 42 |
4 |
Summary: Centralised Git repositories with setup and configuration through SME Server admin panels. |
5 |
Name: %{name} |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
Distribution: SME Server |
9 |
License: GNU GPL version 2 |
10 |
URL: http://www.through-ip.com |
11 |
Group: SMEserver/addon |
12 |
Source: smeserver-git-%{version}.tar.gz |
13 |
Patch0: smeserver-git-1.0.0-locale-2016-03-09.patch |
14 |
Packager: Marco Hess <marco.hess@through-ip.com> |
15 |
BuildArchitectures: noarch |
16 |
BuildRoot: /var/tmp/%{name}-%{version} |
17 |
BuildRequires: e-smith-devtools |
18 |
Requires: e-smith-release >= 8.0 |
19 |
Requires: git |
20 |
AutoReqProv: no |
21 |
|
22 |
%description |
23 |
smeserver-git enables centralised git repositories on an SME server and enables |
24 |
access to these repositories through HTTP/HTTPS. Repositories are created and |
25 |
managed through a server-manager panel that also configures the access permissions |
26 |
to the repositories based on the existing SME users and groups. The package |
27 |
installs and enables the git server on the current host like in |
28 |
host.com/git. Repositories are then available as https://host.com/git/gitrepo.git. |
29 |
|
30 |
%changelog |
31 |
* Wed Mar 09 2016 JP Pialasse <tests@pialasse.com> 1.0.0-42.sme |
32 |
- apply locale 2016-03-09 patch |
33 |
|
34 |
* Tue Feb 2 2015 Marco Hess <marco.hess@through-ip.com> 1.0.0-40 |
35 |
- Fixups of 1.1 incompatibilities with older apache. |
36 |
- Allow adjustment of gitweb static path for git 1.7 vs. git 1.8 |
37 |
|
38 |
* Tue Feb 2 2015 Marco Hess <marco.hess@through-ip.com> 1.0.0-40 |
39 |
- Fixup of GitWeb CSS/JS files under 'static' in this version. |
40 |
|
41 |
* Tue Feb 2 2015 Marco Hess <marco.hess@through-ip.com> 1.0.0-38 |
42 |
- Backport changes from 1.1. |
43 |
|
44 |
* Fri May 30 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-37 |
45 |
- Fixed the HTTPS redirection loop. HTTPS redirection is now only done on the HTTP part of of |
46 |
the web server configuration and the full Git configuration part is only done in the HTTPS |
47 |
section. |
48 |
|
49 |
* Tue May 27 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-36 |
50 |
- Changed how git update-server-info is run as the location of the executable changed in git 1.8. |
51 |
|
52 |
* Fri Jan 24 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-35 |
53 |
- Systax error in 29GitRepositories that I though I fixed. |
54 |
|
55 |
* Fri Jan 24 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-34 |
56 |
- git version 1.8 has shifted the location of some executables. Modified the scripts |
57 |
to test on these locations so we generate the right paths. |
58 |
|
59 |
* Sun May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-33 |
60 |
- Set permissions on git repository databaase for GitWeb access also on upgrade install. |
61 |
|
62 |
* Sun May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-32 |
63 |
- Fixed a problem in the repository delete script where File::Path is needed |
64 |
to reference rmtree. |
65 |
- Also cleanup the entry from the database so that repositories of the same |
66 |
name can be created again. |
67 |
|
68 |
* Sun May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-31 |
69 |
- Changed the repository-delete script to ensure the SME Git database |
70 |
permissions are Ok for use by GitWeb after a delete. |
71 |
- Ensure that on 64-bit systems we use /usr/lib64/httpd/modules/pwauth |
72 |
|
73 |
* Sat Jul 21 2012 Marco Hess <marco.hess@through-ip.com> 1.0.0-3 |
74 |
- Ensure git database is present in /home/e-smith/db |
75 |
- Create default config database entries for 'git' |
76 |
- Moved retrieving maxNameLength for panel validations from config 'git' |
77 |
- In the user and group list boxes, added support to the special group admin |
78 |
and shared to allow either the admin or everybody to be included in the access lists. |
79 |
- Updated the HTTP config db error messages to be more clear as to which property needs |
80 |
to be configured. |
81 |
|
82 |
* Sun Jun 17 2012 Jonathan Martens <smeserver-contribs@snetram.nl> 1.0.0-2 |
83 |
- Rip out gitweb and create tgz file |
84 |
|
85 |
* Sun Apr 29 2012 Marco Hess <marco.hess@through-ip.com> 1.0.0-1 |
86 |
- initial release |
87 |
|
88 |
%prep |
89 |
%setup |
90 |
mkdir -p root/home/e-smith/files/git/ |
91 |
%patch0 -p1 |
92 |
|
93 |
%build |
94 |
perl createlinks |
95 |
|
96 |
%install |
97 |
rm -rf $RPM_BUILD_ROOT |
98 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
99 |
rm -f %{name}-%{version}-filelist |
100 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
101 |
|
102 |
%clean |
103 |
rm -rf $RPM_BUILD_ROOT |
104 |
|
105 |
%post |
106 |
echo "---------------------------------------------------------" |
107 |
if [ $1 -eq 1 ] ; then |
108 |
echo "Initial installation:" |
109 |
echo " - Ensuring git repositories configuration database exist ..." |
110 |
touch /home/e-smith/db/git |
111 |
echo " - Ensuring git repositories root directory exist with the right permissions ..." |
112 |
mkdir -p /home/e-smith/files/git |
113 |
chmod 770 /home/e-smith/files/git |
114 |
chmod g+s /home/e-smith/files/git |
115 |
echo " - Rebuilding server-manager ..." |
116 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
117 |
/etc/e-smith/events/actions/navigation-conf |
118 |
fi |
119 |
echo " - Ensuring git repositories configuration database has the right permissions ..." |
120 |
chmod 664 /home/e-smith/db/git |
121 |
chown admin:www /home/e-smith/files/git |
122 |
/etc/rc7.d/S86httpd-e-smith sighup |
123 |
echo "---------------------------------------------------------" |
124 |
|
125 |
%postun |
126 |
if [ $1 -eq 0 ] ; then |
127 |
echo "---------------------------------------------------------" |
128 |
echo " - Rebuilding server-manager ..." |
129 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
130 |
/etc/e-smith/events/actions/navigation-conf |
131 |
echo " - Final Uninstall:" |
132 |
echo " smeserver-git has been removed but the git repositories and the git config database are left in place ..." |
133 |
echo " To manually remove the git repositories, use: 'rm -rf /home/e-smith/files/git'" |
134 |
echo " To manually remove the git config database, use: 'rm -rf /home/e-smith/db/git'" |
135 |
echo "---------------------------------------------------------" |
136 |
fi |
137 |
|
138 |
%files -f %{name}-%{version}-filelist |
139 |
%defattr(-,root,root) |