1 |
# $Id: smeserver-manager.spec,v 1.1 2018/02/04 17:51:12 jpp Exp $ |
# $Id: smeserver-manager.spec,v 1.5 2019/12/16 17:32:51 michel Exp $ |
2 |
|
|
3 |
Summary: smeserver manager 2 navigation module |
Summary: smeserver manager 2 navigation module |
4 |
%define name smeserver-manager |
%define name smeserver-manager |
5 |
Name: %{name} |
Name: %{name} |
6 |
%define version 0.1.0 |
%define version 0.1.0 |
7 |
%define release 1 |
%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}-%{version}.tar.xz |
Source: %{name}-%{version}.tar.xz |
13 |
|
Patch0: smeserver-manager-0.1.0-bz10506.patch |
14 |
|
Patch1: smeserver-manager-add-basic-files.patch |
15 |
|
Patch2: smeserver-manager-0.1.0-mojo_struct.patch |
16 |
|
Patch3: smeserver-manager-0.1.0-setuid_groups.patch |
17 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
18 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
19 |
BuildRequires: gettext |
BuildRequires: gettext |
21 |
Requires: e-smith-lib >= 1.18.0-26 |
Requires: e-smith-lib >= 1.18.0-26 |
22 |
Requires: e-smith-manager >= 2.4.0-22 |
Requires: e-smith-manager >= 2.4.0-22 |
23 |
Requires: perl-Mojolicious >= 6.44 |
Requires: perl-Mojolicious >= 6.44 |
24 |
|
Requires: perl-Mojolicious-Plugin-I18N >= 1.6 |
25 |
Requires: pwauth |
Requires: pwauth |
26 |
Requires: perl(Apache::AuthTkt) |
Requires: perl(Apache::AuthTkt) |
27 |
Provides: server-manager2 |
#Requires: smeserver-manager-html |
28 |
|
#Provides: server-manager2 |
29 |
AutoReqProv: no |
AutoReqProv: no |
30 |
|
|
31 |
%changelog |
%changelog |
32 |
|
* Wed Jan 01 2020 Michel Begue <mab974@gmail.com> 0.1.0-4.sme |
33 |
|
- fix setuid with wrapper (remove sudo) |
34 |
|
- panels quota and groups |
35 |
|
|
36 |
|
* Mon Dec 16 2019 Michel Begue <mab974@gmail.com> 0.1.0-3.sme |
37 |
|
- simple architecture : basic mojolicious app running |
38 |
|
- some panels |
39 |
|
- requires perl-Mojolicious-Plugin-I18N |
40 |
|
|
41 |
|
* Tue Feb 06 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1.0-2.sme |
42 |
|
- Start adding some template files |
43 |
|
|
44 |
* Sun Feb 04 2018 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.0-1.sme |
* Sun Feb 04 2018 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.0-1.sme |
45 |
- first smeserver-manager package [SME: 10506] |
- first smeserver-manager package [SME: 10506] |
46 |
this is a sandbox to dev the next server-manager based on mojolicious |
this is a sandbox to dev the next server-manager based on mojolicious |
764 |
|
|
765 |
%prep |
%prep |
766 |
%setup |
%setup |
767 |
|
%patch0 -p1 |
768 |
|
%patch1 -p1 |
769 |
|
%patch2 -p1 |
770 |
|
%patch3 -p1 |
771 |
|
|
772 |
%build |
%build |
773 |
perl createlinks |
# Force creation of potentially empty directoriesperl createlinks |
774 |
#gcc -o root/etc/e-smith/web/functions/wrapper manager.c |
mkdir -p root/etc/e-smith/web/functions2 |
775 |
#mkdir -p root/home/e-smith/db/navigation |
mkdir -p root/home/e-smith/db/navigation |
776 |
#mkdir -p root/etc/e-smith/web/common/css |
mkdir -p root/etc/e-smith/web/common/css |
777 |
|
mkdir -p root/etc/e-smith/web/panels/manager2/{cgi-bin,html} |
778 |
|
mkdir -p root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images |
779 |
|
|
780 |
|
gcc -o root/etc/e-smith/web/functions2/wrapper2 manager2.c |
781 |
|
|
782 |
#mkdir -p root/usr/share/locale/en_US/LC_MESSAGES/ |
#mkdir -p root/usr/share/locale/en_US/LC_MESSAGES/ |
783 |
#xgettext -o root/usr/share/locale/en_US/LC_MESSAGES/foot.tmpl.po root/etc/e-smith/templates/etc/e-smith/web/common/foot.tmpl/25Copyright |
#xgettext -o root/usr/share/locale/en_US/LC_MESSAGES/foot.tmpl.po root/etc/e-smith/templates/etc/e-smith/web/common/foot.tmpl/25Copyright |
786 |
#ln -s head.tmpl root/etc/e-smith/web/common/noframes_head.tmpl |
#ln -s head.tmpl root/etc/e-smith/web/common/noframes_head.tmpl |
787 |
#ln -s foot.tmpl root/etc/e-smith/web/common/noframes_foot.tmpl |
#ln -s foot.tmpl root/etc/e-smith/web/common/noframes_foot.tmpl |
788 |
|
|
789 |
#mkdir -p root/etc/e-smith/web/panels/manager/html |
#mkdir -p root/etc/e-smith/web/panels/manager2/html |
790 |
#for file in index initial |
for file in index #initial |
791 |
#do |
do |
792 |
# ln -s ../../../functions/wrapper root/etc/e-smith/web/panels/manager/html/${file}.cgi |
ln -s ../../../functions2/wrapper2 root/etc/e-smith/web/panels/manager2/html/${file}.cgi |
793 |
#done |
done |
794 |
|
|
795 |
# Force creation of potentially empty directories |
# Force creation of potentially empty directories |
|
#mkdir -p root/etc/e-smith/web/{common,functions} |
|
|
#mkdir -p root/etc/e-smith/web/panels/manager/{cgi-bin,html} |
|
|
#mkdir -p root/etc/e-smith/web/panels/password/{cgi-bin,html} |
|
796 |
#mkdir -p root/etc/httpd/admin-conf |
#mkdir -p root/etc/httpd/admin-conf |
|
mkdir -p root/etc/e-smith/web/panels/manager2/{cgi-bin,html} |
|
|
|
|
797 |
#mkdir -p root/service |
#mkdir -p root/service |
798 |
#mkdir -p root/etc/rc.d/init.d/supervise |
#mkdir -p root/etc/rc.d/init.d/supervise |
799 |
#for service in httpd-admin |
#for service in httpd-admin |
814 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
815 |
rm -f %{name}-%{version}-%{release}-filelist |
rm -f %{name}-%{version}-%{release}-filelist |
816 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
817 |
|
--file /etc/e-smith/web/panels/manager2/cgi-bin/wbl 'attr(4750,root,admin)' \ |
818 |
|
--file /etc/e-smith/web/panels/manager2/cgi-bin/useraccounts 'attr(4750,root,admin)' \ |
819 |
|
--dir /etc/e-smith/web/panels/manager2 'attr(0755,root,root)' \ |
820 |
|
--file /etc/e-smith/web/functions2/wrapper2 'attr(4750,root,admin)' \ |
821 |
|
--file /etc/e-smith/web/functions2/index.cgi 'attr(0500,root,root)' \ |
822 |
> %{name}-%{version}-%{release}-filelist |
> %{name}-%{version}-%{release}-filelist |
823 |
|
echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist |
824 |
|
|
825 |
|
|
826 |
|
# Samples only |
827 |
# --file /etc/e-smith/web/common/cgi-bin/login 'attr(0755,root,root)' \ |
# --file /etc/e-smith/web/common/cgi-bin/login 'attr(0755,root,root)' \ |
828 |
# --file /etc/e-smith/web/common/cgi-bin/logout 'attr(0755,root,root)' \ |
# --file /etc/e-smith/web/common/cgi-bin/logout 'attr(0755,root,root)' \ |
829 |
# --file /etc/e-smith/web/functions/wrapper 'attr(4750,root,admin)' \ |
# --file /etc/e-smith/web/functions/wrapper 'attr(4750,root,admin)' \ |
836 |
# --file /var/service/httpd-admin/log/run 'attr(0755,root,root)' \ |
# --file /var/service/httpd-admin/log/run 'attr(0755,root,root)' \ |
837 |
# --dir /var/log/httpd-admin 'attr(0750,smelog,smelog)' \ |
# --dir /var/log/httpd-admin 'attr(0750,smelog,smelog)' \ |
838 |
# > %{name}-%{version}-%{release}-filelist |
# > %{name}-%{version}-%{release}-filelist |
|
echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist |
|
839 |
|
|
840 |
%clean |
%clean |
841 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
842 |
|
|
843 |
%pre |
%pre |
844 |
%preun |
%preun |
845 |
|
#rm -f /etc/e-smith/web/panels/manager2/srvmngr/public/css/sme_core.css |
846 |
|
#rm -f /etc/e-smith/web/panels/manager2/srvmngr/public/images/btn_donateCC_LG.gif |
847 |
|
#rm -f /etc/e-smith/web/panels/manager2/cgi-bin/logout |
848 |
|
|
849 |
%post |
%post |
850 |
#find /etc/e-smith/web/panels/manager/cgi-bin/ -type f | \ |
#find /etc/e-smith/web/panels/manager/cgi-bin/ -type f | \ |
851 |
# sed -n '/\/[0-9a-z]\{32\}$/p' | \ |
# sed -n '/\/[0-9a-z]\{32\}$/p' | \ |
852 |
# xargs grep -l Persisten | \ |
# xargs grep -l Persisten | \ |
853 |
# xargs rm -f |
# xargs rm -f |
854 |
|
ln -s /etc/e-smith/web/common/css/sme_core.css /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css |
855 |
|
ln -s /etc/e-smith/web/common/css/sme_main.css /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css |
856 |
|
ln -s /etc/e-smith/web/common/css/sme_menu.css /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css |
857 |
|
ln -s /etc/e-smith/web/common/btn_donateCC_LG.gif /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/btn_donateCC_LG.gif |
858 |
|
ln -s /etc/e-smith/web/common/smeserver_logo.jpg /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/smeserver_logo.jpg |
859 |
|
ln -s /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/srvmngr.conf |
860 |
|
ln -s /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/srvmngr.pl |
861 |
|
ln -s /etc/e-smith/web/common/cgi-bin/logout /etc/e-smith/web/panels/manager2/cgi-bin/logout |
862 |
|
/sbin/e-smith/expand-template /etc/httpd/admin-conf/httpd.conf |
863 |
|
chmod 0755 /etc/e-smith/web/panels/manager2/html/index.cgi |
864 |
|
chown root:admin /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/log/development.log |
865 |
|
chmod 0660 /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/log/development.log |
866 |
|
chown root:admin /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation.js |
867 |
|
chmod 0660 /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation.js |
868 |
|
chown root:admin /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep |
869 |
|
chmod 0660 /etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep |
870 |
|
chown root:admin /etc/e-smith/web/functions2/wrapper2 |
871 |
|
chmod 4750 /etc/e-smith/web/functions2/wrapper2 |
872 |
|
|
|
%postun |
|
873 |
|
|
874 |
|
%postun |
875 |
%files -f %{name}-%{version}-%{release}-filelist |
%files -f %{name}-%{version}-%{release}-filelist |
876 |
%defattr(-,root,root) |
%defattr(-,root,root) |