/[smecontribs]/rpms/smeserver-user-webspace/contribs8/smeserver-user-webspace.spec
ViewVC logotype

Contents of /rpms/smeserver-user-webspace/contribs8/smeserver-user-webspace.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (show annotations) (download)
Mon Nov 25 17:36:19 2013 UTC (10 years, 6 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-user-webspace-0_1-11_el5_sme
Changes since 1.6: +6 -1 lines
* Mon Nov 25 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-11.sme
- added httpd reconfiguration for user create, modify,delete,lock  events

1 Summary: Enables user web spave on the e-smith server and gateway.
2 %define name smeserver-user-webspace
3 Name: %{name}
4 %define version 0.1
5 %define release 11
6 Version: %{version}
7 Release: %{release}%{dist}
8 License: GPL
9 Group: Networking/Daemons
10 Source: %{name}-%{version}.tar.gz
11 Patch0: %{name}-%{version}.patch0
12 Patch1: %{name}-%{version}.patch1
13 Patch2: %{name}-%{version}.patch2
14 Patch3: smeserver-user-webspace-0.1.patch3
15 Patch4: smeserver-user-webspace-0.1-actions.patch
16 Patch5: smeserver-user-webspace-0.1-patch5.patch
17 Patch6: smeserver-user-webspace-0.1-patch6.patch
18 Packager: Jean-Philippe Pialasse <tests@pialasse.com>
19 BuildRoot: /var/tmp/e-smith-buildroot
20 BuildArchitectures: noarch
21 Requires: smeserver-release >= 8.0
22 AutoReqProv: no
23 BuildRequires: e-smith-devtools
24
25 %changelog
26 * Mon Nov 25 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-11.sme
27 - added httpd reconfiguration for user create, modify,delete,lock events
28
29 * Sun Nov 24 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-10.sme
30 - fix more typos in patchs
31 - patch5 for httpd template
32
33 * Sat Nov 23 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-8.sme
34 - moved spec dirty work on action to real actions
35 - added skel folders
36 - added two events and link to actions in the proper events
37 - precleaning spec
38 - patchs typo fixes
39
40 * Sun Oct 27 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-6.sme
41 - initial import for sme8
42
43 * Fri Sep 08 2006 Jean-Philippe Pialasse <unnilennium@pialasse.com>
44 - adaptation ot the contrib to the SME 7 architecture
45
46 * Thu Nov 23 2000 Damien Curtain <damien@pagefault.org>
47 - Moved the userdir template into templates-custom, utilising
48 - a new feature of e-smith-4.0.1 and greater.
49
50 * Wed Nov 22 2000 Damien Curtain <damien@pagefault.org>
51 - Added new templates. Added then removed;) ability to
52 - set userdir. Added www/user aliases. Post install script
53 - to prompt people to turn this on/off.
54
55 * Tue Nov 21 2000 Paul Nesbit <pkn@e-smith.com>
56 - initial release
57
58 %description
59 Enables the e-smith server and gateway to host user web pages
60 from their home directories. Simply create a public_html directory
61 inside your ~/home/ directory and any web pages placed there in
62 will be available via the urls http://www/~user and http://www/user.
63
64 %prep
65 %setup
66 #rm createlinks
67 rm -r root/etc/e-smith/events/console-save
68 rm -r root/etc/e-smith/events/actions/action1
69 rm root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50UserDir00
70
71 %patch0 -p1
72 rm root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/50UserDir00
73 %patch1 -p1
74 %patch2 -p1
75 %patch3 -p1
76 %patch4 -p1
77 perl createlinks
78 %patch5 -p1
79 %patch6 -p1
80
81
82 %build
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
87 rm -f %{name}-%{version}-filelist
88 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %pre
94 %preun
95 #%post
96 #if [ $1 = 1 ] ; then
97 # enable_user_webspace() {
98
99 # echo 'You now have the option to enable user web directories.'
100 # echo
101 # echo -n 'Would you like to enable User Directories? (y/N): '
102 #
103 # read choice < /dev/tty
104 #
105 # if [ x$choice = xy ] ; then
106 # /sbin/e-smith/config set UserPublicWeb service status on
107 # /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
108 # service httpd-e-smith restart
109 # elif [ x$choice = xY ] ; then
110 # /sbin/e-smith/config set UserPublicWeb service status on
111 # /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
112 # service httpd-e-smith restart
113 # else
114 # /sbin/e-smith/config set UserPublicWeb service status off
115 # fi
116 #
117 # echo "adding html folder in user skeleton"
118 # mkdir -p /etc/e-smith/skel/user/home/public_html
119
120 # cp /etc/e-smith/events/actions/user-create-unix /tmp/user-create-unix
121 # cp /etc/e-smith/events/actions/user-create-unix /etc/e-smith/events/actions/user-create-unix.backup
122 # echo "modifying user folder permission in user-create-unix from chmod 0700 to chmod 0755"
123 #cat /tmp/user-create-unix | sed -e "a|chmod 0700|chmod 0770, \"/home/e-smith/files/users/\$userName/home/public_html\";|g" |sed -e "a|chmod 0700|chown \$userName:www, \"/home/e-smith/files/users/\$userName\" |g"|sed -e "s|chmod 0700|chmod 0710|g" > /etc/e-smith/events/actions/user-create-unix
124
125 #sed -e "/chmod 0700/{
126 #s|chmod 0700|chmod 0710|
127 #a \\
128 #chmod 0770, \"/home/e-smith/files/users/\$userName/home/public_html\";
129 #a \\
130 #system(\"/bin/chown\", \":www\", \"/home/e-smith/files/users/\$userName/home/public_html\");
131 #a\\
132 #system(\"/bin/chown\", \":www\", \"/home/e-smith/files/users/\$userName\");
133 #}" /etc/e-smith/events/actions/user-create-unix.backup > /etc/e-smith/events/actions/user-create-unix
134 ## here we need to add something for tmp folder
135 #
136 # echo "modifying existing users spaces"
137 # ls -1 /home/e-smith/files/users/ >/tmp/listeusers
138 # cat /tmp/listeusers|while read line
139 # do
140 # if [ "admin" != "$line" ]
141 # then
142 # chmod 0710 /home/e-smith/files/users/$line
143 # echo "chmod $line:www /home/e-smith/files/users/$line"
144 # chown $line:www /home/e-smith/files/users/$line
145 # mkdir -p /home/e-smith/files/users/$line/home/public_html
146 # chown -R $line:www /home/e-smith/files/users/$line/home/public_html
147 # chmod -R 2770 /home/e-smith/files/users/$line/home/public_html
148 # mkdir -p /home/e-smith/files/users/$line/tmp
149 # chown -R $line:www /home/e-smith/files/users/$line/tmp
150 # chmod -R 2770 /home/e-smith/files/users/$line/tmp
151 # fi
152 # done
153 # }
154
155 # enable_user_webspace
156 #fi
157
158 #%postun
159 #if [ $1 = 0 ] ; then
160 # /sbin/e-smith/config delete UserPublicWeb
161 # /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
162 # service httpd-e-smith restart
163 # cp /etc/e-smith/events/actions/user-create-unix /tmp/user-create-unix
164 # echo "modifying user folder permission in user-create-unix from chmod 0755 to chmod 0700"
165 # sed -e "/chmod 0770/d" /tmp/user-create-unix > /tmp/user-create-unix2
166 # sed -e "s|chmod 0710|chmod 0700|g" /tmp/user-create-unix2 > /tmp/user-create-unix3
167 # sed -e "/chown/d" /tmp/user-create-unix3 > /etc/e-smith/events/actions/user-create-unix
168 # echo "removing html folder in user directory skeleton"
169 # rm -r /etc/e-smith/skel/user/home/public_html
170 # ls -1 /home/e-smith/files/users/ >/tmp/listeusers
171 # cat /tmp/listeusers|while read line
172 # do
173 # if [ "admin" != "$line" ]
174 # then
175 # chmod -R 0755 /home/e-smith/files/users/$line
176 # chmod 0700 /home/e-smith/files/users/$line
177 # chown -R $line:$line /home/e-smith/files/users/$line
178 # fi
179 # done
180 #
181 #fi
182
183 %files -f %{name}-%{version}-filelist
184 %defattr(-,root,root)
185

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed