]> git.pld-linux.org Git - packages/geninitrd.git/blob - geninitrd.spec
- suggest for blkid in image generation (grub2 defaults to UUID mode)
[packages/geninitrd.git] / geninitrd.spec
1 ### TODO:
2 # - BUG: you can't set in /etc/mdadm.conf:
3 #  DEVICE partitions containers
4 #  (which is default BTW if none set). Generation of initrd will fail
5 #
6 Summary:        Creates an initial ramdisk image for preloading modules
7 Summary(pl.UTF-8):      Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu
8 Name:           geninitrd
9 Version:        10000.20
10 # leave rel 1 for ac
11 Release:        5
12 License:        GPL
13 Group:          Applications/System
14 Source0:        %{name}-%{version}.tar.gz
15 # Source0-md5:  de4e015717e7dc37417a6b687063a49f
16 Patch0:         %{name}-romfs.patch
17 Patch1:         %{name}-gzip-compressor.patch
18 Patch2:         %{name}-scsi_sync_scan.patch
19 Patch3:         %{name}-tuxonice_on_dm.patch
20 Patch4:         %{name}-mdadm.patch
21 BuildRequires:  xmlto >= 0:0.0.18-1
22 Requires:       /usr/bin/ldd
23 Requires:       awk
24 Requires:       busybox-initrd > 1.00-4
25 Requires:       coreutils
26 Requires:       cpio
27 Requires:       fileutils
28 Requires:       genromfs
29 Requires:       gzip
30 Requires:       mktemp >= 1.5-8
31 Requires:       module-init-tools >= 3.2.2-6
32 Requires:       mount
33 Requires:       pci-database >= 0.4
34 Requires:       rc-scripts >= 0.2.7
35 Requires:       tar
36 %if "%{pld_release}" == "ti"
37 Requires:       lvm2-initrd
38 Requires:       mdadm-initrd >= 1.12.0-1
39 %else
40 # otherwise LVM subsystem is not enabled in geninitrd
41 Suggests:       lvm2-initrd
42 # without this softraid installations of PLD fail
43 Suggests:       mdadm-initrd >= 1.12.0-1
44 %endif
45 # suggest for blkid
46 %if "%{pld_release}" != "ac"
47 Suggests:       util-linux-ng-initrd
48 %endif
49 Obsoletes:      mkinitrd
50 %if "%{pld_release}" == "ac"
51 Conflicts:      grubby < 5.0.4-3.1
52 %else
53 Conflicts:      grubby < 6.0.24-3
54 %endif
55 Conflicts:      udev-initrd < 1:104
56 Conflicts:      xz < 4.999.9
57 BuildArch:      noarch
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 Geninitrd creates filesystem images for use as initial ramdisk
62 (initrd) images. These ramdisk images are often used to preload the
63 block device modules (SCSI or RAID) needed to access the root
64 filesystem.
65
66 In other words, generic kernels can be built without drivers for any
67 SCSI adapters which load the SCSI driver as a module. Since the kernel
68 needs to read those modules, but in this case it isn't able to address
69 the SCSI adapter, an initial ramdisk is used. The initial ramdisk is
70 loaded by the operating system loader (normally LILO) and is available
71 to the kernel as soon as the ramdisk is loaded. The ramdisk image
72 loads the proper SCSI adapter and allows the kernel to mount the root
73 filesystem. The geninitrd program creates such a ramdisk using
74 information found in the /etc/modules.conf file.
75
76 %description -l pl.UTF-8
77 Geninitrd służy do tworzenia obrazu systemu plikowego używanego jako
78 inicjalny ramdysk (initrd), z którego przy starcie systemu są ładowane
79 moduły kernela z obsługą urządzeń których obsługa nie jest
80 wkompilowana w kernel. Zazwyczaj modułami ładowanymi z inicjalnego
81 systemu plikowego są sterowniki SCSI, IDE czy też RAID po to żeby w
82 dalszej części inicjacji systemu był możliwy dostęp do głównego
83 systemu plikowego (root fs).
84
85 Dzięki initrd jest możliwe używanie dystrybucyjnego kernela w którym
86 wkompilowana jest minimalna ilość obsługi różnych urządzeń, a reszta
87 kodu obsługi sterowników SCSI, IDE czy RAID jest doczytywana w trakcie
88 startu z initrd. Skrypt geninitrd generuje obraz ramdysku na podstawie
89 bieżących informacji zawartych w /etc/modules.conf.
90
91 %prep
92 %setup -q
93 %if "%{pld_release}" == "ti"
94 %patch0 -p1
95 %patch1 -p1
96 %endif
97 %patch2 -p0
98 %patch3 -p1
99 %patch4 -p0
100
101 %build
102 %{__make}
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 %{__make} install \
108         DESTDIR=$RPM_BUILD_ROOT
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %files
114 %defattr(644,root,root,755)
115 %doc ChangeLog
116 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/geninitrd
117 %attr(755,root,root) /sbin/geninitrd
118 %{_mandir}/man8/geninitrd.8*
119
120 %dir /lib/geninitrd
121 /lib/geninitrd/functions
122 /lib/geninitrd/mod-*.sh
This page took 0.074969 seconds and 3 git commands to generate.