1 |
vip-ire |
1.1 |
%define name smeserver-git |
2 |
|
|
%define version 1.0.0 |
3 |
unnilennium |
1.14 |
%define release 52 |
4 |
vip-ire |
1.1 |
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 |
unnilennium |
1.3 |
Patch0: smeserver-git-1.0.0-locale-2016-03-09.patch |
14 |
unnilennium |
1.5 |
Patch1: smeserver-git-1.0.0-fix_missing_group_modify_event_check.patch |
15 |
unnilennium |
1.6 |
Patch2: smeserver-git-1.0.0-rewriterules_for_dot_git.patch |
16 |
unnilennium |
1.7 |
Patch3: smeserver-git-1.0.0-LocationMatch.patch |
17 |
vip-ire |
1.1 |
Packager: Marco Hess <marco.hess@through-ip.com> |
18 |
|
|
BuildArchitectures: noarch |
19 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
20 |
|
|
BuildRequires: e-smith-devtools |
21 |
|
|
Requires: e-smith-release >= 8.0 |
22 |
|
|
Requires: git |
23 |
|
|
AutoReqProv: no |
24 |
|
|
|
25 |
|
|
%description |
26 |
|
|
smeserver-git enables centralised git repositories on an SME server and enables |
27 |
|
|
access to these repositories through HTTP/HTTPS. Repositories are created and |
28 |
|
|
managed through a server-manager panel that also configures the access permissions |
29 |
|
|
to the repositories based on the existing SME users and groups. The package |
30 |
|
|
installs and enables the git server on the current host like in |
31 |
|
|
host.com/git. Repositories are then available as https://host.com/git/gitrepo.git. |
32 |
|
|
|
33 |
|
|
%changelog |
34 |
unnilennium |
1.14 |
* Fri Jun 24 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-52.sme |
35 |
|
|
- reverting git db to 644 as default-initialize_database will chown it root:admin |
36 |
|
|
|
37 |
unnilennium |
1.13 |
* Fri Jun 24 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-51.sme |
38 |
|
|
- remove wrong migrate fragment [SME: 9619] |
39 |
|
|
|
40 |
unnilennium |
1.12 |
* Wed Jun 22 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-50.sme |
41 |
|
|
- fix missing ; in migrate fragment 80git to revert db permissions [SME: 9619] |
42 |
|
|
|
43 |
unnilennium |
1.11 |
* Wed Jun 22 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-49.sme |
44 |
unnilennium |
1.10 |
- fix too permissive permissions on db accounts networks and git [SME: 9615] [SME: 9616] |
45 |
|
|
- ported from SME9 |
46 |
|
|
|
47 |
unnilennium |
1.9 |
* Sat Jun 11 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-47.sme |
48 |
|
|
- commented out back the rewrite rule on HEAD etc to allow CLI git |
49 |
|
|
|
50 |
unnilennium |
1.8 |
* Sat Jun 11 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-46.sme |
51 |
unnilennium |
1.7 |
- fix auth not asked with Location after RewriteRule [SME: 9202] |
52 |
|
|
- add trailing slash to root git url if omited |
53 |
|
|
- only using git/repo.git or git/gitweb.cgi/repo.git will ask for auth |
54 |
unnilennium |
1.8 |
- bump to 46 to fix typo |
55 |
unnilennium |
1.7 |
|
56 |
unnilennium |
1.6 |
* Fri Jun 10 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-44.sme |
57 |
|
|
- fix allow to see .git short url with gitweb [SME: 9202] |
58 |
|
|
|
59 |
unnilennium |
1.5 |
* Fri Jun 10 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-43.sme |
60 |
|
|
- fix group-modify invalid event [SME: 9251] |
61 |
|
|
- patch by Marco Hess |
62 |
|
|
|
63 |
unnilennium |
1.4 |
* Wed Mar 09 2016 JP Pialasse <tests@pialasse.com> 1.0.0-42.sme |
64 |
unnilennium |
1.2 |
- apply locale 2016-03-09 patch |
65 |
|
|
|
66 |
unnilennium |
1.11 |
* Mon Feb 2 2015 Marco Hess <marco.hess@through-ip.com> 1.0.0-40 |
67 |
vip-ire |
1.1 |
- Fixups of 1.1 incompatibilities with older apache. |
68 |
|
|
- Allow adjustment of gitweb static path for git 1.7 vs. git 1.8 |
69 |
|
|
|
70 |
unnilennium |
1.11 |
* Mon Feb 2 2015 Marco Hess <marco.hess@through-ip.com> 1.0.0-40 |
71 |
vip-ire |
1.1 |
- Fixup of GitWeb CSS/JS files under 'static' in this version. |
72 |
|
|
|
73 |
unnilennium |
1.11 |
* Mon Feb 2 2015 Marco Hess <marco.hess@through-ip.com> 1.0.0-38 |
74 |
vip-ire |
1.1 |
- Backport changes from 1.1. |
75 |
|
|
|
76 |
|
|
* Fri May 30 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-37 |
77 |
|
|
- Fixed the HTTPS redirection loop. HTTPS redirection is now only done on the HTTP part of of |
78 |
|
|
the web server configuration and the full Git configuration part is only done in the HTTPS |
79 |
|
|
section. |
80 |
|
|
|
81 |
|
|
* Tue May 27 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-36 |
82 |
|
|
- Changed how git update-server-info is run as the location of the executable changed in git 1.8. |
83 |
|
|
|
84 |
|
|
* Fri Jan 24 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-35 |
85 |
|
|
- Systax error in 29GitRepositories that I though I fixed. |
86 |
|
|
|
87 |
|
|
* Fri Jan 24 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-34 |
88 |
|
|
- git version 1.8 has shifted the location of some executables. Modified the scripts |
89 |
|
|
to test on these locations so we generate the right paths. |
90 |
|
|
|
91 |
unnilennium |
1.11 |
* Tue May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-33 |
92 |
vip-ire |
1.1 |
- Set permissions on git repository databaase for GitWeb access also on upgrade install. |
93 |
|
|
|
94 |
unnilennium |
1.11 |
* Tue May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-32 |
95 |
vip-ire |
1.1 |
- Fixed a problem in the repository delete script where File::Path is needed |
96 |
|
|
to reference rmtree. |
97 |
|
|
- Also cleanup the entry from the database so that repositories of the same |
98 |
|
|
name can be created again. |
99 |
|
|
|
100 |
unnilennium |
1.11 |
* Tue May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-31 |
101 |
vip-ire |
1.1 |
- Changed the repository-delete script to ensure the SME Git database |
102 |
|
|
permissions are Ok for use by GitWeb after a delete. |
103 |
|
|
- Ensure that on 64-bit systems we use /usr/lib64/httpd/modules/pwauth |
104 |
|
|
|
105 |
|
|
* Sat Jul 21 2012 Marco Hess <marco.hess@through-ip.com> 1.0.0-3 |
106 |
|
|
- Ensure git database is present in /home/e-smith/db |
107 |
|
|
- Create default config database entries for 'git' |
108 |
|
|
- Moved retrieving maxNameLength for panel validations from config 'git' |
109 |
|
|
- In the user and group list boxes, added support to the special group admin |
110 |
|
|
and shared to allow either the admin or everybody to be included in the access lists. |
111 |
|
|
- Updated the HTTP config db error messages to be more clear as to which property needs |
112 |
|
|
to be configured. |
113 |
|
|
|
114 |
|
|
* Sun Jun 17 2012 Jonathan Martens <smeserver-contribs@snetram.nl> 1.0.0-2 |
115 |
|
|
- Rip out gitweb and create tgz file |
116 |
|
|
|
117 |
|
|
* Sun Apr 29 2012 Marco Hess <marco.hess@through-ip.com> 1.0.0-1 |
118 |
|
|
- initial release |
119 |
|
|
|
120 |
|
|
%prep |
121 |
|
|
%setup |
122 |
|
|
mkdir -p root/home/e-smith/files/git/ |
123 |
unnilennium |
1.3 |
%patch0 -p1 |
124 |
unnilennium |
1.5 |
%patch1 -p1 |
125 |
unnilennium |
1.6 |
%patch2 -p1 |
126 |
unnilennium |
1.7 |
%patch3 -p1 |
127 |
vip-ire |
1.1 |
|
128 |
|
|
%build |
129 |
|
|
perl createlinks |
130 |
|
|
|
131 |
|
|
%install |
132 |
|
|
rm -rf $RPM_BUILD_ROOT |
133 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
134 |
|
|
rm -f %{name}-%{version}-filelist |
135 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
136 |
|
|
|
137 |
|
|
%clean |
138 |
|
|
rm -rf $RPM_BUILD_ROOT |
139 |
|
|
|
140 |
|
|
%post |
141 |
|
|
echo "---------------------------------------------------------" |
142 |
|
|
if [ $1 -eq 1 ] ; then |
143 |
|
|
echo "Initial installation:" |
144 |
|
|
echo " - Ensuring git repositories configuration database exist ..." |
145 |
|
|
touch /home/e-smith/db/git |
146 |
|
|
echo " - Ensuring git repositories root directory exist with the right permissions ..." |
147 |
|
|
mkdir -p /home/e-smith/files/git |
148 |
|
|
chmod 770 /home/e-smith/files/git |
149 |
|
|
chmod g+s /home/e-smith/files/git |
150 |
|
|
echo " - Rebuilding server-manager ..." |
151 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
152 |
|
|
/etc/e-smith/events/actions/navigation-conf |
153 |
|
|
fi |
154 |
|
|
chown admin:www /home/e-smith/files/git |
155 |
|
|
/etc/rc7.d/S86httpd-e-smith sighup |
156 |
|
|
echo "---------------------------------------------------------" |
157 |
unnilennium |
1.13 |
# fixing needed permissions |
158 |
|
|
# fixing previous mess |
159 |
unnilennium |
1.14 |
chmod 640 /home/e-smith/db/git |
160 |
unnilennium |
1.13 |
chmod 640 /home/e-smith/db/accounts |
161 |
|
|
chmod 640 /home/e-smith/db/networks |
162 |
vip-ire |
1.1 |
|
163 |
|
|
%postun |
164 |
|
|
if [ $1 -eq 0 ] ; then |
165 |
|
|
echo "---------------------------------------------------------" |
166 |
|
|
echo " - Rebuilding server-manager ..." |
167 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
168 |
|
|
/etc/e-smith/events/actions/navigation-conf |
169 |
|
|
echo " - Final Uninstall:" |
170 |
|
|
echo " smeserver-git has been removed but the git repositories and the git config database are left in place ..." |
171 |
|
|
echo " To manually remove the git repositories, use: 'rm -rf /home/e-smith/files/git'" |
172 |
|
|
echo " To manually remove the git config database, use: 'rm -rf /home/e-smith/db/git'" |
173 |
|
|
echo "---------------------------------------------------------" |
174 |
|
|
fi |
175 |
|
|
|
176 |
|
|
%files -f %{name}-%{version}-filelist |
177 |
|
|
%defattr(-,root,root) |