1 |
%define name smeserver-git |
2 |
%define version 1.2.0 |
3 |
%define release 6 |
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 |
Packager: Marco Hess <marco.hess@through-ip.com> |
14 |
BuildArchitectures: noarch |
15 |
BuildRoot: /var/tmp/%{name}-%{version} |
16 |
BuildRequires: e-smith-devtools |
17 |
Requires: e-smith-release >= 9.0 |
18 |
Requires: git |
19 |
AutoReqProv: no |
20 |
Patch1: smeserver-git-1.2.0.bz10464-warn-on-missing-files.patch |
21 |
Patch2: smeserver-git-1.2.0-Set-debugging-disabled.patch |
22 |
Patch3: smeserver-git-1.2.0-Add-Update-event-to-createlinks.patch |
23 |
Patch4: smeserver-git-1.2.0-locale-2021-08-22.patch |
24 |
Patch5: smeserver-git-1.2.0-bz12048-httpd24.patch |
25 |
|
26 |
%description |
27 |
smeserver-git enables centralised git repositories on an SME server and enables |
28 |
access to these repositories through HTTP/HTTPS. Repositories are created and |
29 |
managed through a server-manager panel that also configures the access permissions |
30 |
to the repositories based on the existing SME users and groups. The package |
31 |
installs and enables the git server on the current host like in |
32 |
host.com/git. Repositories are then available as https://host.com/git/gitrepo.git. |
33 |
|
34 |
%changelog |
35 |
* Fri Jul 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.2.0-6.sme |
36 |
- update to httpd 2.4 syntax [SME: 12048] |
37 |
|
38 |
* Sun Aug 22 2021 Terry Fage <terry.fage@gmail.com> 1.2.0-5.sme |
39 |
- apply locale 2021-08-22.patch |
40 |
|
41 |
* Fri Mar 26 2021 Brian Read <brianr@bjsystems.co.uk> 1.2.0-4.sme |
42 |
- Add Update event to createlinks [SME: 11286 ] |
43 |
|
44 |
* Sun Dec 20 2020 BogusDateBot |
45 |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
46 |
- by assuming the date is correct and changing the weekday. |
47 |
- Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... |
48 |
|
49 |
* Sun Dec 20 2020 Brian Read <brianr@bjsystems.co.uk> 1.2.0-3.sme |
50 |
- Initial import to SME10 tree [SME: 11286] |
51 |
- Set-debugging-disabled |
52 |
|
53 |
* Tue Nov 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 1.2.0-2.sme |
54 |
- Add Update event to createlinks smeserver-git prevents httpd.conf template expansion [SME: 10464] |
55 |
- now if gitweb is enabled but smeserver-gitweb is not installed a warning is issued |
56 |
instead of an error and template consider it disabled. Same thing if gitweb_theme is enabled |
57 |
but smeserver-gitweb-theme is missing. |
58 |
|
59 |
* Tue Nov 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 1.2.0-0.sme |
60 |
- new sources with unix formated line returns |
61 |
|
62 |
* Wed Feb 01 2017 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.0-9.sme |
63 |
- apply locale 2017-02-02.patch |
64 |
|
65 |
* Fri Jun 24 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.0-8.sme |
66 |
- reverting git db to 644 as default-initialize_database will chown it root:admin |
67 |
|
68 |
* Fri Jun 24 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.0-7.sme |
69 |
- removing fragment migrate as it should not be used for that [SME: 9619] |
70 |
|
71 |
* Wed Jun 22 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.0-6.sme |
72 |
- Add Update event to createlinks missing ; in migrate fragment 80git to revert db permissions [SME: 9619] |
73 |
|
74 |
* Wed Jun 22 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.0-5.sme |
75 |
- Add Update event to createlinks too permissive permissions on db accounts networks and git [SME: 9615] [SME: 9616] |
76 |
|
77 |
* Sat Jun 11 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.0-4.sme |
78 |
- commented out back the rewrite rule on HEAD etc to allow CLI git |
79 |
- Add Update event to createlinks auth not asked with Location after RewriteRule [SME: 9202] |
80 |
- add trailing slash to root git url if omited |
81 |
- only using git/repo.git or git/gitweb.cgi/repo.git will ask for auth |
82 |
|
83 |
* Fri Jun 10 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.0-3.sme |
84 |
- Add Update event to createlinks allow to see .git short url with gitweb [SME: 9202] |
85 |
|
86 |
* Wed Mar 09 2016 JP Pialasse <tests@pialasse.com> 1.1.0-2.sme |
87 |
- apply locale 2016-03-09 patch |
88 |
|
89 |
* Wed Feb 17 2016 Marco Hess <marco.hess@through-ip.com> 1.1.0-3 |
90 |
- Fixed erronous error message when updating a group due to |
91 |
missing check for 'group-modify' in git user access list handling [SME: 9133] |
92 |
|
93 |
* Fri Jan 30 2015 Marco Hess <marco.hess@through-ip.com> 1.1.0-0 |
94 |
- Require >= SME9. |
95 |
- Moved /usr/lib/perl5/site_perl to /usr/share/perl5/vendor_perl. |
96 |
- Fixed pwauth setup. |
97 |
- Added AuthBasicProvider external in authentication setup. |
98 |
- Fixed GitWebRoot variable scope. |
99 |
- Allow adjustment of gitweb static path for git 1.7 vs. git 1.8 |
100 |
|
101 |
* Fri May 30 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-37 |
102 |
- Fixed the HTTPS redirection loop. HTTPS redirection is now only done on the HTTP part of of |
103 |
the web server configuration and the full Git configuration part is only done in the HTTPS |
104 |
section. |
105 |
|
106 |
* Tue May 27 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-36 |
107 |
- Changed how git update-server-info is run as the location of the executable changed in git 1.8. |
108 |
|
109 |
* Fri Jan 24 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-35 |
110 |
- Systax error in 29GitRepositories that I though I fixed. |
111 |
|
112 |
* Fri Jan 24 2014 Marco Hess <marco.hess@through-ip.com> 1.0.0-34 |
113 |
- git version 1.8 has shifted the location of some executables. Modified the scripts |
114 |
to test on these locations so we generate the right paths. |
115 |
|
116 |
* Tue May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-33 |
117 |
Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... |
118 |
- Set permissions on git repository databaase for GitWeb access also on upgrade install. |
119 |
|
120 |
* Tue May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-32 |
121 |
Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... |
122 |
- Fixed a problem in the repository delete script where File::Path is needed |
123 |
to reference rmtree. |
124 |
- Also cleanup the entry from the database so that repositories of the same |
125 |
name can be created again. |
126 |
|
127 |
* Tue May 21 2013 Marco Hess <marco.hess@through-ip.com> 1.0.0-31 |
128 |
Sun May 21 2013 --> Sun May 19 2013 or Tue May 21 2013 or Sun May 26 2013 or .... |
129 |
- Changed the repository-delete script to ensure the SME Git database |
130 |
permissions are Ok for use by GitWeb after a delete. |
131 |
- Ensure that on 64-bit systems we use /usr/lib64/httpd/modules/pwauth |
132 |
|
133 |
* Sat Jul 21 2012 Marco Hess <marco.hess@through-ip.com> 1.0.0-3 |
134 |
- Ensure git database is present in /home/e-smith/db |
135 |
- Create default config database entries for 'git' |
136 |
- Moved retrieving maxNameLength for panel validations from config 'git' |
137 |
- In the user and group list boxes, added support to the special group admin |
138 |
and shared to allow either the admin or everybody to be included in the access lists. |
139 |
- Updated the HTTP config db error messages to be more clear as to which property needs |
140 |
to be configured. |
141 |
|
142 |
* Sun Jun 17 2012 Jonathan Martens <smeserver-contribs@snetram.nl> 1.0.0-2 |
143 |
- Rip out gitweb and create tgz file |
144 |
|
145 |
* Sun Apr 29 2012 Marco Hess <marco.hess@through-ip.com> 1.0.0-1 |
146 |
- initial release |
147 |
|
148 |
%prep |
149 |
%setup |
150 |
%patch1 -p1 |
151 |
%patch2 -p1 |
152 |
%patch3 -p1 |
153 |
%patch4 -p1 |
154 |
%patch5 -p1 |
155 |
|
156 |
mkdir -p root/home/e-smith/files/git/ |
157 |
%build |
158 |
perl createlinks |
159 |
|
160 |
%install |
161 |
rm -rf $RPM_BUILD_ROOT |
162 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
163 |
rm -f %{name}-%{version}-filelist |
164 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
165 |
|
166 |
%clean |
167 |
rm -rf $RPM_BUILD_ROOT |
168 |
|
169 |
%post |
170 |
echo "---------------------------------------------------------" |
171 |
if [ $1 -eq 1 ] ; then |
172 |
echo "Initial installation:" |
173 |
echo " - Ensuring git repositories configuration database exist ..." |
174 |
touch /home/e-smith/db/git |
175 |
echo " - Ensuring git repositories root directory exist with the right permissions ..." |
176 |
mkdir -p /home/e-smith/files/git |
177 |
chmod 770 /home/e-smith/files/git |
178 |
chmod g+s /home/e-smith/files/git |
179 |
echo " - Rebuilding server-manager ..." |
180 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
181 |
/etc/e-smith/events/actions/navigation-conf |
182 |
fi |
183 |
chown admin:www /home/e-smith/files/git |
184 |
#/etc/rc7.d/S86httpd-e-smith sighup |
185 |
|
186 |
# fixing needed permissions |
187 |
# fixing previous mess |
188 |
chmod 644 /home/e-smith/db/git |
189 |
chmod 640 /home/e-smith/db/accounts |
190 |
chmod 640 /home/e-smith/db/networks |
191 |
|
192 |
%postun |
193 |
if [ $1 -eq 0 ] ; then |
194 |
echo "---------------------------------------------------------" |
195 |
echo " - Rebuilding server-manager ..." |
196 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
197 |
/etc/e-smith/events/actions/navigation-conf |
198 |
echo " - Final Uninstall:" |
199 |
echo " smeserver-git has been removed but the git repositories and the git config database are left in place ..." |
200 |
echo " To manually remove the git repositories, use: 'rm -rf /home/e-smith/files/git'" |
201 |
echo " To manually remove the git config database, use: 'rm -rf /home/e-smith/db/git'" |
202 |
echo "---------------------------------------------------------" |
203 |
fi |
204 |
|
205 |
%files -f %{name}-%{version}-filelist |
206 |
%defattr(-,root,root) |