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

Annotation 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.4 - (hide annotations) (download)
Sat Nov 23 23:20:29 2013 UTC (10 years, 6 months ago) by unnilennium
Branch: MAIN
Changes since 1.3: +7 -6 lines
* Sat Nov 23 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-7.sme
- moved spec dirty work on action to real actions
- added skel folders
- added two events and link to actions in the proper events
- precleaning spec

* Sun Oct 27 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-6.sme
- initial import for sme8

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

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