1 |
aidecoe 12/07/31 09:24:39 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dracut-019-r3.ebuild dracut-022-r2.ebuild |
5 |
Removed: dracut-019-r2.ebuild dracut-022-r1.ebuild |
6 |
Log: |
7 |
Fixed bug #388199 in 019 and 022. 018 is ignored because it is going to be |
8 |
removed soon. I have changed patches naming scheme in 019 as I did in 022. |
9 |
|
10 |
(Portage version: 2.1.11.9/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.76 sys-kernel/dracut/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.76&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.76&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?r1=1.75&r2=1.76 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v |
22 |
retrieving revision 1.75 |
23 |
retrieving revision 1.76 |
24 |
diff -u -r1.75 -r1.76 |
25 |
--- ChangeLog 30 Jul 2012 21:25:38 -0000 1.75 |
26 |
+++ ChangeLog 31 Jul 2012 09:24:38 -0000 1.76 |
27 |
@@ -1,6 +1,21 @@ |
28 |
# ChangeLog for sys-kernel/dracut |
29 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.75 2012/07/30 21:25:38 aidecoe Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.76 2012/07/31 09:24:38 aidecoe Exp $ |
32 |
+ |
33 |
+*dracut-022-r2 (31 Jul 2012) |
34 |
+*dracut-019-r3 (31 Jul 2012) |
35 |
+ |
36 |
+ 31 Jul 2012; Amadeusz Żołnowski <aidecoe@g.o> |
37 |
+ +files/019-0001-multipath-udev-rules.patch, |
38 |
+ +files/019-0002-no-pkg-config-warnings.patch, |
39 |
+ +files/019-0017-99shutdown-remove-no-wall-argument-for.patch, |
40 |
+ +files/022-0017-99shutdown-remove-no-wall-argument-for.patch, |
41 |
+ -dracut-019-r2.ebuild, +dracut-019-r3.ebuild, |
42 |
+ -files/dracut-019-multipath-udev-rules.patch, |
43 |
+ -files/dracut-019-no-pkg-config-warnings.patch, -dracut-022-r1.ebuild, |
44 |
+ +dracut-022-r2.ebuild: |
45 |
+ Fixed bug #388199 in 019 and 022. 018 is ignored because it is going to be |
46 |
+ removed soon. I have changed patches naming scheme in 019 as I did in 022. |
47 |
|
48 |
30 Jul 2012; Amadeusz Żołnowski <aidecoe@g.o> -dracut-022.ebuild: |
49 |
Remove old 022 revision. |
50 |
|
51 |
|
52 |
|
53 |
1.1 sys-kernel/dracut/dracut-019-r3.ebuild |
54 |
|
55 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-019-r3.ebuild?rev=1.1&view=markup |
56 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-019-r3.ebuild?rev=1.1&content-type=text/plain |
57 |
|
58 |
Index: dracut-019-r3.ebuild |
59 |
=================================================================== |
60 |
# Copyright 1999-2012 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-019-r3.ebuild,v 1.1 2012/07/31 09:24:38 aidecoe Exp $ |
63 |
|
64 |
EAPI=4 |
65 |
|
66 |
inherit eutils linux-info |
67 |
|
68 |
add_req_use_for() { |
69 |
local dep="$1"; shift |
70 |
local f |
71 |
|
72 |
for f in "$@"; do |
73 |
REQUIRED_USE+="${f}? ( ${dep} ) |
74 |
" |
75 |
done |
76 |
} |
77 |
|
78 |
DESCRIPTION="Generic initramfs generation tool" |
79 |
HOMEPAGE="http://dracut.wiki.kernel.org" |
80 |
SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2" |
81 |
LICENSE="GPL-2" |
82 |
SLOT="0" |
83 |
KEYWORDS="~amd64 ~x86" |
84 |
|
85 |
REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt ) |
86 |
dracut_modules_livenet? ( dracut_modules_dmsquash-live ) |
87 |
" |
88 |
COMMON_MODULES=" |
89 |
dracut_modules_biosdevname |
90 |
dracut_modules_bootchart |
91 |
dracut_modules_btrfs |
92 |
dracut_modules_caps |
93 |
dracut_modules_crypt-gpg |
94 |
dracut_modules_gensplash |
95 |
dracut_modules_mdraid |
96 |
dracut_modules_multipath |
97 |
dracut_modules_plymouth |
98 |
dracut_modules_syslog |
99 |
" |
100 |
DM_MODULES=" |
101 |
dracut_modules_crypt |
102 |
dracut_modules_dmraid |
103 |
dracut_modules_dmsquash-live |
104 |
dracut_modules_livenet |
105 |
dracut_modules_lvm |
106 |
" |
107 |
NETWORK_MODULES=" |
108 |
dracut_modules_iscsi |
109 |
dracut_modules_livenet |
110 |
dracut_modules_nbd |
111 |
dracut_modules_nfs |
112 |
dracut_modules_ssh-client |
113 |
" |
114 |
add_req_use_for device-mapper ${DM_MODULES} |
115 |
add_req_use_for net ${NETWORK_MODULES} |
116 |
IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}" |
117 |
IUSE="debug device-mapper net selinux ${IUSE_DRACUT_MODULES}" |
118 |
|
119 |
RESTRICT="test" |
120 |
|
121 |
RDEPEND=" |
122 |
app-arch/cpio |
123 |
>=app-shells/bash-4.0 |
124 |
>=app-shells/dash-0.5.4.11 |
125 |
>=sys-apps/baselayout-1.12.14-r1 |
126 |
|| ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] ) |
127 |
>=sys-apps/sysvinit-2.87-r3 |
128 |
>=sys-apps/util-linux-2.20 |
129 |
>=sys-fs/udev-166 |
130 |
|
131 |
debug? ( dev-util/strace ) |
132 |
device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) ) |
133 |
net? ( net-misc/curl >=net-misc/dhcp-4.2.1-r1 sys-apps/iproute2 ) |
134 |
selinux? ( sys-libs/libselinux sys-libs/libsepol ) |
135 |
dracut_modules_biosdevname? ( sys-apps/biosdevname ) |
136 |
dracut_modules_bootchart? ( app-benchmarks/bootchart2 ) |
137 |
dracut_modules_btrfs? ( sys-fs/btrfs-progs ) |
138 |
dracut_modules_caps? ( sys-libs/libcap ) |
139 |
dracut_modules_crypt? ( sys-fs/cryptsetup ) |
140 |
dracut_modules_crypt-gpg? ( app-crypt/gnupg ) |
141 |
dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools ) |
142 |
dracut_modules_gensplash? ( media-gfx/splashutils ) |
143 |
dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 ) |
144 |
dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 ) |
145 |
dracut_modules_mdraid? ( sys-fs/mdadm ) |
146 |
dracut_modules_multipath? ( sys-fs/multipath-tools ) |
147 |
dracut_modules_nbd? ( sys-block/nbd ) |
148 |
dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind ) |
149 |
dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 ) |
150 |
dracut_modules_ssh-client? ( dev-libs/openssl ) |
151 |
dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) ) |
152 |
" |
153 |
DEPEND="" |
154 |
|
155 |
# |
156 |
# Helper functions |
157 |
# |
158 |
|
159 |
# Returns true if any of specified modules is enabled by USE flag and false |
160 |
# otherwise. |
161 |
# $1 = list of modules (which have corresponding USE flags of the same name) |
162 |
any_module() { |
163 |
local m modules=" $@ " |
164 |
|
165 |
for m in ${modules}; do |
166 |
! use $m && modules=${modules/ $m / } |
167 |
done |
168 |
|
169 |
shopt -s extglob |
170 |
modules=${modules%%+( )} |
171 |
shopt -u extglob |
172 |
|
173 |
[[ ${modules} ]] |
174 |
} |
175 |
|
176 |
# Removes module from modules.d. |
177 |
# $1 = module name |
178 |
# Module name can be specified without number prefix. |
179 |
rm_module() { |
180 |
local force m |
181 |
[[ $1 = -f ]] && force=-f |
182 |
|
183 |
for m in $@; do |
184 |
if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then |
185 |
rm ${force} --interactive=never -r "${modules_dir}"/$m |
186 |
else |
187 |
rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m |
188 |
fi |
189 |
done |
190 |
} |
191 |
|
192 |
# Displays Gentoo Base System major release number |
193 |
base_sys_maj_ver() { |
194 |
local line |
195 |
|
196 |
read line < /etc/gentoo-release |
197 |
line=${line##* } |
198 |
echo "${line%%.*}" |
199 |
} |
200 |
|
201 |
# |
202 |
# ebuild functions |
203 |
# |
204 |
|
205 |
src_prepare() { |
206 |
epatch "${FILESDIR}/${PV}-0001-multipath-udev-rules.patch" |
207 |
epatch "${FILESDIR}/${PV}-0002-no-pkg-config-warnings.patch" |
208 |
epatch "${FILESDIR}/${PV}-0017-99shutdown-remove-no-wall-argument-for.patch" |
209 |
} |
210 |
|
211 |
src_compile() { |
212 |
return |
213 |
} |
214 |
|
215 |
src_install() { |
216 |
emake prefix=/usr libdir="/usr/$(get_libdir)" sysconfdir=/etc \ |
217 |
DESTDIR="${D}" install |
218 |
|
219 |
local gen2conf |
220 |
|
221 |
dodir /var/lib/dracut/overlay |
222 |
dodoc HACKING TODO AUTHORS NEWS README* |
223 |
|
224 |
case "$(base_sys_maj_ver)" in |
225 |
1) gen2conf=gentoo.conf ;; |
226 |
2) gen2conf=gentoo-openrc.conf ;; |
227 |
*) die "Expected ver. 1 or 2 of Gentoo Base System (/etc/gentoo-release)." |
228 |
esac |
229 |
|
230 |
insinto /etc/dracut.conf.d |
231 |
newins dracut.conf.d/${gen2conf}.example ${gen2conf} |
232 |
|
233 |
insinto /etc/logrotate.d |
234 |
newins dracut.logrotate dracut |
235 |
|
236 |
dohtml dracut.html |
237 |
|
238 |
# |
239 |
# Modules |
240 |
# |
241 |
local module |
242 |
modules_dir="${D}/usr/$(get_libdir)/dracut/modules.d" |
243 |
|
244 |
# Remove modules not enabled by USE flags |
245 |
for module in ${IUSE_DRACUT_MODULES} ; do |
246 |
! use ${module} && rm_module -f ${module#dracut_modules_} |
247 |
done |
248 |
|
249 |
# Those flags are specific, and even are corresponding to modules, they need |
250 |
# to be declared as regular USE flags. |
251 |
use debug || rm_module 95debug |
252 |
use selinux || rm_module 98selinux |
253 |
|
254 |
# Following flags define set of helper modules which are base dependencies |
255 |
# for others and as so have no practical use, so remove these modules. |
256 |
use device-mapper || rm_module 90dm |
257 |
use net || rm_module 40network 45ifcfg 45url-lib |
258 |
|
259 |
# Remove S/390 modules which are not tested at all |
260 |
rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet |
261 |
|
262 |
# Remove modules which won't work for sure |
263 |
rm_module 95fcoe # no tools |
264 |
# fips module depends on masked app-crypt/hmaccalc |
265 |
rm_module 01fips 02fips-aesni |
266 |
|
267 |
# Remove extra modules which go to future dracut-extras |
268 |
rm_module 05busybox 97masterkey 98ecryptfs 98integrity 98systemd |
269 |
} |
270 |
|
271 |
pkg_postinst() { |
272 |
if linux-info_get_any_version && linux_config_src_exists; then |
273 |
echo |
274 |
ewarn "If the following test report contains a missing kernel" |
275 |
ewarn "configuration option, you should reconfigure and rebuild your" |
276 |
ewarn "kernel before booting image generated with this Dracut version." |
277 |
echo |
278 |
|
279 |
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS ~MODULES" |
280 |
|
281 |
# Kernel configuration options descriptions: |
282 |
local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" |
283 |
local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ |
284 |
"(initramfs/initrd) support" |
285 |
local desc_MODULES="Enable loadable module support" |
286 |
|
287 |
local opt desc |
288 |
|
289 |
# Generate ERROR_* variables for check_extra_config. |
290 |
for opt in ${CONFIG_CHECK}; do |
291 |
opt=${opt#\~} |
292 |
desc=desc_${opt} |
293 |
eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ |
294 |
"is missing and REQUIRED'" |
295 |
done |
296 |
|
297 |
check_extra_config |
298 |
echo |
299 |
else |
300 |
echo |
301 |
ewarn "Your kernel configuration couldn't be checked. Do you have" |
302 |
ewarn "/usr/src/linux/.config file there? Please check manually if" |
303 |
ewarn "following options are enabled:" |
304 |
ewarn "" |
305 |
ewarn " CONFIG_BLK_DEV_INITRD" |
306 |
ewarn " CONFIG_DEVTMPFS" |
307 |
ewarn " CONFIG_MODULES" |
308 |
echo |
309 |
fi |
310 |
} |
311 |
|
312 |
|
313 |
|
314 |
1.1 sys-kernel/dracut/dracut-022-r2.ebuild |
315 |
|
316 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-022-r2.ebuild?rev=1.1&view=markup |
317 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-022-r2.ebuild?rev=1.1&content-type=text/plain |
318 |
|
319 |
Index: dracut-022-r2.ebuild |
320 |
=================================================================== |
321 |
# Copyright 1999-2012 Gentoo Foundation |
322 |
# Distributed under the terms of the GNU General Public License v2 |
323 |
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-022-r2.ebuild,v 1.1 2012/07/31 09:24:38 aidecoe Exp $ |
324 |
|
325 |
EAPI=4 |
326 |
|
327 |
inherit eutils linux-info toolchain-funcs |
328 |
|
329 |
add_req_use_for() { |
330 |
local dep="$1"; shift |
331 |
local f |
332 |
|
333 |
for f in "$@"; do |
334 |
REQUIRED_USE+="${f}? ( ${dep} ) |
335 |
" |
336 |
done |
337 |
} |
338 |
|
339 |
DESCRIPTION="Generic initramfs generation tool" |
340 |
HOMEPAGE="http://dracut.wiki.kernel.org" |
341 |
SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2" |
342 |
LICENSE="GPL-2" |
343 |
SLOT="0" |
344 |
KEYWORDS="~amd64 ~x86" |
345 |
|
346 |
REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt ) |
347 |
dracut_modules_livenet? ( dracut_modules_dmsquash-live ) |
348 |
" |
349 |
COMMON_MODULES=" |
350 |
dracut_modules_biosdevname |
351 |
dracut_modules_bootchart |
352 |
dracut_modules_btrfs |
353 |
dracut_modules_caps |
354 |
dracut_modules_crypt-gpg |
355 |
dracut_modules_gensplash |
356 |
dracut_modules_mdraid |
357 |
dracut_modules_multipath |
358 |
dracut_modules_plymouth |
359 |
dracut_modules_syslog |
360 |
" |
361 |
DM_MODULES=" |
362 |
dracut_modules_crypt |
363 |
dracut_modules_dmraid |
364 |
dracut_modules_dmsquash-live |
365 |
dracut_modules_livenet |
366 |
dracut_modules_lvm |
367 |
" |
368 |
NETWORK_MODULES=" |
369 |
dracut_modules_iscsi |
370 |
dracut_modules_livenet |
371 |
dracut_modules_nbd |
372 |
dracut_modules_nfs |
373 |
dracut_modules_ssh-client |
374 |
" |
375 |
add_req_use_for device-mapper ${DM_MODULES} |
376 |
add_req_use_for net ${NETWORK_MODULES} |
377 |
IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}" |
378 |
IUSE="debug device-mapper optimization net selinux ${IUSE_DRACUT_MODULES}" |
379 |
|
380 |
RESTRICT="test" |
381 |
|
382 |
RDEPEND=" |
383 |
app-arch/cpio |
384 |
>=app-shells/bash-4.0 |
385 |
>=app-shells/dash-0.5.4.11 |
386 |
>=sys-apps/baselayout-1.12.14-r1 |
387 |
|| ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] ) |
388 |
>=sys-apps/sysvinit-2.87-r3 |
389 |
>=sys-apps/util-linux-2.20 |
390 |
>=sys-fs/udev-166 |
391 |
|
392 |
debug? ( dev-util/strace ) |
393 |
device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) ) |
394 |
net? ( net-misc/curl >=net-misc/dhcp-4.2.1-r1 sys-apps/iproute2 ) |
395 |
selinux? ( sys-libs/libselinux sys-libs/libsepol ) |
396 |
dracut_modules_biosdevname? ( sys-apps/biosdevname ) |
397 |
dracut_modules_bootchart? ( app-benchmarks/bootchart2 ) |
398 |
dracut_modules_btrfs? ( sys-fs/btrfs-progs ) |
399 |
dracut_modules_caps? ( sys-libs/libcap ) |
400 |
dracut_modules_crypt? ( sys-fs/cryptsetup ) |
401 |
dracut_modules_crypt-gpg? ( app-crypt/gnupg ) |
402 |
dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools ) |
403 |
dracut_modules_gensplash? ( media-gfx/splashutils ) |
404 |
dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 ) |
405 |
dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 ) |
406 |
dracut_modules_mdraid? ( sys-fs/mdadm ) |
407 |
dracut_modules_multipath? ( sys-fs/multipath-tools ) |
408 |
dracut_modules_nbd? ( sys-block/nbd ) |
409 |
dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind ) |
410 |
dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 ) |
411 |
dracut_modules_ssh-client? ( dev-libs/openssl ) |
412 |
dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) ) |
413 |
" |
414 |
DEPEND=" |
415 |
app-text/asciidoc |
416 |
>=dev-libs/libxslt-1.1.26 |
417 |
app-text/docbook-xml-dtd:4.5 |
418 |
>=app-text/docbook-xsl-stylesheets-1.75.2 |
419 |
" |
420 |
|
421 |
# |
422 |
# Helper functions |
423 |
# |
424 |
|
425 |
# Returns true if any of specified modules is enabled by USE flag and false |
426 |
# otherwise. |
427 |
# $1 = list of modules (which have corresponding USE flags of the same name) |
428 |
any_module() { |
429 |
local m modules=" $@ " |
430 |
|
431 |
for m in ${modules}; do |
432 |
! use $m && modules=${modules/ $m / } |
433 |
done |
434 |
|
435 |
shopt -s extglob |
436 |
modules=${modules%%+( )} |
437 |
shopt -u extglob |
438 |
|
439 |
[[ ${modules} ]] |
440 |
} |
441 |
|
442 |
# Removes module from modules.d. |
443 |
# $1 = module name |
444 |
# Module name can be specified without number prefix. |
445 |
rm_module() { |
446 |
local force m |
447 |
[[ $1 = -f ]] && force=-f |
448 |
|
449 |
for m in $@; do |
450 |
if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then |
451 |
rm ${force} --interactive=never -r "${modules_dir}"/$m |
452 |
else |
453 |
rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m |
454 |
fi |
455 |
done |
456 |
} |
457 |
|
458 |
# |
459 |
# ebuild functions |
460 |
# |
461 |
|
462 |
src_prepare() { |
463 |
epatch "${FILESDIR}/${PV}-0001-qemu-module-setup.sh-provide-alternati.patch" |
464 |
epatch "${FILESDIR}/${PV}-0002-Makefile-use-implicit-rules-for-instal.patch" |
465 |
epatch "${FILESDIR}/${PV}-0003-kernel-modules-module-setup.sh-just-op.patch" |
466 |
epatch "${FILESDIR}/${PV}-0004-90multipath-added-kpartx.rules-multipa.patch" |
467 |
epatch "${FILESDIR}/${PV}-0005-gentoo.conf-set-udevdir.patch" |
468 |
epatch "${FILESDIR}/${PV}-0006-Config-file-for-systemd-on-Gentoo.patch" |
469 |
epatch "${FILESDIR}/${PV}-0007-Remove-obsolete-gentoo-conf-file.patch" |
470 |
epatch "${FILESDIR}/${PV}-0008-95rootfs-block-fix-left-fsck-rel.-chec.patch" |
471 |
epatch "${FILESDIR}/${PV}-0009-98usrmount-use-rw-and-ro-options-inste.patch" |
472 |
epatch "${FILESDIR}/${PV}-0010-98usrmount-print-mount-options.patch" |
473 |
epatch "${FILESDIR}/${PV}-0011-dracut-lib-new-functions-listlist-and-.patch" |
474 |
epatch "${FILESDIR}/${PV}-0012-apply-ro-and-rw-options-from-cmdline-t.patch" |
475 |
epatch "${FILESDIR}/${PV}-0013-ro_mnt-option-at-build-time-to-force-r.patch" |
476 |
epatch "${FILESDIR}/${PV}-0014-parse-root-opts-first-check-for-ro-lat.patch" |
477 |
epatch "${FILESDIR}/${PV}-0015-gentoo.conf-enable-ro_mnt.patch" |
478 |
epatch "${FILESDIR}/${PV}-0016-dracut.sh-test-if-we-can-lazy-resolve-.patch" |
479 |
epatch "${FILESDIR}/${PV}-0017-99shutdown-remove-no-wall-argument-for.patch" |
480 |
einfo "Removing ${S}/install/hashmap.o ..." |
481 |
rm "${S}/install/hashmap.o" || die |
482 |
} |
483 |
|
484 |
src_compile() { |
485 |
if use optimization; then |
486 |
ewarn "Enabling experimental optimization!" |
487 |
tc-export CC |
488 |
emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" doc \ |
489 |
install/dracut-install |
490 |
fi |
491 |
} |
492 |
|
493 |
src_install() { |
494 |
emake prefix=/usr libdir="/usr/$(get_libdir)" sysconfdir=/etc \ |
495 |
DESTDIR="${D}" install |
496 |
|
497 |
dodir /var/lib/dracut/overlay |
498 |
dodoc HACKING TODO AUTHORS NEWS README* |
499 |
|
500 |
insinto /etc/dracut.conf.d |
501 |
newins dracut.conf.d/gentoo.conf.example gentoo.conf |
502 |
|
503 |
insinto /etc/logrotate.d |
504 |
newins dracut.logrotate dracut |
505 |
|
506 |
dohtml dracut.html |
507 |
|
508 |
# |
509 |
# Modules |
510 |
# |
511 |
local module |
512 |
modules_dir="${D}/usr/$(get_libdir)/dracut/modules.d" |
513 |
|
514 |
# Remove modules not enabled by USE flags |
515 |
for module in ${IUSE_DRACUT_MODULES} ; do |
516 |
! use ${module} && rm_module -f ${module#dracut_modules_} |
517 |
done |
518 |
|
519 |
# Those flags are specific, and even are corresponding to modules, they need |
520 |
# to be declared as regular USE flags. |
521 |
use debug || rm_module 95debug |
522 |
use selinux || rm_module 98selinux |
523 |
|
524 |
# Following flags define set of helper modules which are base dependencies |
525 |
# for others and as so have no practical use, so remove these modules. |
526 |
use device-mapper || rm_module 90dm |
527 |
use net || rm_module 40network 45ifcfg 45url-lib |
528 |
|
529 |
# Remove S/390 modules which are not tested at all |
530 |
rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet |
531 |
|
532 |
# Remove modules which won't work for sure |
533 |
rm_module 95fcoe # no tools |
534 |
# fips module depends on masked app-crypt/hmaccalc |
535 |
rm_module 01fips 02fips-aesni |
536 |
|
537 |
# Remove extra modules which go to future dracut-extras |
538 |
rm_module 05busybox 97masterkey 98ecryptfs 98integrity 98systemd |
539 |
} |
540 |
|
541 |
pkg_postinst() { |
542 |
if linux-info_get_any_version && linux_config_src_exists; then |
543 |
ewarn "" |
544 |
ewarn "If the following test report contains a missing kernel" |
545 |
ewarn "configuration option, you should reconfigure and rebuild your" |
546 |
ewarn "kernel before booting image generated with this Dracut version." |
547 |
ewarn "" |
548 |
|
549 |
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS ~MODULES" |
550 |
|
551 |
# Kernel configuration options descriptions: |
552 |
local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" |
553 |
local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ |
554 |
"(initramfs/initrd) support" |
555 |
local desc_MODULES="Enable loadable module support" |
556 |
|
557 |
local opt desc |
558 |
|
559 |
# Generate ERROR_* variables for check_extra_config. |
560 |
for opt in ${CONFIG_CHECK}; do |
561 |
opt=${opt#\~} |
562 |
desc=desc_${opt} |
563 |
eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ |
564 |
"is missing and REQUIRED'" |
565 |
done |
566 |
|
567 |
check_extra_config |
568 |
echo |
569 |
else |
570 |
ewarn "" |
571 |
ewarn "Your kernel configuration couldn't be checked. Do you have" |
572 |
ewarn "/usr/src/linux/.config file there? Please check manually if" |
573 |
ewarn "following options are enabled:" |
574 |
ewarn "" |
575 |
ewarn " CONFIG_BLK_DEV_INITRD" |
576 |
ewarn " CONFIG_DEVTMPFS" |
577 |
ewarn " CONFIG_MODULES" |
578 |
ewarn "" |
579 |
fi |
580 |
|
581 |
if has_version virtual/pkgconfig; then |
582 |
elog "" |
583 |
elog "virtual/pkgconfig is no longer needed by dracut." |
584 |
elog "" |
585 |
fi |
586 |
} |