1 | # |
---|
2 | # $Id: mindi.spec 347 2006-01-26 12:36:06Z bcornec $ |
---|
3 | # |
---|
4 | %define is_mandriva %(test -e /etc/mandriva-release && echo 1 || echo 0) |
---|
5 | %define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0) |
---|
6 | %define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0) |
---|
7 | %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) |
---|
8 | %define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0) |
---|
9 | |
---|
10 | %define name mindi |
---|
11 | %define version VVV |
---|
12 | %define mrel RRR |
---|
13 | # if mandriva official build (rpm --with is_official) |
---|
14 | %{?is_official:%define rel %{mkrel} %{mrel}}%{!?is_official:%define rel %{mrel}} |
---|
15 | %define src %{name}-%{version}.tgz |
---|
16 | %define grp Archiving/Backup |
---|
17 | %define addreqb bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools, afio |
---|
18 | |
---|
19 | %if %is_redhat |
---|
20 | %define grp Applications/Archiving |
---|
21 | %define addreq %{addreqb}, which, grep >= 2.5 |
---|
22 | Autoreq: 0 |
---|
23 | %endif |
---|
24 | |
---|
25 | %if %is_mandrake |
---|
26 | %define src %{name}-%{version}.tar.bz2 |
---|
27 | %define addreq %{addreqb}, which, grep >= 2.5 |
---|
28 | Autoreqprov: no |
---|
29 | %endif |
---|
30 | |
---|
31 | %if %is_mandriva |
---|
32 | %define src %{name}-%{version}.tar.bz2 |
---|
33 | %define addreq %{addreqb}, which, grep >= 2.5 |
---|
34 | Autoreqprov: no |
---|
35 | %endif |
---|
36 | |
---|
37 | %if %is_suse |
---|
38 | %define addreq %{addreqb} |
---|
39 | %endif |
---|
40 | |
---|
41 | # define the mkrel macro if it is not already defined if mandriva offical build |
---|
42 | %if is_official |
---|
43 | %{?!mkrel:%define mkrel(c:) %{-c:0.%{-c*}.}%{!?_with_unstable:%(perl -e '$_="%{1}";m/(.\*)(\\d+)$/;$rel=${2}-1;re;print "$1$rel";').%{?subrel:%subrel}%{!?subrel:1}.%{?distversion:%distversion}%{?!distversion:%(echo $[%{mdkversion}/10])}}%{?_with_unstable:%{1}}%{?distsuffix:%distsuffix}%{?!distsuffix:mdk}} |
---|
44 | %endif |
---|
45 | |
---|
46 | Summary: Mindi creates emergency boot disks/CDs using your kernel, tools and modules |
---|
47 | Name: %name |
---|
48 | Version: %version |
---|
49 | Release: %rel |
---|
50 | License: GPL |
---|
51 | Group: %{grp} |
---|
52 | Url: http://mondorescue.berlios.de |
---|
53 | Source: %{src} |
---|
54 | BuildRoot: %{_tmppath}/%{name}-%{version} |
---|
55 | Requires: %{addreq} |
---|
56 | # Not on all systems |
---|
57 | #Conflicts: bonnie++ |
---|
58 | |
---|
59 | %description |
---|
60 | Mindi takes your kernel, modules, tools and libraries, and puts them on N |
---|
61 | bootable disks (or 1 bootable CD image). You may then boot from the disks/CD |
---|
62 | and do system maintenance - e.g. format partitions, backup/restore data, |
---|
63 | verify packages, etc. |
---|
64 | |
---|
65 | %prep |
---|
66 | %{__rm} -rf $RPM_BUILD_ROOT |
---|
67 | %setup -n %name-%{version} |
---|
68 | |
---|
69 | %build |
---|
70 | %ifarch ia64 |
---|
71 | %{__make} -f Makefile.parted2fdisk clean |
---|
72 | %{__make} -f Makefile.parted2fdisk |
---|
73 | %endif |
---|
74 | |
---|
75 | %install |
---|
76 | export DONT_RELINK=1 |
---|
77 | |
---|
78 | %{__rm} -rf $RPM_BUILD_ROOT |
---|
79 | export PREFIX=${RPM_BUILD_ROOT}%{_exec_prefix} |
---|
80 | export CONFDIR=${RPM_BUILD_ROOT}%{_sysconfdir} |
---|
81 | export RPMBUILDMINDI="true" |
---|
82 | |
---|
83 | ./install.sh |
---|
84 | |
---|
85 | %if %is_suse |
---|
86 | %{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/doc/%name-%{version} |
---|
87 | %endif |
---|
88 | |
---|
89 | %clean |
---|
90 | %{__rm} -rf $RPM_BUILD_ROOT |
---|
91 | |
---|
92 | %post |
---|
93 | for i in %{_libdir}/mindi/aux-tools/sbin/* %{_libdir}/mindi/rootfs/bin/* %{_libdir}/mindi/rootfs/sbin/* ; do |
---|
94 | if [ ! -h $i ]; then |
---|
95 | %{__chmod} 755 $i |
---|
96 | fi |
---|
97 | done |
---|
98 | if [ -f /usr/local/sbin/mindi ]; then |
---|
99 | echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove your manual mindi installation !" |
---|
100 | fi |
---|
101 | |
---|
102 | %files |
---|
103 | %defattr(644,root,root,755) |
---|
104 | %config(noreplace) %{_sysconfdir}/mindi/deplist.txt |
---|
105 | %doc ChangeLog INSTALL COPYING README TODO README.ia64 README.pxe README.busybox svn.log |
---|
106 | %{_mandir} |
---|
107 | %{_libdir}/mindi |
---|
108 | %attr(755,root,root) %{_sbindir}/* |
---|
109 | |
---|
110 | %changelog |
---|
111 | * Fri Nov 05 2005 Bruno Cornec <bcornec@users.berlios.de> 1.05 |
---|
112 | - ia64 is now working |
---|
113 | - use install.sh script |
---|
114 | - use libdir for binary data |
---|
115 | |
---|
116 | * Tue Sep 06 2005 Bruno Cornec <bcornec@users.berlios.de> 1.04_berlios |
---|
117 | - Merge of patches mentionned on mondo ML + ia64 updates |
---|
118 | - Fix bugs when called alone |
---|
119 | |
---|
120 | * Tue May 03 2005 Hugo Rabson <hugorabson@msn.com> 1.04_cvs_20050503 |
---|
121 | - supports exec-shield |
---|
122 | |
---|
123 | * Wed Aug 04 2004 Hugo Rabson <hugorabson@msn.com> 1.03 |
---|
124 | - better support of SLES 8 |
---|
125 | |
---|
126 | * Mon Jun 28 2004 Hugo Rabson <hugorabson@msn.com> 1.02 |
---|
127 | - better kernel-level logging |
---|
128 | - added ACL, xattr binaries to deplist.txt |
---|
129 | - fixed obscure bug which occasionally stopped mindi from correctly finding |
---|
130 | and documenting all LVM2 LVM-on-RAID volumes |
---|
131 | |
---|
132 | * Fri Jun 25 2004 Hugo Rabson <hugorabson@msn.com> 1.01 |
---|
133 | - added ide_tape and other modules to mindi's config detection |
---|
134 | - unmount errant ramdisk ($mtpt) if fail to create boot floppy |
---|
135 | - better support of ISO dirs at restore-time (Conor Daly) |
---|
136 | |
---|
137 | * Fri Jun 18 2004 Hugo Rabson <hugorabson@msn.com> 1.00 |
---|
138 | - first 1.0x release |
---|
139 | - busybox now static |
---|
140 | - trap Ctrl-Alt-Del; trigger soft reset |
---|
141 | - better SuSE 9.1 support |
---|
142 | - added parted2fdisk.pl (IA64) (Bruno Cornec) |
---|
143 | - add LVM2 support for kernel 2.6 (Takeru Komoriya) |
---|
144 | - better detection of multiple Mindis (Martin Fürstenau) |
---|
145 | - don't complain if just a Mindi boot CD & not a platform for Mondo |
---|
146 | - updated busybox to 1.0.0pre10 |
---|
147 | - removed uClibc |
---|
148 | - add memtest support |
---|
149 | - 2.6 kernel support |
---|
150 | - removed Embleer files (Andree Leidenfrost) |
---|
151 | - added kernel-only floppy support, to accommodate really big kernels |
---|
152 | - updated+rebuilt busybox |
---|
153 | - added star support |
---|
154 | - mount /sys at boot-time |
---|
155 | - better 64-bit and 2.6 kernel support |
---|
156 | - better LVM, failsafe kernel support (Jim Richard) |
---|
157 | - use LILO, not raw kernel, on 1.4MB boot floppy |
---|
158 | - record names of unsaved modules, for future reference |
---|
159 | - enlarged ramdisk by 8MB |
---|
160 | |
---|
161 | * Wed Oct 22 2003 Hugo Rabson <hugorabson@msn.com> 0.95 |
---|
162 | - changed some '==' to '=' --- now more RH6-friendly |
---|
163 | - allow absolute pathnames again in deplist |
---|
164 | - disable multifunc cd thing |
---|
165 | - better Gentoo support (Bill) |
---|
166 | - better OnStream support |
---|
167 | - better Slackware support (Laurenz) |
---|
168 | - added partimagehack-static to deplist.txt |
---|
169 | - recompiled Busybox - now 10k smaller; better stack-handling |
---|
170 | - fixed boot screen typo |
---|
171 | - added support for 'auto' fs format |
---|
172 | - better devfs support for Mandrake users |
---|
173 | - better Debian+LVM support (Ralph Grewe) |
---|
174 | - updated analyze-my-lvm to handle floating-point gigabyte -L values |
---|
175 | |
---|
176 | * Thu Jul 24 2003 Anonymous <root@rohan> 0.94 |
---|
177 | - altered rootfs's /dev entry to stop cvs from becoming confused |
---|
178 | - tweaked MAX_COMPRESSED_SIZE |
---|
179 | - added multi-function CD support to mindi and sbin/post-init |
---|
180 | - re-mount root as rw just in case |
---|
181 | - ask user to remove last data (floppy) disk if nec. (Tom Mortell) |
---|
182 | - added support for 5th column in mountlist.txt for labels |
---|
183 | - added symlinks.tgz |
---|
184 | - suppress erroneous error msgs re: failsafe kernel |
---|
185 | |
---|
186 | * Sun May 18 2003 Hugo Rabson <hugorabson@msn.com> 0.93 |
---|
187 | - added cciss.o to SCSI_MODS |
---|
188 | - if format type is (e.g.) ext3,ext2 then use 1st entry |
---|
189 | - re-enabled fsck* |
---|
190 | - if cciss in use the enable it at boot-time |
---|
191 | - added /dev/ataraid/* to boot disk via ataraid.tgz (Luc S.) |
---|
192 | - better ISO support |
---|
193 | - tweaked Mindi to use 10-15% fewer floppies |
---|
194 | - added RUN_AFTER_INITIAL_BOOT_PHASE to let user specify a command |
---|
195 | to be run by Mindi before it bootstraps to aux data disks; |
---|
196 | e.g. 'echo engage > /proc/scsi/something' |
---|
197 | - added RUN_AFTER_BOOT_PHASE_COMPLETE to let user specify a command |
---|
198 | to be run by Mindi after it boots but before it runs mondorestore |
---|
199 | - allow for Debian & other Stiefkinder that use 'none', not 'swap' |
---|
200 | as the mountpoint of the swap partition |
---|
201 | - removed afio dependency |
---|
202 | - re-worked install.sh and tarball not to use tgz's |
---|
203 | - cleared up the boot msg |
---|
204 | - updated busybox to 0.60.5; updated uClibc to 0.9.19 |
---|
205 | - add #!/bin/sh to start of insert-all-my-modules |
---|
206 | - fixed obscure bug in install-additional-tools |
---|
207 | - changed grep -m to grep | head -n1 for Debian users |
---|
208 | - moved vmlinuz, lib.tar.bz2 to mindi-kernel tarball/rpm |
---|
209 | |
---|
210 | * Wed Apr 09 2003 Hugo Rabson <hugorabson@msn.com> 0.92 |
---|
211 | - fixed LVM/RAID bugs (Brian Borgeson) |
---|
212 | - if bad lilo, give more verbose error before quitting |
---|
213 | - added mt and perl to deplist.txt |
---|
214 | - insist on gawk being present |
---|
215 | - insmod ide-cd, cdrom, isofs, just in case |
---|
216 | - boot-time tmpfs ramdisk is now 40m (was 34m) |
---|
217 | - cleaned up logs |
---|
218 | - iso mode now calls Interactive |
---|
219 | - make SizeOfPartition() more Debian-friendly (Andree Leidenfrost) |
---|
220 | - clean up some calls to grep, esp. partition_mountpt=... |
---|
221 | - corrected some bashisms, to suit Debian ped- er, users |
---|
222 | - made first line refer to bash, not sh, to make sure |
---|
223 | the Debian people know Mindi requires bash, not hs |
---|
224 | - changed grep -v "#" and grep -vx "#.*" to grep -vx " *#.*" |
---|
225 | - disabled code which would have made Mindi use sfdisk instead of fdisk |
---|
226 | if it looked as if Debian's fdisk would misbehave |
---|
227 | |
---|
228 | * Wed Feb 12 2003 Hugo Rabson <hugorabson@msn.com> 0.91 |
---|
229 | - new devel branch |
---|
230 | - EXTRA_SPACE=16384 |
---|
231 | - updated ResolveSoftlinks() to work better with b0rkn Gentoo devfs /dev |
---|
232 | - patched analyze-my-lvm (Benjamin Mampaey) |
---|
233 | - detect built-in boot.b files in lilo |
---|
234 | - cleaned up spec file a bit, more use of macros (Jesse Keating) |
---|
235 | - return w/err, don't abort, if Matt Nelson's RH8 system is farked |
---|
236 | - better at finding isolinux.bin |
---|
237 | - better at analyzing dependencies when running on broken distributions |
---|
238 | - try harder to boot from CD, even if tape fails |
---|
239 | - added ADDITIONAL_BOOT_PARAMS to be sent to kernel |
---|
240 | - better resolution of relative softlinks, leading to fewer |
---|
241 | duplicates on data disks and therefore fewer data disks |
---|
242 | - detect Debian+devfs; use sfdisk instead of fdisk in that |
---|
243 | eventuality, to work around yet another of Debian's warts |
---|
244 | - removed /lib/libuuid.* from rootfs.tgz |
---|
245 | - fixed vi |
---|
246 | - mindi now uses gawk --traditional (making gawk behave in a functionally |
---|
247 | identical way to awk) - PASS; great, so now Debian needs to fix its awk :) |
---|
248 | - removed / from list of dirs accessed when trying to resolve deplist entry |
---|
249 | - spinner bugfix; handle odd LABELs properly (Tom Mortell) |
---|
250 | - fixed LVM/RAID bugs (Brian Borgeson) |
---|
251 | |
---|
252 | * Mon Dec 02 2002 Hugo Rabson <hugo@firstlinux.net> 0.72_20021202 |
---|
253 | - misc code clean-up |
---|
254 | - save boot device's boot sector |
---|
255 | - detect and beware Compaq diagnostic partitions |
---|
256 | - better handling of devfs V non-devfs kernels and boot devs |
---|
257 | - trimmed busybox 0.60.3 binary on boot disk |
---|
258 | - mindi now resides in /usr/local/bin |
---|
259 | - removed lilo from dependencies |
---|
260 | - more Gentoo-friendly |
---|
261 | |
---|
262 | * Sun Nov 18 2002 Hugo Rabson <hugo@firstlinux.net> 0.71 |
---|
263 | - if your kernel's builddate doesn't match any of the kernels in |
---|
264 | your /boot directory then fudge the issue & find the closest |
---|
265 | match (*grumble* Debian) |
---|
266 | - scan tape & CD at start, to force inclusion of modules on boot device |
---|
267 | - double EXTRA_SPACE if >7 disks |
---|
268 | - slimmer, more lithesome logfile |
---|
269 | - now accepts --findkernel |
---|
270 | - line 1982 - dd count=24000 should be count=$ramdisksize (Andras Korn) |
---|
271 | - better handling of non-Linux partitions on DevFS-enabled kernels |
---|
272 | - misc clean-ups |
---|
273 | - fixed Debian/ramdisksize/bloat problem (Johannes Franken) |
---|
274 | - fixed 2.4.20/fdisk eccentricity (Alistair Stevens) |
---|
275 | - updated kernel to 2.4.18-mdk6 |
---|
276 | - generate mountlist in dev-abetical order ;) |
---|
277 | - fixed minor bug in .spec file |
---|
278 | - better at finding /boot/boot.b if your distro breaks the de facto standard |
---|
279 | - fixed minor bug in MakeMountlist |
---|
280 | - fixed install.sh |
---|
281 | - cleaned up deplist.txt |
---|
282 | - added rudimentary -v / --version flag |
---|
283 | - line 1180 or so --- duplicate mindi.iso entries --- fixed |
---|
284 | - added /bin/[ - a softlink to /bin/sh |
---|
285 | - ListAllPartitions() - sanity fix (KP) |
---|
286 | - fixed .spec bug |
---|
287 | - better feedback |
---|
288 | - added Markus's RAID patch |
---|
289 | - ListAllPartitions() - include /mnt/win* (Hugo) |
---|
290 | |
---|
291 | * Sun Sep 08 2002 Hugo Rabson <hugo@firstlinux.net> 0.70 |
---|
292 | - better logging by dependency-calculating code |
---|
293 | - better handling of dependencies, specifically softlinks |
---|
294 | - if called by mondo then use mondo's temp dir as our temp dir too |
---|
295 | - changed gawk to $AWK in a few places, to allow for Debian |
---|
296 | - added host* config files to deplist |
---|
297 | - added tftp, ifconfig to busybox |
---|
298 | - added RPC support to uClibc |
---|
299 | - cleaned up creation of Mondo-Mindi configuration file |
---|
300 | - fixed bug in TryToFindKernelPath which stopped it from handling |
---|
301 | multiple, same-version kernels gracefully |
---|
302 | - cleaned up deplist.txt |
---|
303 | - receive 'DIFFERENTIAL' variable from Mondo |
---|
304 | - better Debian compatibility, esp. w/detection of ver# (Hector Alvarez) |
---|
305 | - better devfs support; call fgrep in places instead of grep (Andrew Korn) |
---|
306 | - fixed analyze-my-lvm (Ralph Gruwe) |
---|
307 | - moved 50K of stuff from rootfs.tgz to aux-tools.tgz |
---|
308 | - added x11-tools.tgz option |
---|
309 | - updated /dev/console and /dev/tty0 (Paul Stevens) |
---|
310 | - cleaned up /mnt/groovy-stuff V /tmp/tmpfs code |
---|
311 | - catch sigint, sighup, etc. |
---|
312 | - fixed LILO-related message.txt mistake |
---|
313 | - .spec file clean-up; automation; config file (Carl Wilhem Soderstrom) |
---|
314 | - better devfs support (Andrew Korn) |
---|
315 | |
---|
316 | * Sun Jul 14 2002 Hugo Rabson <hugo@firstlinux.net> 0.64-1 |
---|
317 | - fixed RH7.3 readonly bug |
---|
318 | - improved nfs config file creation |
---|
319 | - search more locations for isolinux.bin |
---|
320 | - added isonuke option |
---|
321 | - faster data disk creation |
---|
322 | - better DevFS support (Hector Alvarez, DuckX) |
---|
323 | - nfs-related fix (Hans Lie) |
---|
324 | - abort if vfat filesystem present but mkfs.vfat missing |
---|
325 | - removed softlink to pico |
---|
326 | - allow Mondo to say no compression will be used |
---|
327 | - added [ to ramdisk |
---|
328 | - tar data disks with -b [block size] of 32k |
---|
329 | - don't autoboot to 'RESTORE' screen - it's scary! |
---|
330 | - let user choose lilo or syslinux as boot loader |
---|
331 | - added syslinux support |
---|
332 | - cleaned up message screens |
---|
333 | |
---|