Annotation of /smage/trunk/core/dracut/dracut-044-r5.smage2
Parent Directory | Revision Log
Revision 9435 -
(hide annotations)
(download)
Tue Apr 4 15:32:05 2017 UTC (7 years, 1 month ago) by niro
File size: 6983 byte(s)
Tue Apr 4 15:32:05 2017 UTC (7 years, 1 month ago) by niro
File size: 6983 byte(s)
auto added: ver bump to 045-r1
1 | niro | 8303 | # $Id$ |
2 | |||
3 | PNAME="dracut" | ||
4 | PVER="044" | ||
5 | PBUILD="r5" | ||
6 | |||
7 | niro | 8305 | STATE="disabled" |
8 | niro | 8303 | PCAT="sys-apps" |
9 | |||
10 | DESCRIPTION="Initramfs generator using udev which fully replaces mkinitrd." | ||
11 | HOMEPAGE="https://dracut.wiki.kernel.org/" | ||
12 | |||
13 | DEPEND=">= app-shells/bash-4.2 | ||
14 | >= virtual/bzip2 | ||
15 | >= virtual/gzip | ||
16 | >= virtual/xz-utils | ||
17 | >= virtual/cpio | ||
18 | >= virtual/tar | ||
19 | >= sys-apps/coreutils-8.22 | ||
20 | >= sys-apps/findutils-4.4 | ||
21 | >= virtual/grep | ||
22 | >= virtual/kbd | ||
23 | >= virtual/procps | ||
24 | >= virtual/module-tools | ||
25 | >= virtual/sed | ||
26 | >= virtual/eject | ||
27 | >= sys-apps/util-linux-2.27 | ||
28 | >= sys-apps/v86d-0.1.9 | ||
29 | >= sys-apps/plymouth-0.8.8 | ||
30 | >= sys-apps/grubby-8.35 | ||
31 | >= sys-fs/device-mapper-2.02.111 | ||
32 | >= sys-fs/udev-228 | ||
33 | >= sys-apps/systemd-228" | ||
34 | niro | 9435 | # >= sys-fs/lvm2-2.02.111 |
35 | niro | 8303 | |
36 | PROVIDE="virtual/initramfs-tools" | ||
37 | |||
38 | SDEPEND=">= app-text/docbook-xml-dtd-9 | ||
39 | >= app-text/docbook-xml-dtd-9 | ||
40 | >= app-text/asciidoc-8.6 | ||
41 | >= sys-apps/util-linux-dev-2.25 | ||
42 | >= sys-fs/udev-dev-228 | ||
43 | >= sys-apps/systemd-dev-228" | ||
44 | |||
45 | SRCFILE="${PNAME}-${PVER}.tar.xz" | ||
46 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
47 | |||
48 | ALX_PKG_KEEP="etc/dracut.conf | ||
49 | etc/dracut.conf.d | ||
50 | usr/lib/dracut/dracut-install | ||
51 | usr/lib/dracut/dracut-logger.sh | ||
52 | usr/lib/dracut/dracut-functions | ||
53 | usr/lib/dracut/dracut-functions.sh | ||
54 | usr/lib/dracut/dracut-initramfs-restore | ||
55 | usr/lib/dracut/dracut-version.sh | ||
56 | usr/lib/kernel/install.d/50-dracut.install | ||
57 | usr/lib/kernel/install.d/51-dracut-rescue.install | ||
58 | usr/lib/dracut/dracut-init.sh | ||
59 | usr/lib/dracut/skipcpio | ||
60 | usr/lib/dracut/modules.d/00bash | ||
61 | usr/lib/dracut/modules.d/00systemd | ||
62 | usr/lib/dracut/modules.d/01systemd-initrd | ||
63 | usr/lib/dracut/modules.d/02systemd-networkd | ||
64 | usr/lib/dracut/modules.d/05busybox | ||
65 | usr/lib/dracut/modules.d/10i18n | ||
66 | usr/lib/dracut/modules.d/30convertfs | ||
67 | usr/lib/dracut/modules.d/40uvesafb | ||
68 | usr/lib/dracut/modules.d/40network | ||
69 | usr/lib/dracut/modules.d/45ifcfg | ||
70 | usr/lib/dracut/modules.d/45url-lib | ||
71 | usr/lib/dracut/modules.d/50drm | ||
72 | usr/lib/dracut/modules.d/50plymouth | ||
73 | usr/lib/dracut/modules.d/90dm | ||
74 | usr/lib/dracut/modules.d/90dmsquash-live | ||
75 | usr/lib/dracut/modules.d/90kernel-network-modules | ||
76 | usr/lib/dracut/modules.d/90kernel-modules | ||
77 | usr/lib/dracut/modules.d/95dasd | ||
78 | usr/lib/dracut/modules.d/95dasd_mod | ||
79 | usr/lib/dracut/modules.d/95dasd_rules | ||
80 | usr/lib/dracut/modules.d/95fstab-sys | ||
81 | usr/lib/dracut/modules.d/95resume | ||
82 | usr/lib/dracut/modules.d/95rootfs-block | ||
83 | usr/lib/dracut/modules.d/95terminfo | ||
84 | usr/lib/dracut/modules.d/95udev-rules | ||
85 | usr/lib/dracut/modules.d/98dracut-systemd | ||
86 | usr/lib/dracut/modules.d/98pollcdrom | ||
87 | usr/lib/dracut/modules.d/98syslog | ||
88 | usr/lib/dracut/modules.d/98usrmount | ||
89 | usr/lib/dracut/modules.d/99base | ||
90 | usr/lib/dracut/modules.d/99fs-lib | ||
91 | usr/lib/dracut/modules.d/99img-lib | ||
92 | usr/lib/dracut/modules.d/99shutdown | ||
93 | usr/lib/systemd | ||
94 | usr/bin/dracut | ||
95 | usr/bin/dracut-catimages | ||
96 | usr/bin/lsinitrd | ||
97 | usr/bin/mkinitrd | ||
98 | var/initramfs | ||
99 | var/log/dracut.log" | ||
100 | # not supported with alx | ||
101 | # usr/lib/dracut/modules.d/90dmraid | ||
102 | # usr/lib/dracut/modules.d/90mdraid | ||
103 | # usr/lib/dracut/modules.d/90multipath | ||
104 | # usr/lib/dracut/modules.d/97biosdevname | ||
105 | |||
106 | sminclude mbuild mtools systemd cleanutils alx-split | ||
107 | msetfeature "!check" | ||
108 | |||
109 | # += to add injection files (alx.sminc) | ||
110 | SRC_URI+=( | ||
111 | http://www.kernel.org/pub/linux/utils/boot/${PNAME}/${SRCFILE} | ||
112 | mirror://${PNAME}/${SRCFILE} | ||
113 | mirror://${PNAME}/${PNAME}-044-magellan.patch | ||
114 | mirror://${PNAME}/${PNAME}-024-add-uvesafb-module.patch | ||
115 | mirror://${PNAME}/${PNAME}-036-mkinitrd-ignore-allow-missing-switch.patch | ||
116 | mirror://${PNAME}/${PNAME}-019-convertfs-make-selinux-optional.patch | ||
117 | mirror://${PNAME}/${PNAME}-044-network-support-udhcpc-dhcpcd.patch | ||
118 | mirror://${PNAME}/${PNAME}-043-busybox.patch | ||
119 | mirror://${PNAME}/${PNAME}-037-alx-busybox-install-method.patch | ||
120 | mirror://${PNAME}/${PNAME}-044-dmsquash-live-root-fixed-typo.patch | ||
121 | mirror://${PNAME}/${PNAME}-044-dmsquash-live-root-SQUASHED-can-be-set-earlier.patch | ||
122 | ) | ||
123 | |||
124 | UP2DATE="updatecmd http://www.kernel.org/pub/linux/utils/boot/${PNAME} | highesttarball xz" | ||
125 | |||
126 | src_prepare() | ||
127 | { | ||
128 | munpack ${SRCFILE} || die | ||
129 | cd ${SRCDIR} | ||
130 | |||
131 | # magellan compat patch | ||
132 | mpatch ${PNAME}-044-magellan.patch || die | ||
133 | |||
134 | # add uvesafb module to run v86d inside the initrd (default off) | ||
135 | mpatch ${PNAME}-024-add-uvesafb-module.patch || die | ||
136 | |||
137 | # for better mkinitrd compat and to fully support new-kernel-pkg | ||
138 | # as drop-in replacement ignore the --allow-missing switch | ||
139 | mpatch ${PNAME}-036-mkinitrd-ignore-allow-missing-switch.patch || die | ||
140 | |||
141 | # make selinux optional, we do not use it yet | ||
142 | mpatch ${PNAME}-019-convertfs-make-selinux-optional.patch || die | ||
143 | |||
144 | # add support for dhcpcd and udhcpc in the network module | ||
145 | mpatch ${PNAME}-044-network-support-udhcpc-dhcpcd.patch || die | ||
146 | |||
147 | # be compatible with busybox cmds | ||
148 | mpatch ${PNAME}-043-busybox.patch || die | ||
149 | |||
150 | # install the busybox module with the alx method via busybox.links file | ||
151 | mpatch ${PNAME}-037-alx-busybox-install-method.patch || die | ||
152 | |||
153 | # upstream dmsquash-live-root fixes | ||
154 | mpatch ${PNAME}-044-dmsquash-live-root-fixed-typo.patch || die | ||
155 | mpatch ${PNAME}-044-dmsquash-live-root-SQUASHED-can-be-set-earlier.patch || die | ||
156 | |||
157 | # remove gentoo specific modules | ||
158 | rm -rf modules.d/50gensplash || die | ||
159 | # remove rpm-bases specific modules | ||
160 | rm -rf modules.d/10rpmversion || die | ||
161 | # systemd-bootchart works better | ||
162 | rm -rf modules.d/00bootchart || die | ||
163 | # no dash support anymore | ||
164 | rm -rf modules.d/00dash || die | ||
165 | |||
166 | # fix plymouth libexecdir | ||
167 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/plymouth:g" \ | ||
168 | modules.d/50plymouth/module-setup.sh || die | ||
169 | |||
170 | # fix plymouth logo | ||
171 | local plymouth_logo=/usr/share/plymouth/magellan-logo.png | ||
172 | sed -i "s:^\(PLYMOUTH_LOGO_FILE=\).*:\1\"${plymouth_logo}\":" \ | ||
173 | modules.d/50plymouth/plymouth-populate-initrd.sh || die | ||
174 | |||
175 | # fix qemu libexecdir | ||
176 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/qemu:" test/run-qemu || die | ||
177 | } | ||
178 | |||
179 | src_compile() | ||
180 | { | ||
181 | cd ${SRCDIR} | ||
182 | |||
183 | # always usr /usr/lib as dracut modules dir | ||
184 | mconfigure --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib --systemdsystemunitdir=$(mget-systemd-unit-dir) || die | ||
185 | mmake || die | ||
186 | } | ||
187 | |||
188 | alx_generic_src_install() | ||
189 | { | ||
190 | cd ${SRCDIR} | ||
191 | mmake DESTDIR=${BINDIR} install || die | ||
192 | |||
193 | # fix sometimes broken permissions | ||
194 | mchmod 0755 /usr/lib/dracut/modules.d/40network/\*.sh || die | ||
195 | |||
196 | # needed directories | ||
197 | mkeepdir /var/initramfs || die | ||
198 | mkeepdir /var/log || die | ||
199 | memptyfile /var/log/dracut.log || die | ||
200 | |||
201 | # missing compat symlink | ||
202 | mlink dracut /usr/bin/mkinitrd || die | ||
203 | |||
204 | minstalldocs AUTHORS COPYING HACKING NEWS README* TODO || die | ||
205 | |||
206 | # install busybox-rc compatible config and remove upstream systemd one | ||
207 | echo -e ${COLGREEN}" injecting custom dracut-configs"${COLDEFAULT} | ||
208 | if [ -f ${BINDIR}/etc/dracut.conf.d/01-magellan.conf ] | ||
209 | then | ||
210 | mdelete /etc/dracut.conf.d/01-magellan.conf || die | ||
211 | fi | ||
212 | mcinjectfile 01-alx.conf /etc/dracut.conf.d || die | ||
213 | } | ||
214 | |||
215 | preinstall() | ||
216 | { | ||
217 | if [[ ! -z $(magequery -n mkinitrd) ]] | ||
218 | then | ||
219 | echo -e ${COLRED} | ||
220 | echo -e "Error: sys-apps/mkinitrd is installed!!" | ||
221 | echo -e "dracut will overwrite binaries from sys-apps/mkinitrd and fully replace it." | ||
222 | echo -e "Please uninstall sys-apps/mkinitrd first!" | ||
223 | echo -e ${COLDEFAULT} | ||
224 | die "sys-apps/mkinitrd found!" | ||
225 | fi | ||
226 | |||
227 | add_conf_prot_mask /etc/dracut.conf /etc/dracut.conf.d | ||
228 | } |