1 |
# $Id: smeserver-manager.spec,v 1.31 2020/08/08 13:42:03 michel Exp $ |
# $Id: smeserver-manager.spec,v 1.50 2021/11/15 18:03:45 michel Exp $ |
2 |
|
|
3 |
Summary: Sme server navigation module : manager 2 |
Summary: Sme server navigation module : manager 2 |
4 |
%define name smeserver-manager |
%define name smeserver-manager |
5 |
Name: %{name} |
Name: %{name} |
6 |
%define version 0.1.0 |
%define version 0.1.4 |
7 |
%define release 29 |
%define release 4 |
8 |
Version: %{version} |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
10 |
License: GPL |
License: GPL |
11 |
Group: Networking/Daemons |
Group: Networking/Daemons |
12 |
Source: %{name}-0.1.0.tar.xz |
Source: %{name}-%{version}.tar.xz |
13 |
Patch0: %{name}-0.1.0-bz10506.patch |
Patch0: %{name}-%{version}-list_access_csrf.patch |
14 |
Patch1: %{name}-add-basic-files.patch |
Patch1: %{name}-%{version}-review_csrf_url.patch |
15 |
Patch2: %{name}-0.1.0-mojo_struct.patch |
Patch2: smeserver-manager-0.1.4-Add-dummy-classes-to-ep-files.patch |
|
Patch3: %{name}-0.1.0-setuid_groups.patch |
|
|
Patch4: %{name}-0.1.0-reboot_ibays_theme.patch |
|
|
Patch5: %{name}-0.1.0-add-adminlte.patch |
|
|
Patch6: %{name}-0.1.0-navigation_header_listes.patch |
|
|
Patch7: %{name}-0.1.0-navigation_errors.patch |
|
|
Patch8: %{name}-0.1.0-theme_navig_message.patch |
|
|
Patch9: %{name}-0.1.0-domains_pseudos_hosts.patch |
|
|
Patch10: %{name}-0.1.0-remotax_users_logs.patch |
|
|
Patch11: %{name}-0.1.0-localnetworks-panel-remove-adminlte.patch |
|
|
Patch12: %{name}-0.1.0-localnetworks-remove-db-call-from-del.patch |
|
|
Patch13: %{name}-0.1.0-portforwarding-localnetwork-cleanup.patch |
|
|
Patch14: %{name}-0.1.0-portforwarding-rule-comment-missing.patch |
|
|
Patch15: %{name}-0.1.0-yum_backup_email_cleanup.patch |
|
|
Patch16: %{name}-0.1.0-remove_tests.patch |
|
|
Patch17: %{name}-0.1.0-routes_locales_navig.patch |
|
|
Patch18: %{name}-0.1.0-error_success_routes_locales.patch |
|
|
Patch19: %{name}-0.1.0-translation_themes.patch |
|
|
Patch20: %{name}-0.1.0-mojo-app_password_menus.patch |
|
|
Patch21: %{name}-0.1.0-missing_translations.patch |
|
|
Patch22: %{name}-0.1.0-bz9457_bz8903_pseudo_acct_swtheme.patch |
|
|
Patch23: %{name}-0.1.0-start_service.patch |
|
|
Patch24: %{name}-0.1.0-datetime_quota.patch |
|
|
Patch25: %{name}-0.1.0-bz10976_bz10977_others.patch |
|
|
Patch26: %{name}-0.1.0-route_lexicon_locales.patch |
|
|
|
|
|
|
|
16 |
|
|
17 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
|
BuildRequires: e-smith-devtools |
|
|
BuildRequires: gettext |
|
18 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
19 |
#BuildRequires: gcc |
BuildRequires: e-smith-devtools |
20 |
|
#<Build tests> |
21 |
|
#BuildRequires: perl >= 0:5.016 |
22 |
|
#BuildRequires: perl(Test::More) |
23 |
|
#BuildRequires: perl(Test::Mojo) |
24 |
|
#BuildRequires: perl(Mojolicious) >= 7.56 |
25 |
|
#BuildRequires: perl(Mojolicious::Plugin::I18N) >= 1.6 |
26 |
|
#BuildRequires: perl(Net::Netmask) >= 1.9 |
27 |
|
#</Build tests> |
28 |
|
|
29 |
Requires: e-smith-lib >= 1.18.0-26 |
Requires: e-smith-lib >= 1.18.0-26 |
30 |
Requires: e-smith-manager >= 2.4.0-22 |
Requires: e-smith-manager >= 2.4.0-22 |
31 |
Requires: perl-Mojolicious >= 6.44 |
Requires: perl(Mojolicious) >= 7.56 |
32 |
Requires: perl-Mojolicious-Plugin-I18N >= 1.6 |
Requires: perl(Mojolicious::Plugin::I18N) >= 1.6 |
33 |
Requires: perl-Net-Netmask >= 1.9015 |
Requires: perl(Mojolicious::Plugin::RenderFile) >= 0.12 |
34 |
|
Requires: perl(Mojolicious::Plugin::CSRFDefender) >= 0.0.8 |
35 |
|
Requires: perl(Net::Netmask) >= 1.9 |
36 |
#Requires: js-jquery > 2.2.4-3 (optional) |
#Requires: js-jquery > 2.2.4-3 (optional) |
37 |
Requires: pwauth |
|
|
#Requires: perl(Apache::AuthTkt) |
|
38 |
Provides: server-manager |
Provides: server-manager |
39 |
AutoReqProv: no |
AutoReqProv: no |
40 |
|
|
41 |
%define dir_mngr /usr/share/smanager |
%define dir_mngr /usr/share/smanager |
42 |
|
|
|
|
|
43 |
%description |
%description |
44 |
This RPM contributes the navigation bars for the smeserver-manager. |
This RPM contributes the navigation bars for the smeserver-manager. New Mojolicious version. |
45 |
|
|
46 |
%prep |
%prep |
47 |
%setup |
%setup |
48 |
%patch0 -p1 |
%patch0 -p1 |
49 |
%patch1 -p1 |
%patch1 -p1 |
50 |
%patch2 -p1 |
%patch2 -p1 |
|
%patch3 -p1 |
|
|
%patch4 -p1 |
|
|
%patch5 -p1 |
|
|
%patch6 -p1 |
|
|
%patch7 -p1 |
|
|
%patch8 -p1 |
|
|
%patch9 -p1 |
|
|
%patch10 -p1 |
|
|
%patch11 -p1 |
|
|
%patch12 -p1 |
|
|
%patch13 -p1 |
|
|
%patch14 -p1 |
|
|
%patch15 -p1 |
|
|
%patch16 -p1 |
|
|
%patch17 -p1 |
|
|
%patch18 -p1 |
|
|
%patch19 -p1 |
|
|
%patch20 -p1 |
|
|
%patch21 -p1 |
|
|
%patch22 -p1 |
|
|
%patch23 -p1 |
|
|
%patch24 -p1 |
|
|
%patch25 -p1 |
|
|
%patch26 -p1 |
|
51 |
|
|
52 |
%build |
%build |
53 |
perl createlinks |
perl createlinks |
54 |
|
|
55 |
# Force creation of potentially empty directories |
# Force creation of potentially empty directories |
|
##mkdir -p root/etc/e-smith/web/functions2 |
|
56 |
mkdir -p root/etc/e-smith/db/routes |
mkdir -p root/etc/e-smith/db/routes |
57 |
mkdir -p root/home/e-smith/db/navigation2 |
mkdir -p root/home/e-smith/db/navigation2 |
|
#mkdir -p root%{dir_mngr}/html |
|
58 |
mkdir -p root%{dir_mngr}/themes/default/public/css |
mkdir -p root%{dir_mngr}/themes/default/public/css |
59 |
|
|
|
##ln -s /etc/e-smith/web/common/cgi-bin/logout root/%{dir_mngr}/cgi-bin/logout |
|
|
#ln -s %{dir_mngr}/conf/srvmngr.conf root/%{dir_mngr}/srvmngr.conf |
|
|
#ln -s %{dir_mngr}/script/srvmngr.pl root/%{dir_mngr}/srvmngr.pl |
|
|
|
|
|
##gcc -o root/etc/e-smith/web/functions2/wrapper2 manager2.c |
|
|
|
|
|
#for file in index #initial |
|
|
#do |
|
|
# ln -s ../../../functions2/wrapper2 root%{dir_mngr}/html/${file}.cgi |
|
|
#done |
|
|
|
|
|
|
|
60 |
%install |
%install |
61 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
62 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
65 |
--dir %{dir_mngr} 'attr(0755,root,root)' \ |
--dir %{dir_mngr} 'attr(0755,root,root)' \ |
66 |
--file %{dir_mngr}/log/development.log 'attr(0660,root,admin)' \ |
--file %{dir_mngr}/log/development.log 'attr(0660,root,admin)' \ |
67 |
--file %{dir_mngr}/log/production.log 'attr(0660,root,admin)' \ |
--file %{dir_mngr}/log/production.log 'attr(0660,root,admin)' \ |
68 |
|
--file %{dir_mngr}/script/daily.sh 'attr(0770,root,root)' \ |
69 |
|
--file %{dir_mngr}/script/routes.pl 'attr(0770,root,root)' \ |
70 |
|
--file %{dir_mngr}/script/secrets.pl 'attr(0770,root,root)' \ |
71 |
> %{name}-%{version}-%{release}-filelist |
> %{name}-%{version}-%{release}-filelist |
72 |
|
|
73 |
#--file /etc/e-smith/web/functions2/wrapper2 'attr(4750,root,admin)' \ |
echo "%doc COPYING f2b/*" >> %{name}-%{version}-%{release}-filelist |
|
#--file /etc/e-smith/web/functions2/index.cgi 'attr(0500,root,root)' \ |
|
|
#--file %{dir_mngr}/html/index.cgi 'attr(root,admin)' \ |
|
|
|
|
|
echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist |
|
74 |
|
|
75 |
|
%check |
76 |
|
#cd $RPM_BUILD_ROOT/%{dir_mngr} && QUICK_TEST=1 /usr/bin/prove -q -l -r |
77 |
|
|
78 |
%clean |
%clean |
79 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
81 |
%pre |
%pre |
82 |
|
|
83 |
%preun |
%preun |
84 |
# js-jquery from epel |
if [ -h %{dir_mngr}/themes/default/public/js/jquery.min.js ] |
|
##if (rpm -q js-jquery > /dev/null 2>&1) |
|
|
if [ -f /usr/share/javascript/jquery/latest/jquery.min.js ] |
|
85 |
then |
then |
86 |
unlink %{dir_mngr}/themes/default/public/js/jquery.min.js |
unlink %{dir_mngr}/themes/default/public/js/jquery.min.js |
87 |
fi |
fi |
|
systemctl disable smanager.service |
|
88 |
true |
true |
89 |
|
|
90 |
%post |
%post |
|
# js-jquery from epel |
|
|
##if (rpm -q js-jquery > /dev/null 2>&1) |
|
91 |
if [ -f /usr/share/javascript/jquery/latest/jquery.min.js ] |
if [ -f /usr/share/javascript/jquery/latest/jquery.min.js ] |
92 |
then |
then |
93 |
mkdir %{dir_mngr}/themes/default/public/js |
[ -d %{dir_mngr}/themes/default/public/js ] || |
94 |
ln -s /usr/share/javascript/jquery/latest/jquery.min.js %{dir_mngr}/themes/default/public/js/jquery.min.js |
mkdir %{dir_mngr}/themes/default/public/js |
95 |
|
[ -h %{dir_mngr}/themes/default/public/js/jquery.min.js ] || |
96 |
|
ln -s /usr/share/javascript/jquery/latest/jquery.min.js %{dir_mngr}/themes/default/public/js/jquery.min.js |
97 |
fi |
fi |
|
/sbin/e-smith/expand-template /usr/share/smanager/conf/srvmngr.conf |
|
|
/sbin/e-smith/expand-template /etc/systemd/system/smanager.service |
|
|
systemctl enable smanager.service |
|
|
systemctl restart smanager.service |
|
98 |
true |
true |
99 |
|
|
100 |
%postun |
%postun |
101 |
|
|
102 |
%files -f %{name}-%{version}-%{release}-filelist |
%files -f %{name}-%{version}-%{release}-filelist |
103 |
%defattr(-,root,root) |
%defattr(-,root,root) |
104 |
|
|
105 |
%changelog |
%changelog |
106 |
|
* Mon Nov 29 2021 Brian Read <brianr@bjsystems.co.uk> 0.1.4-4.sme |
107 |
|
- Add-dummy-classes-to-ep-files.patch [SME: 11780] |
108 |
|
|
109 |
|
* Mon Nov 15 2021 Michel Begue <mab974@misouk.com> 0.1.4-3.sme |
110 |
|
- Fix error message when linking, unlinking jquery in spec |
111 |
|
- Correct the 'review' panel presentation |
112 |
|
- Modify CSRFDefender plugin to take into account GET method |
113 |
|
- Add TOKEN param where the GET method is used in templates |
114 |
|
- Remove smanager from local url address |
115 |
|
|
116 |
|
* Mon Oct 11 2021 Michel Begue <mab974@protonmail.com> 0.1.4-2.sme |
117 |
|
- Fix incorrect list order (users, ibays, ...) |
118 |
|
- Add external private access (remote management) |
119 |
|
- Change CSRF error message |
120 |
|
|
121 |
|
* Mon Jun 21 2021 Michel Begue <mab974@gmail.com> 0.1.4-1.sme |
122 |
|
- New version: smeserver-manager-0.1.4-1 (= 0.1.2-13) |
123 |
|
|
124 |
|
* Sat Jun 19 2021 Michel Begue <mab974@gmail.com> 0.1.2-13.sme |
125 |
|
- Remove non english locale files (move to smeserver-manager-locale) |
126 |
|
- Fix error in 'locale2-conf' action |
127 |
|
|
128 |
|
* Tue Jun 15 2021 Michel Begue <mab974@gmail.com> 0.1.2-12.sme |
129 |
|
- Fix errors in daily script |
130 |
|
- Fix url and routes for 'hostentries' panel |
131 |
|
- Change GET to POST method for CSRF plugin (routes and templates) |
132 |
|
- Fix some translations |
133 |
|
|
134 |
|
* Tue Jun 08 2021 Michel Begue <mab974@gmail.com> 0.1.2-11.sme |
135 |
|
- Add cron job for secrets and routes purge |
136 |
|
- Add CSRFDefender plugin against CSRF attacks |
137 |
|
- Add optional fail2ban configuration files in doc |
138 |
|
- Fix zh-tw locale file name |
139 |
|
- Fix missing links in 'Bugreport' |
140 |
|
- Fix copyright in footer |
141 |
|
- Fix translations |
142 |
|
|
143 |
|
* Thu Jun 03 2021 Michel Begue <mab974@gmail.com> 0.1.2-10.sme |
144 |
|
- Add header for contrib in layout |
145 |
|
- fix emailsettings error 'webmail is only SSL' [SME: 11443] |
146 |
|
- fix locale files |
147 |
|
- clean up template files |
148 |
|
|
149 |
|
* Wed Apr 21 2021 Michel Begue <mab974@gmail.com> 0.1.2-9.sme |
150 |
|
- Add access attribute in configuration base |
151 |
|
- Verify modes and access compatibility |
152 |
|
- Display theme_switch button to logged in users only [SME: 11571] |
153 |
|
|
154 |
|
* Tue Apr 20 2021 Michel Begue <mab974@gmail.com> 0.1.2-8.sme |
155 |
|
- Fix 'theme switch' [SME: 11571] |
156 |
|
|
157 |
|
* Mon Apr 12 2021 Michel Begue <mab974@gmail.com> 0.1.2-7.sme |
158 |
|
- Fix server-mode in bugreport [SME: 10448] |
159 |
|
- Add systemd-default for smanager type (service) [SME: 11544] |
160 |
|
- Fix smanager type and status in db |
161 |
|
- Move initial security notification to central place |
162 |
|
- Render 'Manual' output in template |
163 |
|
- Add a link to koozali.org on Sme logo |
164 |
|
|
165 |
|
* Mon Jan 25 2021 Michel Begue <mab974@gmail.com> 0.1.2-6.sme |
166 |
|
- Fix missing backup functions |
167 |
|
- background mode for halt and reboot |
168 |
|
- Store debug mode in ENV |
169 |
|
- Add a warning mode notification |
170 |
|
- Fix some translations needing to be escaped |
171 |
|
|
172 |
|
* Wed Jan 13 2021 Michel Begue <mab974@gmail.com> 0.1.2-5.sme |
173 |
|
- Fix menu items not translated [SME: 11322] |
174 |
|
- Add other locales files |
175 |
|
|
176 |
|
* Thu Jan 07 2021 Michel Begue <mab974@gmail.com> 0.1.2-4.sme |
177 |
|
- Fix 404 error when trailing slash is missing |
178 |
|
- Fix missing translations for ibay and quota panels |
179 |
|
- Comment out pptp settings in remoteaccess panel |
180 |
|
- Fix 'sigusr1' exec for httpd [SME: 11185] |
181 |
|
|
182 |
|
* Tue Dec 01 2020 Michel Begue <mab974@gmail.com> 0.1.2-3.sme |
183 |
|
- Fix download error on 'viewlogfiles' panel [SME: 11217] |
184 |
|
- Fix duplicate entries in log files to be chosen |
185 |
|
- Fix duplicate translation terms in 'General' lexicon |
186 |
|
|
187 |
|
* Fri Nov 20 2020 Michel Begue <mab974@gmail.com> 0.1.2-2.sme |
188 |
|
- Fix smanager-update event name |
189 |
|
- Move smanager service to /usr/lib/systemd |
190 |
|
- Fix Bugreport file download |
191 |
|
- Fix translations missing in 'viewlogfiles' |
192 |
|
- Remove Admin auth in httpd configuration |
193 |
|
- Add an optional alias for admin sign in. |
194 |
|
- Remove systemctl from .spec file |
195 |
|
|
196 |
|
* Thu Nov 19 2020 Michel Begue <mab974@gmail.com> 0.1.2-1.sme |
197 |
|
- Create new version smeserver-manager-0.1.2-1 (= 0.1.0-31) |
198 |
|
|
199 |
|
* Wed Oct 07 2020 Michel Begue <mab974@gmail.com> 0.1.0-31.sme |
200 |
|
- smanager-refresh event come back |
201 |
|
- add smanager version in footer |
202 |
|
- add optional refresh in layout |
203 |
|
- fix yum logfile displaying |
204 |
|
|
205 |
|
* Mon Oct 05 2020 Michel Begue <mab974@gmail.com> 0.1.0-30.sme |
206 |
|
- fix I18N Namespace change for keeping Language |
207 |
|
- clean up emailsettings code |
208 |
|
- remove old global lexicon files |
209 |
|
- add first simple tests |
210 |
|
- add smanager-update event |
211 |
|
|
212 |
* Mon Aug 17 2020 Michel Begue <mab974@gmail.com> 0.1.0-29.sme |
* Mon Aug 17 2020 Michel Begue <mab974@gmail.com> 0.1.0-29.sme |
213 |
- validate lexicon file before install |
- validate lexicon file before install |
214 |
- fix route url construction (+) |
- fix route url construction (+) |