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