10 date 2010.03.06.16.39.08; author jmp; state Exp;
16 date 2010.03.06.16.39.08; author jmp; state Exp;
22 date 2010.03.06.16.39.08; author jmp; state Exp;
27 date 2010.03.06.16.39.08; author jmp; state Exp;
32 date 2010.03.06.16.39.08; author jmp; state Exp;
38 @#-----------------------------------------------------------
39 #Fichier des definition des SPEC d'installation
40 #-----------------------------------------------------------
41 #to define the revision numer
42 %define revision %(R="$Revision: 0.84.0.0 $"; RR="${R##: }"; echo ${RR%% ?})
43 %define rversion %(echo %{revision} | cut -d'.' -f1-2)
44 %define rrelease %(echo %{revision}| cut -d'.' -f4)
45 %define revdate %(R="$Date: 2010/03/06 16:38:31 $"; RR="${R##: }"; echo ${RR%% ?})
46 %define sversion %(echo %{revdate} | cut -d' ' -f1 | tr -d '/')
47 %define ddist %(echo %{?dist}| tr -d '.')
48 #-----------------------------------------------------------
49 %{?!mark:%define mark fedora}
51 %if "%mark" == "fedora"
52 %define locmark %{?dist}
56 %define locmark .%{?dist}.%{mark}
58 #-----------------------------------------------------------
60 Summary: An application to drive linux container
61 Group: System Environment/Daemons
62 Version: %{rversion}.%{rrelease}
63 Release: %{?sversion}%{?locmark}
65 Source: ftp://ftp.safe.ca/pub/srctgz/%{name}-%{version}.tgz
66 URL: http://www.%{name}.safe.ca/index.html
68 Requires: kernel >= 2.6.24
69 Requires: util-linux-ng
70 Requires: bridge-utils
71 Requires: /usr/sbin/brctl,/sbin/ip,/bin/ps,/usr/bin/wc
72 Requires: /sbin/chkconfig
73 Requires: /bin/chmod,/bin/sed,/bin/sh,/bin/ln
74 #---------------------------------------------------------------
75 buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
79 vzgot is a set of tool to manage linux container
80 it allow to run a wide range of distribution
81 (from RH-7.3 to FC12, Centos-4.6 to Centos-5.3)
82 while using a plain linux kernel (above 2.6.24).
86 #%defattr(0640,root,root,0755)
87 %doc %{name}-%{version}*.build_date
88 %doc README Changes QUICK-START
90 %{_var}/lib/%{name}/RPM
91 %{_var}/lib/%{name}/vzdir
92 %{_var}/lib/%{name}/etc/ssh
93 %{_var}/lib/%{name}/home
94 %{_var}/lib/%{name}/cgroup.d
95 %{_var}/lib/%{name}/vztemplate
98 %{_usr}/sbin/%{name}.mksrvz
99 %{_usr}/sbin/%{name}.redoall
100 %{_var}/lib/%{name}/shell/%{name}.net
101 %{_var}/lib/%{name}/shell/%{name}.fboot
102 %{_var}/lib/%{name}/shell/%{name}.fboot.redhat
103 %{_var}/lib/%{name}/shell/%{name}.fboot.debian
104 %{_var}/lib/%{name}/shell/%{name}.open
105 %{_var}/lib/%{name}/shell/%{name}.close
106 %{_var}/lib/%{name}/shell/%{name}.start
107 %{_var}/lib/%{name}/shell/%{name}.create
108 %{_var}/lib/%{name}/shell/%{name}.destroy
110 %config(noreplace) %{_sysconfdir}/%{name}/vzgot_config
111 %config(noreplace) %{_sysconfdir}/%{name}/vzgot_list
112 %config(noreplace) %{_var}/lib/%{name}/etc/shadow
113 %config(noreplace) %{_var}/lib/%{name}/etc/resolv.conf
114 %config(noreplace) %{_var}/lib/%{name}/etc/groups
115 %config(noreplace) %{_var}/lib/%{name}/etc/users
116 %config(noreplace) %{_var}/lib/%{name}/etc/sudoers
117 %config(noreplace) %{_var}/lib/%{name}/etc/sysconfig/iptables
118 %config(noreplace) %{_var}/lib/%{name}/etc/snmp/snmpd.conf
120 #-----------------------------------------------------------
121 #This is the RPM install/upgrade/remove directive
122 #-----------------------------------------------------------
123 #before install or upgrade
126 #after install or upgrade
128 if [ "$1" = 1 ]; then
129 /sbin/chkconfig %{name} on 2>/dev/null || :
130 #extracting HOST root password to be used as container common password
131 /bin/chmod 600 %{_var}/lib/%{name}/etc/shadow
132 /bin/sed 's/#.*//g' /etc/shadow | \
133 grep -v '^[[:space:]]*$' | \
134 grep root >> %{_var}/lib/%{name}/etc/shadow
135 #extracting HOST nameserver to be used by container
136 /bin/sed 's/#.*//g' /etc/resolv.conf \
137 >> %{_var}/lib/%{name}/etc/resolv.conf
140 #before upgrade or remove
143 #after upgrade or remove
145 if [ "$1" = 0 ]; then
146 %{_initrddir}/%{name} stop 2>/dev/null || :
147 /sbin/chkconfig --del %{name} 2>/dev/null || :
150 #-----------------------------------------------------------
152 #-----------------------------------------------------------
158 %{__rm} -rf %{buildroot}
159 %{?_smp_mflags:%define _smp_mflags -j `/usr/bin/getconf _NPROCESSORS_ONLN`}
160 %{__make} -s %{?_smp_mflags} DIST=%{?ddist} prod
163 %{__rm} -rf %{buildroot}
167 %{__rm} -fr %{buildroot}
168 mkdir -p -m0755 %{buildroot}
169 %{__make} -s install DESTDIR=%{buildroot}
172 * Mon Jan 4 2010 Jean-Marc Pigeon <jmp@@safe.ca> 0.71.6-20100104
174 * In none debug flag, vzgot was not returning echo
176 * Defining a 'FLINUX' env variable within shell script
177 vzgot.mksrvz to be pass to 'vzgot create' and used by
178 vzgot.fboot to prepare container with the right
179 linux family (RedHat,SUSE,...) structure
181 * Sun Jan 3 2010 Jean-Marc Pigeon <jmp@@safe.ca> 0.71.3-20100104
191 @#-----------------------------------------------------------
192 #Fichier des definition des SPEC d'installation
193 #-----------------------------------------------------------
194 #to define the revision numer
195 %define revision %(R="$Revision: 0.83.0.1 $"; RR="${R##: }"; echo ${RR%% ?})
196 %define rversion %(echo %{revision} | cut -d'.' -f1-2)
197 %define rrelease %(echo %{revision}| cut -d'.' -f4)
198 %define revdate %(R="$Date: 2010/03/06 16:39:08 $"; RR="${R##: }"; echo ${RR%% ?})
199 %define sversion %(echo %{revdate} | cut -d' ' -f1 | tr -d '/')
200 %define ddist %(echo %{?dist}| tr -d '.')
201 #-----------------------------------------------------------
202 %{?!mark:%define mark fedora}
204 %if "%mark" == "fedora"
205 %define locmark %{?dist}
208 %if "%mark" == "safe"
209 %define locmark .%{?dist}.%{mark}
211 #-----------------------------------------------------------
213 Summary: An application to drive linux container
214 Group: System Environment/Daemons
215 Version: %{rversion}.%{rrelease}
216 Release: %{?sversion}%{?locmark}
218 Source: ftp://ftp.safe.ca/pub/srctgz/%{name}-%{version}.tgz
219 URL: http://www.%{name}.safe.ca/index.html
221 Requires: kernel >= 2.6.24
222 Requires: util-linux-ng
223 Requires: bridge-utils
224 Requires: /usr/sbin/brctl,/sbin/ip,/bin/ps,/usr/bin/wc
225 Requires: /sbin/chkconfig
226 Requires: /bin/chmod,/bin/sed,/bin/sh,/bin/ln
227 #---------------------------------------------------------------
228 buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
232 vzgot is a set of tool to manage linux container
233 it allow to run a wide range of distribution
234 (from RH-7.3 to FC12, Centos-4.6 to Centos-5.3)
235 while using a plain linux kernel (above 2.6.24).
239 #%defattr(0640,root,root,0755)
240 %doc %{name}-%{version}*.build_date
241 %doc README Changes QUICK-START
243 %{_var}/lib/%{name}/RPM
244 %{_var}/lib/%{name}/vzdir
245 %{_var}/lib/%{name}/etc/ssh
246 %{_var}/lib/%{name}/home
247 %{_var}/lib/%{name}/cgroup.d
248 %{_var}/lib/%{name}/vztemplate
249 %{_initrddir}/%{name}
251 %{_usr}/sbin/%{name}.mksrvz
252 %{_usr}/sbin/%{name}.redoall
253 %{_var}/lib/%{name}/shell/%{name}.net
254 %{_var}/lib/%{name}/shell/%{name}.fboot
255 %{_var}/lib/%{name}/shell/%{name}.fboot.redhat
256 %{_var}/lib/%{name}/shell/%{name}.fboot.debian
257 %{_var}/lib/%{name}/shell/%{name}.open
258 %{_var}/lib/%{name}/shell/%{name}.close
259 %{_var}/lib/%{name}/shell/%{name}.start
260 %{_var}/lib/%{name}/shell/%{name}.create
261 %{_var}/lib/%{name}/shell/%{name}.destroy
263 %config(noreplace) %{_sysconfdir}/%{name}/vzgot_config
264 %config(noreplace) %{_sysconfdir}/%{name}/vzgot_list
265 %config(noreplace) %{_var}/lib/%{name}/etc/shadow
266 %config(noreplace) %{_var}/lib/%{name}/etc/resolv.conf
267 %config(noreplace) %{_var}/lib/%{name}/etc/groups
268 %config(noreplace) %{_var}/lib/%{name}/etc/users
269 %config(noreplace) %{_var}/lib/%{name}/etc/sudoers
270 %config(noreplace) %{_var}/lib/%{name}/etc/sysconfig/iptables
271 %config(noreplace) %{_var}/lib/%{name}/etc/snmp/snmpd.conf
273 #-----------------------------------------------------------
274 #This is the RPM install/upgrade/remove directive
275 #-----------------------------------------------------------
276 #before install or upgrade
279 #after install or upgrade
281 if [ "$1" = 1 ]; then
282 /sbin/chkconfig %{name} on 2>/dev/null || :
283 #extracting HOST root password to be used as container common password
284 /bin/chmod 600 %{_var}/lib/%{name}/etc/shadow
285 /bin/sed 's/#.*//g' /etc/shadow | \
286 grep -v '^[[:space:]]*$' | \
287 grep root >> %{_var}/lib/%{name}/etc/shadow
288 #extracting HOST nameserver to be used by container
289 /bin/sed 's/#.*//g' /etc/resolv.conf \
290 >> %{_var}/lib/%{name}/etc/resolv.conf
293 #before upgrade or remove
296 #after upgrade or remove
298 if [ "$1" = 0 ]; then
299 %{_initrddir}/%{name} stop 2>/dev/null || :
300 /sbin/chkconfig --del %{name} 2>/dev/null || :
303 #-----------------------------------------------------------
305 #-----------------------------------------------------------
311 %{__rm} -rf %{buildroot}
312 %{?_smp_mflags:%define _smp_mflags -j `/usr/bin/getconf _NPROCESSORS_ONLN`}
313 %{__make} -s %{?_smp_mflags} DIST=%{?ddist} prod
316 %{__rm} -rf %{buildroot}
320 %{__rm} -fr %{buildroot}
321 mkdir -p -m0755 %{buildroot}
322 %{__make} -s install DESTDIR=%{buildroot}
325 * Mon Jan 4 2010 Jean-Marc Pigeon <jmp@@safe.ca> 0.71.6-20100104
327 * In none debug flag, vzgot was not returning echo
329 * Defining a 'FLINUX' env variable within shell script
330 vzgot.mksrvz to be pass to 'vzgot create' and used by
331 vzgot.fboot to prepare container with the right
332 linux family (RedHat,SUSE,...) structure
334 * Sun Jan 3 2010 Jean-Marc Pigeon <jmp@@safe.ca> 0.71.3-20100104
341 @Ratrapage numero de Version
346 %define revision %(R="$Revision: 0.84 $"; RR="${R##: }"; echo ${RR%% ?})
353 #=================================================================================
358 %define revision %(R="$Revision: 0.84.0.0 $"; RR="${R##: }"; echo ${RR%% ?})
361 %define revdate %(R="$Date: 2010/03/06 16:38:31 $"; RR="${R##: }"; echo ${RR%% ?})
367 @Ratrapage numero de Version
372 %define revision %(R="$Revision: 0.83 $"; RR="${R##: }"; echo ${RR%% ?})
375 %define revdate %(R="$Date: 2010/03/06 16:39:08 $"; RR="${R##: }"; echo ${RR%% ?})
381 @Mise en place su GIT
386 %define revision %(R="$Revision: 0.83.0.0 $"; RR="${R##: }"; echo ${RR%% ?})