source: branches/2.05/mindi/mindi.spec @ 156

Last change on this file since 156 was 156, checked in by bcornec, 14 years ago

Management of the mindi manpage for RPMS and base install

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