1 |
aidecoe 12/02/29 18:13:20 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dracut-017.ebuild |
5 |
Log: |
6 |
sys-kernel/dracut: Version bump to 017. Rels bug #406023 and bug #405921. |
7 |
|
8 |
Backported patches: |
9 |
- fixes for usrmount (bug #406023) |
10 |
- workaround for broken dm-setup not detecting /dev/dm-* (bug #405921) |
11 |
- fix for convertfs |
12 |
|
13 |
NEWS |
14 |
~~~~ |
15 |
- a _lot_ faster than dracut-016 in image creation |
16 |
- systemd service dracut-shutdown.service |
17 |
- livenet fixes |
18 |
- ssh-client module install fix |
19 |
- root=iscsi:... fixed |
20 |
- lots of restructuring and optimizing in dracut-functions.sh |
21 |
- usrmount: honor fs_passno in /etc/fstab |
22 |
- renamed all shell scripts to .sh |
23 |
- new option "--omit-drivers" and config option "omit_drivers" |
24 |
- hostonly mode fixups |
25 |
|
26 |
(Portage version: 2.1.10.48/cvs/Linux x86_64) |
27 |
|
28 |
Revision Changes Path |
29 |
1.51 sys-kernel/dracut/ChangeLog |
30 |
|
31 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.51&view=markup |
32 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.51&content-type=text/plain |
33 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?r1=1.50&r2=1.51 |
34 |
|
35 |
Index: ChangeLog |
36 |
=================================================================== |
37 |
RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v |
38 |
retrieving revision 1.50 |
39 |
retrieving revision 1.51 |
40 |
diff -u -r1.50 -r1.51 |
41 |
--- ChangeLog 27 Feb 2012 11:12:54 -0000 1.50 |
42 |
+++ ChangeLog 29 Feb 2012 18:13:20 -0000 1.51 |
43 |
@@ -1,6 +1,34 @@ |
44 |
# ChangeLog for sys-kernel/dracut |
45 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
46 |
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.50 2012/02/27 11:12:54 aidecoe Exp $ |
47 |
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.51 2012/02/29 18:13:20 aidecoe Exp $ |
48 |
+ |
49 |
+*dracut-017 (29 Feb 2012) |
50 |
+ |
51 |
+ 29 Feb 2012; Amadeusz Żołnowski <aidecoe@g.o> +dracut-017.ebuild, |
52 |
+ +files/dracut-017-convertfs-fix-check-for-usr-bin.patch, |
53 |
+ +files/dracut-017-crypt-simplify-rd.luks.uuid-testing.patch, |
54 |
+ +files/dracut-017-multipath-udev-rules.patch, |
55 |
+ +files/dracut-017-usrmount-fstab-comments.patch, |
56 |
+ +files/dracut-017-usrmount-newroot-etc-check.patch: |
57 |
+ Version bump. |
58 |
+ |
59 |
+ Backported patches: |
60 |
+ - fixes for usrmount (bug #406023) |
61 |
+ - workaround for broken dm-setup not detecting /dev/dm-* (bug #405921) |
62 |
+ - fix for convertfs |
63 |
+ |
64 |
+ NEWS |
65 |
+ ~~~~ |
66 |
+ - a _lot_ faster than dracut-016 in image creation |
67 |
+ - systemd service dracut-shutdown.service |
68 |
+ - livenet fixes |
69 |
+ - ssh-client module install fix |
70 |
+ - root=iscsi:... fixed |
71 |
+ - lots of restructuring and optimizing in dracut-functions.sh |
72 |
+ - usrmount: honor fs_passno in /etc/fstab |
73 |
+ - renamed all shell scripts to .sh |
74 |
+ - new option "--omit-drivers" and config option "omit_drivers" |
75 |
+ - hostonly mode fixups |
76 |
|
77 |
27 Feb 2012; Amadeusz Żołnowski <aidecoe@g.o> dracut-010-r3.ebuild, |
78 |
dracut-013-r2.ebuild, dracut-014-r2.ebuild, dracut-016.ebuild: |
79 |
|
80 |
|
81 |
|
82 |
1.1 sys-kernel/dracut/dracut-017.ebuild |
83 |
|
84 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-017.ebuild?rev=1.1&view=markup |
85 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-017.ebuild?rev=1.1&content-type=text/plain |
86 |
|
87 |
Index: dracut-017.ebuild |
88 |
=================================================================== |
89 |
# Copyright 1999-2012 Gentoo Foundation |
90 |
# Distributed under the terms of the GNU General Public License v2 |
91 |
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-017.ebuild,v 1.1 2012/02/29 18:13:20 aidecoe Exp $ |
92 |
|
93 |
EAPI=4 |
94 |
|
95 |
inherit eutils linux-info |
96 |
|
97 |
add_req_use_for() { |
98 |
local dep="$1"; shift |
99 |
local f |
100 |
|
101 |
for f in "$@"; do |
102 |
REQUIRED_USE+="${f}? ( ${dep} ) |
103 |
" |
104 |
done |
105 |
} |
106 |
|
107 |
DESCRIPTION="Generic initramfs generation tool" |
108 |
HOMEPAGE="http://dracut.wiki.kernel.org" |
109 |
SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2" |
110 |
LICENSE="GPL-2" |
111 |
SLOT="0" |
112 |
KEYWORDS="~amd64 ~x86" |
113 |
|
114 |
REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt ) |
115 |
dracut_modules_livenet? ( dracut_modules_dmsquash-live ) |
116 |
" |
117 |
COMMON_MODULES=" |
118 |
dracut_modules_biosdevname |
119 |
dracut_modules_btrfs |
120 |
dracut_modules_caps |
121 |
dracut_modules_crypt-gpg |
122 |
dracut_modules_gensplash |
123 |
dracut_modules_mdraid |
124 |
dracut_modules_multipath |
125 |
dracut_modules_plymouth |
126 |
dracut_modules_syslog |
127 |
" |
128 |
DM_MODULES=" |
129 |
dracut_modules_crypt |
130 |
dracut_modules_dmraid |
131 |
dracut_modules_dmsquash-live |
132 |
dracut_modules_livenet |
133 |
dracut_modules_lvm |
134 |
" |
135 |
NETWORK_MODULES=" |
136 |
dracut_modules_iscsi |
137 |
dracut_modules_livenet |
138 |
dracut_modules_nbd |
139 |
dracut_modules_nfs |
140 |
dracut_modules_ssh-client |
141 |
" |
142 |
add_req_use_for device-mapper ${DM_MODULES} |
143 |
add_req_use_for net ${NETWORK_MODULES} |
144 |
IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}" |
145 |
IUSE="debug device-mapper net selinux ${IUSE_DRACUT_MODULES}" |
146 |
|
147 |
RESTRICT="test" |
148 |
|
149 |
RDEPEND=" |
150 |
>=app-shells/bash-4.0 |
151 |
>=app-shells/dash-0.5.4.11 |
152 |
>=sys-apps/baselayout-1.12.14-r1 |
153 |
>=sys-apps/sysvinit-2.87-r3 |
154 |
>=sys-apps/util-linux-2.20 |
155 |
>=sys-fs/udev-164 |
156 |
app-arch/cpio |
157 |
|| ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] ) |
158 |
|
159 |
debug? ( dev-util/strace ) |
160 |
device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) ) |
161 |
net? ( net-misc/curl >=net-misc/dhcp-4.2.1-r1 sys-apps/iproute2 ) |
162 |
selinux? ( sys-libs/libselinux sys-libs/libsepol ) |
163 |
dracut_modules_biosdevname? ( sys-apps/biosdevname ) |
164 |
dracut_modules_btrfs? ( sys-fs/btrfs-progs ) |
165 |
dracut_modules_caps? ( sys-libs/libcap ) |
166 |
dracut_modules_crypt? ( sys-fs/cryptsetup ) |
167 |
dracut_modules_crypt-gpg? ( app-crypt/gnupg ) |
168 |
dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools ) |
169 |
dracut_modules_gensplash? ( media-gfx/splashutils ) |
170 |
dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 ) |
171 |
dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 ) |
172 |
dracut_modules_mdraid? ( sys-fs/mdadm ) |
173 |
dracut_modules_multipath? ( sys-fs/multipath-tools ) |
174 |
dracut_modules_nbd? ( sys-block/nbd ) |
175 |
dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind ) |
176 |
dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 ) |
177 |
dracut_modules_ssh-client? ( dev-libs/openssl ) |
178 |
dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) ) |
179 |
" |
180 |
DEPEND=" |
181 |
>=dev-libs/libxslt-1.1.26 |
182 |
app-text/docbook-xml-dtd:4.5 |
183 |
>=app-text/docbook-xsl-stylesheets-1.75.2 |
184 |
" |
185 |
|
186 |
# |
187 |
# Helper functions |
188 |
# |
189 |
|
190 |
# Returns true if any of specified modules is enabled by USE flag and false |
191 |
# otherwise. |
192 |
# $1 = list of modules (which have corresponding USE flags of the same name) |
193 |
any_module() { |
194 |
local m modules=" $@ " |
195 |
|
196 |
for m in ${modules}; do |
197 |
! use $m && modules=${modules/ $m / } |
198 |
done |
199 |
|
200 |
shopt -s extglob |
201 |
modules=${modules%%+( )} |
202 |
shopt -u extglob |
203 |
|
204 |
[[ ${modules} ]] |
205 |
} |
206 |
|
207 |
# Removes module from modules.d. |
208 |
# $1 = module name |
209 |
# Module name can be specified without number prefix. |
210 |
rm_module() { |
211 |
local force m |
212 |
[[ $1 = -f ]] && force=-f |
213 |
|
214 |
for m in $@; do |
215 |
if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then |
216 |
rm ${force} --interactive=never -r "${modules_dir}"/$m |
217 |
else |
218 |
rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m |
219 |
fi |
220 |
done |
221 |
} |
222 |
|
223 |
# Displays Gentoo Base System major release number |
224 |
base_sys_maj_ver() { |
225 |
local line |
226 |
|
227 |
read line < /etc/gentoo-release |
228 |
line=${line##* } |
229 |
echo "${line%%.*}" |
230 |
} |
231 |
|
232 |
# |
233 |
# ebuild functions |
234 |
# |
235 |
|
236 |
src_prepare() { |
237 |
epatch "${FILESDIR}/${P}-multipath-udev-rules.patch" |
238 |
epatch "${FILESDIR}/${P}-usrmount-fstab-comments.patch" |
239 |
epatch "${FILESDIR}/${P}-usrmount-newroot-etc-check.patch" |
240 |
epatch "${FILESDIR}/${P}-convertfs-fix-check-for-usr-bin.patch" |
241 |
epatch "${FILESDIR}/${P}-crypt-simplify-rd.luks.uuid-testing.patch" |
242 |
} |
243 |
|
244 |
src_compile() { |
245 |
emake WITH_SWITCH_ROOT=0 |
246 |
} |
247 |
|
248 |
src_install() { |
249 |
emake WITH_SWITCH_ROOT=0 \ |
250 |
prefix=/usr sysconfdir=/etc DESTDIR="${D}" \ |
251 |
install |
252 |
dosym usr/lib/dracut/dracut-functions dracut-functions.sh |
253 |
|
254 |
local gen2conf |
255 |
|
256 |
dodir /var/lib/dracut/overlay |
257 |
dodoc HACKING TODO AUTHORS NEWS README* |
258 |
|
259 |
case "$(base_sys_maj_ver)" in |
260 |
1) gen2conf=gentoo.conf ;; |
261 |
2) gen2conf=gentoo-openrc.conf ;; |
262 |
*) die "Expected ver. 1 or 2 of Gentoo Base System (/etc/gentoo-release)." |
263 |
esac |
264 |
|
265 |
insinto /etc/dracut.conf.d |
266 |
newins dracut.conf.d/${gen2conf}.example ${gen2conf} |
267 |
|
268 |
insinto /etc/logrotate.d |
269 |
newins dracut.logrotate dracut |
270 |
|
271 |
# |
272 |
# Modules |
273 |
# |
274 |
local module |
275 |
modules_dir="${D}/usr/lib/dracut/modules.d" |
276 |
|
277 |
echo "${PF}" > "${modules_dir}"/10rpmversion/dracut-version \ |
278 |
|| die 'dracut-version failed' |
279 |
|
280 |
# Remove modules not enabled by USE flags |
281 |
for module in ${IUSE_DRACUT_MODULES} ; do |
282 |
! use ${module} && rm_module -f ${module#dracut_modules_} |
283 |
done |
284 |
|
285 |
# Those flags are specific, and even are corresponding to modules, they need |
286 |
# to be declared as regular USE flags. |
287 |
use debug || rm_module 95debug |
288 |
use selinux || rm_module 98selinux |
289 |
|
290 |
# Following flags define set of helper modules which are base dependencies |
291 |
# for others and as so have no practical use, so remove these modules. |
292 |
use device-mapper || rm_module 90dm |
293 |
use net || rm_module 40network 45ifcfg 45url-lib |
294 |
|
295 |
# Remove S/390 modules which are not tested at all |
296 |
rm_module 95dasd 95dasd_mod 95zfcp 95znet |
297 |
|
298 |
# Remove modules which won't work for sure |
299 |
rm_module 95fcoe # no tools |
300 |
# fips module depends on masked app-crypt/hmaccalc |
301 |
rm_module 01fips 02fips-aesni |
302 |
|
303 |
# Remove extra modules which go to future dracut-extras |
304 |
rm_module 00bootchart 05busybox 97masterkey 98ecryptfs 98integrity |
305 |
} |
306 |
|
307 |
pkg_postinst() { |
308 |
if linux-info_get_any_version && linux_config_src_exists; then |
309 |
echo |
310 |
ewarn "If the following test report contains a missing kernel" |
311 |
ewarn "configuration option, you should reconfigure and rebuild your" |
312 |
ewarn "kernel before booting image generated with this Dracut version." |
313 |
echo |
314 |
|
315 |
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS ~MODULES" |
316 |
|
317 |
# Kernel configuration options descriptions: |
318 |
local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" |
319 |
local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ |
320 |
"(initramfs/initrd) support" |
321 |
local desc_MODULES="Enable loadable module support" |
322 |
|
323 |
local opt desc |
324 |
|
325 |
# Generate ERROR_* variables for check_extra_config. |
326 |
for opt in ${CONFIG_CHECK}; do |
327 |
opt=${opt#\~} |
328 |
desc=desc_${opt} |
329 |
eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ |
330 |
"is missing and REQUIRED'" |
331 |
done |
332 |
|
333 |
check_extra_config |
334 |
echo |
335 |
fi |
336 |
|
337 |
elog 'To generate the initramfs:' |
338 |
elog ' # mount /boot (if necessary)' |
339 |
elog ' # dracut "" <kernel-version>' |
340 |
elog '' |
341 |
elog 'For command line documentation see dracut.kernel(7).' |
342 |
elog '' |
343 |
elog 'Simple example to select root and resume partition:' |
344 |
elog ' root=/dev/sda1 resume=/dev/sda2' |
345 |
elog '' |
346 |
elog 'To include only dracut modules and kernel drivers for this system,' |
347 |
elog 'use the "-H" option. Some modules need to be explicitly added with' |
348 |
elog '"-a" option even if required tools are installed.' |
349 |
} |