/[smeserver]/rpms/e-smith-base/sme10/e-smith-base.spec
ViewVC logotype

Diff of /rpms/e-smith-base/sme10/e-smith-base.spec

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

Revision 1.105 by jpp, Tue Mar 16 16:33:05 2021 UTC Revision 1.106 by jpp, Tue Mar 16 18:15:42 2021 UTC
# Line 1  Line 1 
1  # $Id: e-smith-base.spec,v 1.104 2021/03/06 06:35:18 jpp Exp $  # $Id: e-smith-base.spec,v 1.105 2021/03/16 16:33:05 jpp Exp $
2    
3  Summary: e-smith server and gateway - base module  Summary: e-smith server and gateway - base module
4  %define name e-smith-base  %define name e-smith-base
# Line 130  AutoReqProv: no Line 130  AutoReqProv: no
130  %description  %description
131  e-smith server and gateway software - base module.  e-smith server and gateway software - base module.
132    
133    %prep
134    %setup
135    %patch0 -p1
136    %patch1 -p1
137    %patch2 -p1
138    %patch3 -p1
139    %patch4 -p1
140    %patch5 -p1
141    %patch6 -p1
142    %patch7 -p1
143    %patch8 -p1
144    %patch9 -p1
145    %patch10 -p1
146    %patch11 -p1
147    %patch12 -p1
148    %patch13 -p1
149    %patch14 -p1
150    %patch15 -p1
151    %patch16 -p1
152    %patch17 -p1
153    %patch18 -p1
154    %patch19 -p1
155    %patch20 -p1
156    %patch21 -p1
157    %patch22 -p1
158    %patch23 -p1
159    %patch24 -p1
160    %patch25 -p1
161    %patch26 -p1
162    %patch27 -p1
163    %patch28 -p1
164    %patch29 -p1
165    %patch30 -p1
166    rm  -rf root/home/e-smith/web/common/edition/info.txt
167    %patch31 -p1
168    %patch32 -p1
169    %patch33 -p1
170    %patch34 -p1
171    %patch35 -p1
172    %patch36 -p1
173    rm -rf root/var/service/raidmonitor root/service/raidmonitor
174    %patch37 -p1
175    %patch38 -p1
176    rm -f root/etc/rc.d/init.d/supervise/wan
177    mkdir -p root/etc/systemd/system-preset
178    %patch39 -p1
179    %patch40 -p1
180    mkdir -p root/usr/lib/systemd/system/dhcpd.service.d
181    rm root/service/dhcpd
182    rm -rf root/var/service/dhcpd
183    rm root/etc/rc.d/init.d/supervise/dhcpd
184    %patch41 -p1
185    %patch42 -p1
186    %patch43 -p1
187    %patch44 -p1
188    %patch45 -p1
189    %patch46 -p1
190    %patch47 -p1
191    rm -rf root/var/service/local root/var/service/syslog
192    rm -rf root/etc/rc.d/init.d/local
193    %patch48 -p1
194    %patch49 -p1
195    %patch50 -p1
196    %patch51 -p1
197    mkdir -p root/usr/lib/systemd/system/sme-server.target.d
198    %patch52 -p1
199    %patch53 -p1
200    %patch54 -p1
201    mkdir -p root/usr/lib/systemd/system/basic.target.wants
202    %patch55 -p1
203    %patch56 -p1
204    %patch57 -p1
205    %patch58 -p1
206    %patch59 -p1
207    rm -rf root/etc/e-smith/db/configuration/defaults/DynDNS
208    %patch60 -p1
209    rm -rf root/var/service/klogd
210    rm -rf root/etc/e-smith/db/configuration/defaults/klogd
211    %patch61 -p1
212    %patch62 -p1
213    rm -rf root/etc/rc6.d
214    rm -rf root/etc/rc.d/rc1.d
215    rm -rf root/etc/rc.d/rc6.d
216    rm -rf root/etc/rc.d/init.d
217    rm -rf root/etc/rc.d/rc1.d
218    
219    %build
220    
221    LEXICONS=$(find root/etc/e-smith/web/functions -type f| grep -v CVS)
222    
223    for lexicon in $LEXICONS
224    do
225        /sbin/e-smith/validate-lexicon $lexicon
226    done
227    
228    /sbin/e-smith/generate-lexicons
229    
230    xgettext -L perl -o root/usr/share/locale/en_US/LC_MESSAGES/server-console.po root/sbin/e-smith/console.pl
231    
232    perl createlinks
233    /sbin/e-smith/buildtests 10e-smith-base
234    
235    gcc -o root/sbin/e-smith/console console_wrapper.c
236    
237    # Force creation of potentially empty directories
238    mkdir -p root/etc/e-smith/web/panels/password/cgi-bin
239    ln -s ../../../functions/wrapper root/etc/e-smith/web/panels/password/cgi-bin/userpassword
240    
241    %install
242    rm -rf $RPM_BUILD_ROOT
243    mkdir -p $RPM_BUILD_ROOT/etc/selinux
244    (cd root   ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
245    /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
246        --file /sbin/e-smith/systemd/mdmonitor-pre 'attr(0554,root,root)' \
247        --file /etc/cron.daily/conf-mod_ssl 'attr(0544,root,root)' \
248        --dir /var/log/dhcpd 'attr(2750,smelog,smelog)' \
249        --dir /etc/e-smith/pam 'attr(0700,root,root)' \
250        --dir /home/e-smith/ssl.key 'attr(0700,root,root)' \
251        --dir /home/e-smith/ssl.crt 'attr(0700,root,root)' \
252        --dir /home/e-smith/ssl.pem 'attr(0700,root,root)' \
253        --dir /var/service/wan 'attr(1755,root,root)' \
254        --file /var/service/wan/down 'attr(0644,root,root)' \
255        --file /var/service/wan/run 'attr(0750,root,root)' \
256        --file /var/service/wan/run.dhclient 'attr(0750,root,root)' \
257        --file /var/service/wan/run.pppoe 'attr(0750,root,root)' \
258        --file /var/service/wan/run.static 'attr(0750,root,root)' \
259        --file /var/service/wan/run.dialup 'attr(0750,root,root)' \
260        --file /var/service/wan/run.disabled 'attr(0750,root,root)' \
261        --dir /var/service/wan/supervise 'attr(0700,root,root)' \
262        --dir /var/service/wan/log 'attr(1755,root,root)' \
263        --file /var/service/wan/log/run 'attr(0750,root,root)' \
264        --dir /var/service/wan/log/supervise 'attr(0700,root,root)' \
265        --dir /var/log/wan 'attr(2750,smelog,smelog)' \
266        --dir /var/service/ippp 'attr(1755,root,root)' \
267        --file /var/service/ippp/down 'attr(0644,root,root)' \
268        --file /var/service/ippp/run 'attr(0750,root,root)' \
269        --dir /var/service/ippp/supervise 'attr(0700,root,root)' \
270        --dir /var/service/ippp/log 'attr(1755,root,root)' \
271        --file /var/service/ippp/log/run 'attr(0750,root,root)' \
272        --dir /var/service/ippp/log/supervise 'attr(0700,root,root)' \
273        --dir /var/log/ippp 'attr(2750,smelog,smelog)' \
274        --dir /etc/e-smith/skel/user/.ssh 'attr(0700,root,root)' \
275        --file /etc/sysconfig/modules/dummy.modules 'attr(0755,root,root)' \
276        --dir /etc/selinux 'attr(0755,root,root)' \
277        > %{name}-%{version}-%{release}-filelist
278    
279    mkdir -p $RPM_BUILD_ROOT/home/e-smith/db
280    for file in %{dbfiles}
281    do
282        # Create ghost file for rpm
283        touch $RPM_BUILD_ROOT/home/e-smith/db/$file
284        echo "%config(noreplace) %attr(0640,root,admin) /home/e-smith/db/$file" \
285            >> %{name}-%{version}-%{release}-filelist
286    done
287    echo "%doc COPYING"          >> %{name}-%{version}-%{release}-filelist
288    
289    %clean
290    rm -rf $RPM_BUILD_ROOT
291    
292    %files -f %{name}-%{version}-%{release}-filelist
293    %defattr(-,root,root)
294    
295    %pre
296    /sbin/e-smith/create-system-user smelastsys 2999 \
297        'sme last system user marker' /tmp /bin/false
298    
299    %post
300    LEXICONS=$(find /etc/e-smith/locale/*/etc/e-smith/web/panels/password/cgi-bin/userpassword -type f 2>/dev/null)
301    
302    for lexicon in $LEXICONS
303    do
304        if [ -f $lexicon ]
305        then
306            cd $(dirname "$lexicon")
307            mv ./userpassword ../../../functions
308        fi
309    done
310    
311    if [ -d "/var/service/dhcpd" ]; then
312            rm -rf /var/service/dhcpd
313    fi
314    if [ -d "/var/service/raidmonitor" ]; then
315            rm -rf /var/service/raidmonitor
316    fi
317    if [ -d "/var/service/local" ]; then
318            rm -rf /var/service/local
319    fi
320    
321    
322  %changelog  %changelog
323  * Tue Mar 16 2021 Jean-Philippe Pialasse <tests@pialasse.com> 5.8.0-88.sme  * Tue Mar 16 2021 Jean-Philippe Pialasse <tests@pialasse.com> 5.8.0-88.sme
324  - cleanup /etc/rc.d and /var/service [SME: 9692]  - cleanup /etc/rc.d and /var/service [SME: 9692]
# Line 2133  e-smith server and gateway software - ba Line 2322  e-smith server and gateway software - ba
2322  - [4.15.3-01]  - [4.15.3-01]
2323  - Roll new development stream - 4.15.3  - Roll new development stream - 4.15.3
2324    
 %prep  
 %setup  
 %patch0 -p1  
 %patch1 -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  
 %patch27 -p1  
 %patch28 -p1  
 %patch29 -p1  
 %patch30 -p1  
 rm  -rf root/home/e-smith/web/common/edition/info.txt  
 %patch31 -p1  
 %patch32 -p1  
 %patch33 -p1  
 %patch34 -p1  
 %patch35 -p1  
 %patch36 -p1  
 rm -rf root/var/service/raidmonitor root/service/raidmonitor  
 %patch37 -p1  
 %patch38 -p1  
 rm -f root/etc/rc.d/init.d/supervise/wan  
 mkdir -p root/etc/systemd/system-preset  
 %patch39 -p1  
 %patch40 -p1  
 mkdir -p root/usr/lib/systemd/system/dhcpd.service.d  
 rm root/service/dhcpd  
 rm -rf root/var/service/dhcpd  
 rm root/etc/rc.d/init.d/supervise/dhcpd  
 %patch41 -p1  
 %patch42 -p1  
 %patch43 -p1  
 %patch44 -p1  
 %patch45 -p1  
 %patch46 -p1  
 %patch47 -p1  
 rm -rf root/var/service/local root/var/service/syslog  
 rm -rf root/etc/rc.d/init.d/local  
 %patch48 -p1  
 %patch49 -p1  
 %patch50 -p1  
 %patch51 -p1  
 mkdir -p root/usr/lib/systemd/system/sme-server.target.d  
 %patch52 -p1  
 %patch53 -p1  
 %patch54 -p1  
 mkdir -p root/usr/lib/systemd/system/basic.target.wants  
 %patch55 -p1  
 %patch56 -p1  
 %patch57 -p1  
 %patch58 -p1  
 %patch59 -p1  
 rm -rf root/etc/e-smith/db/configuration/defaults/DynDNS  
 %patch60 -p1  
 rm -rf root/var/service/klogd  
 rm -rf root/etc/e-smith/db/configuration/defaults/klogd  
 %patch61 -p1  
 %patch62 -p1  
 rm -rf root/etc/rc6.d  
 rm -rf root/etc/rc.d/rc1.d  
 rm -rf root/etc/rc.d/rc6.d  
 rm -rf root/etc/rc.d/init.d  
 rm -rf root/etc/rc.d/rc1.d  
   
 %pre  
 /sbin/e-smith/create-system-user smelastsys 2999 \  
     'sme last system user marker' /tmp /bin/false  
   
 %post  
 LEXICONS=$(find /etc/e-smith/locale/*/etc/e-smith/web/panels/password/cgi-bin/userpassword -type f 2>/dev/null)  
   
 for lexicon in $LEXICONS  
 do  
     if [ -f $lexicon ]  
     then  
         cd $(dirname "$lexicon")  
         mv ./userpassword ../../../functions  
     fi  
 done  
   
   
 %build  
   
 LEXICONS=$(find root/etc/e-smith/web/functions -type f| grep -v CVS)  
   
 for lexicon in $LEXICONS  
 do  
     /sbin/e-smith/validate-lexicon $lexicon  
 done  
   
 /sbin/e-smith/generate-lexicons  
   
 xgettext -L perl -o root/usr/share/locale/en_US/LC_MESSAGES/server-console.po root/sbin/e-smith/console.pl  
   
 perl createlinks  
 /sbin/e-smith/buildtests 10e-smith-base  
   
 gcc -o root/sbin/e-smith/console console_wrapper.c  
   
 # Force creation of potentially empty directories  
 mkdir -p root/etc/e-smith/web/panels/password/cgi-bin  
 ln -s ../../../functions/wrapper root/etc/e-smith/web/panels/password/cgi-bin/userpassword  
   
 %install  
 rm -rf $RPM_BUILD_ROOT  
 mkdir -p $RPM_BUILD_ROOT/etc/selinux  
 (cd root   ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  
 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \  
     --file /sbin/e-smith/systemd/mdmonitor-pre 'attr(0554,root,root)' \  
     --file /etc/cron.daily/conf-mod_ssl 'attr(0544,root,root)' \  
     --dir /var/log/dhcpd 'attr(2750,smelog,smelog)' \  
     --dir /etc/e-smith/pam 'attr(0700,root,root)' \  
     --dir /home/e-smith/ssl.key 'attr(0700,root,root)' \  
     --dir /home/e-smith/ssl.crt 'attr(0700,root,root)' \  
     --dir /home/e-smith/ssl.pem 'attr(0700,root,root)' \  
     --dir /var/service/wan 'attr(1755,root,root)' \  
     --file /var/service/wan/down 'attr(0644,root,root)' \  
     --file /var/service/wan/run 'attr(0750,root,root)' \  
     --file /var/service/wan/run.dhclient 'attr(0750,root,root)' \  
     --file /var/service/wan/run.pppoe 'attr(0750,root,root)' \  
     --file /var/service/wan/run.static 'attr(0750,root,root)' \  
     --file /var/service/wan/run.dialup 'attr(0750,root,root)' \  
     --file /var/service/wan/run.disabled 'attr(0750,root,root)' \  
     --dir /var/service/wan/supervise 'attr(0700,root,root)' \  
     --dir /var/service/wan/log 'attr(1755,root,root)' \  
     --file /var/service/wan/log/run 'attr(0750,root,root)' \  
     --dir /var/service/wan/log/supervise 'attr(0700,root,root)' \  
     --dir /var/log/wan 'attr(2750,smelog,smelog)' \  
     --dir /var/service/ippp 'attr(1755,root,root)' \  
     --file /var/service/ippp/down 'attr(0644,root,root)' \  
     --file /var/service/ippp/run 'attr(0750,root,root)' \  
     --dir /var/service/ippp/supervise 'attr(0700,root,root)' \  
     --dir /var/service/ippp/log 'attr(1755,root,root)' \  
     --file /var/service/ippp/log/run 'attr(0750,root,root)' \  
     --dir /var/service/ippp/log/supervise 'attr(0700,root,root)' \  
     --dir /var/log/ippp 'attr(2750,smelog,smelog)' \  
     --dir /etc/e-smith/skel/user/.ssh 'attr(0700,root,root)' \  
     --file /etc/sysconfig/modules/dummy.modules 'attr(0755,root,root)' \  
     --dir /etc/selinux 'attr(0755,root,root)' \  
     > %{name}-%{version}-%{release}-filelist  
   
 mkdir -p $RPM_BUILD_ROOT/home/e-smith/db  
 for file in %{dbfiles}  
 do  
     # Create ghost file for rpm  
     touch $RPM_BUILD_ROOT/home/e-smith/db/$file  
     echo "%config(noreplace) %attr(0640,root,admin) /home/e-smith/db/$file" \  
         >> %{name}-%{version}-%{release}-filelist  
 done  
 echo "%doc COPYING"          >> %{name}-%{version}-%{release}-filelist  
   
 %post  
   if [ -d "/var/service/dhcpd" ]; then  
         rm -rf /var/service/dhcpd  
   fi  
   if [ -d "/var/service/raidmonitor" ]; then  
         rm -rf /var/service/raidmonitor  
   fi  
   if [ -d "/var/service/local" ]; then  
         rm -rf /var/service/local  
   fi  
   
 %clean  
 rm -rf $RPM_BUILD_ROOT  
   
 %files -f %{name}-%{version}-%{release}-filelist  
 %defattr(-,root,root)  


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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