--- rpms/smeserver-user-webspace/contribs8/smeserver-user-webspace.spec 2013/10/27 22:03:11 1.1 +++ rpms/smeserver-user-webspace/contribs8/smeserver-user-webspace.spec 2013/10/27 23:09:14 1.2 @@ -2,20 +2,40 @@ Summary: Enables user web spave on the e %define name smeserver-user-webspace Name: %{name} %define version 0.1 -%define release 5.SME7 +%define release 6 Version: %{version} -Release: %{release} -Copyright: GPL +Release: %{release}%{dist} +License: GPL Group: Networking/Daemons Source: %{name}-%{version}.tar.gz Patch0: %{name}-%{version}.patch0 Patch1: %{name}-%{version}.patch1 Patch2: %{name}-%{version}.patch2 +Patch3: smeserver-user-webspace-0.1.patch3 Packager: Jean-Philippe Pialasse BuildRoot: /var/tmp/e-smith-buildroot BuildArchitectures: noarch -Requires: smeserver-release >= 7.0 +Requires: smeserver-release >= 8.0 AutoReqProv: no +BuildRequires: e-smith-devtools + +%changelog +* Sun Oct 27 2013 Jean-Philippe Pialasse 0.1-6.sme +- initial import for sme8 + +* Fri Sep 08 2006 Jean-Philippe Pialasse +- adaptation ot the contrib to the SME 7 architecture +* Thu Nov 23 2000 Damien Curtain +- Moved the userdir template into templates-custom, utilising +- a new feature of e-smith-4.0.1 and greater. + +* Wed Nov 22 2000 Damien Curtain +- Added new templates. Added then removed;) ability to +- set userdir. Added www/user aliases. Post install script +- to prompt people to turn this on/off. + +* Tue Nov 21 2000 Paul Nesbit +- initial release %description Enables the e-smith server and gateway to host user web pages @@ -33,6 +53,7 @@ rm root/etc/e-smith/templates/etc/httpd/ rm root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/50UserDir00 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -51,26 +72,26 @@ rm -rf $RPM_BUILD_ROOT if [ $1 = 1 ] ; then enable_user_webspace() { - echo 'You now have the option to enable user web directories.' - echo - echo -n 'Would you like to enable User Directories? (y/N): ' - - read choice < /dev/tty - - if [ x$choice = xy ] ; then - /sbin/e-smith/config set UserPublicWeb on - /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf - service httpd-e-smith restart - elif [ x$choice = xY ] ; then - /sbin/e-smith/config set UserPublicWeb on - /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf - service httpd-e-smith restart - else - /sbin/e-smith/config set UserPublicWeb off - fi - - echo "adding html folder in user skeleton" - mkdir -p /etc/e-smith/skel/user/home/public_html +# echo 'You now have the option to enable user web directories.' +# echo +# echo -n 'Would you like to enable User Directories? (y/N): ' +# +# read choice < /dev/tty +# +# if [ x$choice = xy ] ; then +# /sbin/e-smith/config set UserPublicWeb service status on +# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +# service httpd-e-smith restart +# elif [ x$choice = xY ] ; then +# /sbin/e-smith/config set UserPublicWeb service status on +# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +# service httpd-e-smith restart +# else +# /sbin/e-smith/config set UserPublicWeb service status off +# fi +# +# echo "adding html folder in user skeleton" +# mkdir -p /etc/e-smith/skel/user/home/public_html cp /etc/e-smith/events/actions/user-create-unix /tmp/user-create-unix cp /etc/e-smith/events/actions/user-create-unix /etc/e-smith/events/actions/user-create-unix.backup echo "modifying user folder permission in user-create-unix from chmod 0700 to chmod 0755" @@ -85,6 +106,7 @@ system(\"/bin/chown\", \":www\", \"/home a\\ system(\"/bin/chown\", \":www\", \"/home/e-smith/files/users/\$userName\"); }" /etc/e-smith/events/actions/user-create-unix.backup > /etc/e-smith/events/actions/user-create-unix +# here we need to add something for tmp folder echo "modifying existing users spaces" ls -1 /home/e-smith/files/users/ >/tmp/listeusers @@ -98,7 +120,9 @@ system(\"/bin/chown\", \":www\", \"/home mkdir -p /home/e-smith/files/users/$line/home/public_html chown -R $line:www /home/e-smith/files/users/$line/home/public_html chmod -R 2770 /home/e-smith/files/users/$line/home/public_html - + mkdir -p /home/e-smith/files/users/$line/tmp + chown -R $line:www /home/e-smith/files/users/$line/tmp + chmod -R 2770 /home/e-smith/files/users/$line/tmp fi done } @@ -108,17 +132,17 @@ fi %postun if [ $1 = 0 ] ; then - /sbin/e-smith/config delete UserPublicWeb - /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf - service httpd-e-smith restart +# /sbin/e-smith/config delete UserPublicWeb +# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +# service httpd-e-smith restart cp /etc/e-smith/events/actions/user-create-unix /tmp/user-create-unix echo "modifying user folder permission in user-create-unix from chmod 0755 to chmod 0700" sed -e "/chmod 0770/d" /tmp/user-create-unix > /tmp/user-create-unix2 sed -e "s|chmod 0710|chmod 0700|g" /tmp/user-create-unix2 > /tmp/user-create-unix3 sed -e "/chown/d" /tmp/user-create-unix3 > /etc/e-smith/events/actions/user-create-unix - echo "removing html folder in user directory skeleton" - rm -r /etc/e-smith/skel/user/home/public_html - ls -1 /home/e-smith/files/users/ >/tmp/listeusers +# echo "removing html folder in user directory skeleton" +# rm -r /etc/e-smith/skel/user/home/public_html +# ls -1 /home/e-smith/files/users/ >/tmp/listeusers cat /tmp/listeusers|while read line do if [ "admin" != "$line" ] @@ -134,17 +158,3 @@ fi %files -f %{name}-%{version}-filelist %defattr(-,root,root) -%changelog -* Fri Sep 08 2006 Jean-Philippe Pialasse -- adaptation ot the contrib to the SME 7 architecture -* Thu Nov 23 2000 Damien Curtain -- Moved the userdir template into templates-custom, utilising -- a new feature of e-smith-4.0.1 and greater. - -* Wed Nov 22 2000 Damien Curtain -- Added new templates. Added then removed;) ability to -- set userdir. Added www/user aliases. Post install script -- to prompt people to turn this on/off. - -* Tue Nov 21 2000 Paul Nesbit -- initial release