1 |
aidecoe 13/12/28 15:48:33 |
2 |
|
3 |
Modified: dracut-034-r2.ebuild ChangeLog |
4 |
Added: dracut-034-r3.ebuild |
5 |
Log: |
6 |
Committing on behalf of Alexander Tsoy <alexander@××××.me>. |
7 |
Fixes bug #494188. |
8 |
|
9 |
LUKS devices couldn't be decrypted with eudev because of missing rules file. |
10 |
|
11 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key F0134531E1DBFAB5) |
12 |
|
13 |
Revision Changes Path |
14 |
1.3 sys-kernel/dracut/dracut-034-r2.ebuild |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-034-r2.ebuild?rev=1.3&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-034-r2.ebuild?rev=1.3&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-034-r2.ebuild?r1=1.2&r2=1.3 |
19 |
|
20 |
Index: dracut-034-r2.ebuild |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-034-r2.ebuild,v |
23 |
retrieving revision 1.2 |
24 |
retrieving revision 1.3 |
25 |
diff -u -r1.2 -r1.3 |
26 |
--- dracut-034-r2.ebuild 14 Dec 2013 17:17:50 -0000 1.2 |
27 |
+++ dracut-034-r2.ebuild 28 Dec 2013 15:48:33 -0000 1.3 |
28 |
@@ -1,6 +1,6 @@ |
29 |
# Copyright 1999-2013 Gentoo Foundation |
30 |
# Distributed under the terms of the GNU General Public License v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-034-r2.ebuild,v 1.2 2013/12/14 17:17:50 aidecoe Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-034-r2.ebuild,v 1.3 2013/12/28 15:48:33 aidecoe Exp $ |
33 |
|
34 |
EAPI=4 |
35 |
|
36 |
@@ -170,6 +170,7 @@ |
37 |
epatch "${FILESDIR}/${PV}-0011-lvm-fix-thin-recognition.patch" |
38 |
epatch "${FILESDIR}/${PV}-0012-lvm-always-install-thin-utils-for-lvm.patch" |
39 |
epatch "${FILESDIR}/${PV}-0013-usrmount-always-install.patch" |
40 |
+ epatch "${FILESDIR}/${PV}-0014-udev-rules-add-eudev-rules.patch" |
41 |
|
42 |
local libdirs |
43 |
|
44 |
|
45 |
|
46 |
|
47 |
1.144 sys-kernel/dracut/ChangeLog |
48 |
|
49 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.144&view=markup |
50 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.144&content-type=text/plain |
51 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?r1=1.143&r2=1.144 |
52 |
|
53 |
Index: ChangeLog |
54 |
=================================================================== |
55 |
RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v |
56 |
retrieving revision 1.143 |
57 |
retrieving revision 1.144 |
58 |
diff -u -r1.143 -r1.144 |
59 |
--- ChangeLog 14 Dec 2013 17:17:50 -0000 1.143 |
60 |
+++ ChangeLog 28 Dec 2013 15:48:33 -0000 1.144 |
61 |
@@ -1,6 +1,15 @@ |
62 |
# ChangeLog for sys-kernel/dracut |
63 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
64 |
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.143 2013/12/14 17:17:50 aidecoe Exp $ |
65 |
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.144 2013/12/28 15:48:33 aidecoe Exp $ |
66 |
+ |
67 |
+*dracut-034-r3 (28 Dec 2013) |
68 |
+ |
69 |
+ 28 Dec 2013; Amadeusz Żołnowski <aidecoe@g.o> dracut-034-r2.ebuild, |
70 |
+ +dracut-034-r3.ebuild, +files/034-0014-udev-rules-add-eudev-rules.patch: |
71 |
+ Committing on behalf of Alexander Tsoy <alexander@××××.me>. |
72 |
+ Fixes bug #494188. |
73 |
+ |
74 |
+ LUKS devices couldn't be decrypted with eudev because of missing rules file. |
75 |
|
76 |
14 Dec 2013; Amadeusz Żołnowski <aidecoe@g.o> dracut-034-r2.ebuild: |
77 |
Added epatch_user call. Rels bug #487410. |
78 |
|
79 |
|
80 |
|
81 |
1.1 sys-kernel/dracut/dracut-034-r3.ebuild |
82 |
|
83 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-034-r3.ebuild?rev=1.1&view=markup |
84 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-034-r3.ebuild?rev=1.1&content-type=text/plain |
85 |
|
86 |
Index: dracut-034-r3.ebuild |
87 |
=================================================================== |
88 |
# Copyright 1999-2013 Gentoo Foundation |
89 |
# Distributed under the terms of the GNU General Public License v2 |
90 |
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-034-r3.ebuild,v 1.1 2013/12/28 15:48:33 aidecoe Exp $ |
91 |
|
92 |
EAPI=4 |
93 |
|
94 |
inherit bash-completion-r1 eutils linux-info multilib systemd |
95 |
|
96 |
add_req_use_for() { |
97 |
local dep="$1"; shift |
98 |
local f |
99 |
|
100 |
for f in "$@"; do |
101 |
REQUIRED_USE+="${f}? ( ${dep} ) |
102 |
" |
103 |
done |
104 |
} |
105 |
|
106 |
DESCRIPTION="Generic initramfs generation tool" |
107 |
HOMEPAGE="http://dracut.wiki.kernel.org" |
108 |
SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2" |
109 |
LICENSE="GPL-2" |
110 |
SLOT="0" |
111 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
112 |
|
113 |
REQUIRED_USE=" |
114 |
dracut_modules_bootchart? ( !dracut_modules_systemd ) |
115 |
dracut_modules_crypt-gpg? ( dracut_modules_crypt ) |
116 |
dracut_modules_crypt-loop? ( dracut_modules_crypt ) |
117 |
dracut_modules_livenet? ( dracut_modules_dmsquash-live ) |
118 |
" |
119 |
COMMON_MODULES=" |
120 |
dracut_modules_biosdevname |
121 |
dracut_modules_bootchart |
122 |
dracut_modules_btrfs |
123 |
dracut_modules_caps |
124 |
dracut_modules_crypt-gpg |
125 |
dracut_modules_crypt-loop |
126 |
dracut_modules_dash |
127 |
dracut_modules_gensplash |
128 |
dracut_modules_mdraid |
129 |
dracut_modules_multipath |
130 |
dracut_modules_plymouth |
131 |
dracut_modules_syslog |
132 |
dracut_modules_systemd |
133 |
" |
134 |
DM_MODULES=" |
135 |
dracut_modules_crypt |
136 |
dracut_modules_dmraid |
137 |
dracut_modules_dmsquash-live |
138 |
dracut_modules_livenet |
139 |
dracut_modules_lvm |
140 |
" |
141 |
NETWORK_MODULES=" |
142 |
dracut_modules_cifs |
143 |
dracut_modules_iscsi |
144 |
dracut_modules_livenet |
145 |
dracut_modules_nbd |
146 |
dracut_modules_nfs |
147 |
dracut_modules_ssh-client |
148 |
" |
149 |
add_req_use_for device-mapper ${DM_MODULES} |
150 |
add_req_use_for net ${NETWORK_MODULES} |
151 |
IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}" |
152 |
IUSE="debug device-mapper net selinux ${IUSE_DRACUT_MODULES}" |
153 |
|
154 |
RESTRICT="test" |
155 |
|
156 |
CDEPEND="virtual/udev |
157 |
dracut_modules_systemd? ( >=sys-apps/systemd-199 ) |
158 |
selinux? ( sec-policy/selinux-dracut ) |
159 |
" |
160 |
RDEPEND="${CDEPEND} |
161 |
app-arch/cpio |
162 |
>=app-shells/bash-4.0 |
163 |
>=sys-apps/baselayout-1.12.14-r1 |
164 |
>sys-apps/kmod-5[tools] |
165 |
|| ( >=sys-apps/sysvinit-2.87-r3 sys-apps/systemd-sysv-utils ) |
166 |
>=sys-apps/util-linux-2.21 |
167 |
virtual/pkgconfig |
168 |
|
169 |
debug? ( dev-util/strace ) |
170 |
device-mapper? ( >=sys-fs/lvm2-2.02.33 ) |
171 |
net? ( net-misc/curl >=net-misc/dhcp-4.2.4_p2-r1[client] sys-apps/iproute2 ) |
172 |
selinux? ( sys-libs/libselinux sys-libs/libsepol ) |
173 |
dracut_modules_biosdevname? ( sys-apps/biosdevname ) |
174 |
dracut_modules_bootchart? ( app-benchmarks/bootchart2 sys-apps/usleep |
175 |
sys-process/acct ) |
176 |
dracut_modules_btrfs? ( sys-fs/btrfs-progs ) |
177 |
dracut_modules_caps? ( sys-libs/libcap ) |
178 |
dracut_modules_cifs? ( net-fs/cifs-utils ) |
179 |
dracut_modules_crypt? ( sys-fs/cryptsetup ) |
180 |
dracut_modules_crypt-gpg? ( app-crypt/gnupg ) |
181 |
dracut_modules_dash? ( >=app-shells/dash-0.5.4.11 ) |
182 |
dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools ) |
183 |
dracut_modules_gensplash? ( media-gfx/splashutils ) |
184 |
dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 ) |
185 |
dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 ) |
186 |
dracut_modules_mdraid? ( >=sys-fs/mdadm-3.2.6-r1 ) |
187 |
dracut_modules_multipath? ( sys-fs/multipath-tools ) |
188 |
dracut_modules_nbd? ( sys-block/nbd ) |
189 |
dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind ) |
190 |
dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 ) |
191 |
dracut_modules_ssh-client? ( dev-libs/openssl ) |
192 |
dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) ) |
193 |
" |
194 |
DEPEND="${CDEPEND} |
195 |
app-text/asciidoc |
196 |
>=dev-libs/libxslt-1.1.26 |
197 |
app-text/docbook-xml-dtd:4.5 |
198 |
>=app-text/docbook-xsl-stylesheets-1.75.2 |
199 |
" |
200 |
|
201 |
DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules |
202 |
README.testsuite TODO ) |
203 |
MY_LIBDIR=/usr/lib |
204 |
|
205 |
# |
206 |
# Helper functions |
207 |
# |
208 |
|
209 |
# Returns true if any of specified modules is enabled by USE flag and false |
210 |
# otherwise. |
211 |
# $1 = list of modules (which have corresponding USE flags of the same name) |
212 |
any_module() { |
213 |
local m modules=" $@ " |
214 |
|
215 |
for m in ${modules}; do |
216 |
! use $m && modules=${modules/ $m / } |
217 |
done |
218 |
|
219 |
shopt -s extglob |
220 |
modules=${modules%%+( )} |
221 |
shopt -u extglob |
222 |
|
223 |
[[ ${modules} ]] |
224 |
} |
225 |
|
226 |
# Removes module from modules.d. |
227 |
# $1 = module name |
228 |
# Module name can be specified without number prefix. |
229 |
rm_module() { |
230 |
local force m |
231 |
[[ $1 = -f ]] && force=-f |
232 |
|
233 |
for m in $@; do |
234 |
if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then |
235 |
rm ${force} --interactive=never -r "${modules_dir}"/$m |
236 |
else |
237 |
rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m |
238 |
fi |
239 |
done |
240 |
} |
241 |
|
242 |
# |
243 |
# ebuild functions |
244 |
# |
245 |
|
246 |
src_prepare() { |
247 |
epatch "${FILESDIR}/${PV}-0001-dracut.sh-do-not-bail-out-if-kernel-mo.patch" |
248 |
epatch "${FILESDIR}/${PV}-0002-dracut-functions.sh-support-for-altern.patch" |
249 |
epatch "${FILESDIR}/${PV}-0003-gentoo.conf-let-udevdir-be-handled-by-.patch" |
250 |
epatch "${FILESDIR}/${PV}-0004-Use-the-same-paths-in-dracut.sh-as-tho.patch" |
251 |
epatch "${FILESDIR}/${PV}-0005-Install-dracut-install-into-libexec-di.patch" |
252 |
epatch "${FILESDIR}/${PV}-0006-resume-fix-swap-detection-in-hostonly.patch" |
253 |
epatch "${FILESDIR}/${PV}-0007-dracut.sh-also-mkdir-run-lock-which-is.patch" |
254 |
epatch "${FILESDIR}/${PV}-0008-dracut.sh-no-need-to-make-subdirs-in-r.patch" |
255 |
epatch "${FILESDIR}/${PV}-0009-lvm-install-thin-utils-for-non-hostonl.patch" |
256 |
epatch "${FILESDIR}/${PV}-0010-module-setup.sh-add-comments-for-dracu.patch" |
257 |
epatch "${FILESDIR}/${PV}-0011-lvm-fix-thin-recognition.patch" |
258 |
epatch "${FILESDIR}/${PV}-0012-lvm-always-install-thin-utils-for-lvm.patch" |
259 |
epatch "${FILESDIR}/${PV}-0013-usrmount-always-install.patch" |
260 |
epatch "${FILESDIR}/${PV}-0014-udev-rules-add-eudev-rules.patch" |
261 |
|
262 |
local libdirs |
263 |
|
264 |
#local ldir |
265 |
#for ldir in $(get_all_libdirs); do |
266 |
# libdirs+=" /$ldir /usr/$ldir" |
267 |
#done |
268 |
#libdirs="${libdirs# }" |
269 |
|
270 |
libdirs="/$(get_libdir) /usr/$(get_libdir)" |
271 |
[[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" |
272 |
einfo "Setting libdirs to \"${libdirs}\" ..." |
273 |
sed -e "3alibdirs=\"${libdirs}\"" \ |
274 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
275 |
|
276 |
if use dracut_modules_systemd; then |
277 |
local systemdutildir="$(systemd_get_utildir)" |
278 |
local systemdsystemunitdir="$(systemd_get_unitdir)" |
279 |
einfo "Setting systemdutildir to ${systemdutildir} and ..." |
280 |
sed -e "5asystemdutildir=\"${systemdutildir}\"" \ |
281 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
282 |
einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir}..." |
283 |
sed -e "6asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \ |
284 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
285 |
fi |
286 |
|
287 |
epatch_user |
288 |
} |
289 |
|
290 |
src_configure() { |
291 |
local myconf="--libdir=${MY_LIBDIR}" |
292 |
myconf+=" --bashcompletiondir=$(get_bashcompdir)" |
293 |
|
294 |
if use dracut_modules_systemd; then |
295 |
myconf+=" --systemdsystemunitdir='$(systemd_get_unitdir)'" |
296 |
fi |
297 |
|
298 |
econf ${myconf} |
299 |
} |
300 |
|
301 |
src_compile() { |
302 |
tc-export CC |
303 |
emake doc install/dracut-install |
304 |
} |
305 |
|
306 |
src_install() { |
307 |
default |
308 |
|
309 |
local my_libdir="${MY_LIBDIR}" |
310 |
local dracutlibdir="${my_libdir#/}/dracut" |
311 |
|
312 |
echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh" |
313 |
|
314 |
insinto "${dracutlibdir}/dracut.conf.d/" |
315 |
newins dracut.conf.d/gentoo.conf.example gentoo.conf |
316 |
|
317 |
insinto /etc/logrotate.d |
318 |
newins dracut.logrotate dracut |
319 |
|
320 |
dodir /var/lib/dracut/overlay |
321 |
|
322 |
dohtml dracut.html |
323 |
|
324 |
# |
325 |
# Modules |
326 |
# |
327 |
local module |
328 |
modules_dir="${D%/}/${dracutlibdir}/modules.d" |
329 |
|
330 |
# Remove modules not enabled by USE flags |
331 |
for module in ${IUSE_DRACUT_MODULES} ; do |
332 |
! use ${module} && rm_module -f ${module#dracut_modules_} |
333 |
done |
334 |
|
335 |
# Those flags are specific, and even are corresponding to modules, they need |
336 |
# to be declared as regular USE flags. |
337 |
use debug || rm_module 95debug |
338 |
use selinux || rm_module 98selinux |
339 |
|
340 |
# Following flags define set of helper modules which are base dependencies |
341 |
# for others and as so have no practical use, so remove these modules. |
342 |
use device-mapper || rm_module 90dm |
343 |
use net || rm_module 40network 45ifcfg 45url-lib |
344 |
|
345 |
if use dracut_modules_systemd; then |
346 |
# With systemd following modules do not make sense |
347 |
rm_module 96securityfs 98selinux |
348 |
else |
349 |
# Without systemd following modules do not make sense |
350 |
rm_module 00systemd-bootchart |
351 |
fi |
352 |
|
353 |
# Remove S/390 modules which are not tested at all |
354 |
rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet |
355 |
|
356 |
# Remove modules which won't work for sure |
357 |
rm_module 95fcoe # no tools |
358 |
# fips module depends on masked app-crypt/hmaccalc |
359 |
rm_module 01fips 02fips-aesni |
360 |
|
361 |
# Remove extra modules which go to future dracut-extras |
362 |
rm_module 05busybox 97masterkey 98ecryptfs 98integrity |
363 |
} |
364 |
|
365 |
pkg_postinst() { |
366 |
if linux-info_get_any_version && linux_config_src_exists; then |
367 |
ewarn "" |
368 |
ewarn "If the following test report contains a missing kernel" |
369 |
ewarn "configuration option, you should reconfigure and rebuild your" |
370 |
ewarn "kernel before booting image generated with this Dracut version." |
371 |
ewarn "" |
372 |
|
373 |
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS" |
374 |
|
375 |
# Kernel configuration options descriptions: |
376 |
local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" |
377 |
local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ |
378 |
"(initramfs/initrd) support" |
379 |
|
380 |
local opt desc |
381 |
|
382 |
# Generate ERROR_* variables for check_extra_config. |
383 |
for opt in ${CONFIG_CHECK}; do |
384 |
opt=${opt#\~} |
385 |
desc=desc_${opt} |
386 |
eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ |
387 |
"is missing and REQUIRED'" |
388 |
done |
389 |
|
390 |
check_extra_config |
391 |
echo |
392 |
else |
393 |
ewarn "" |
394 |
ewarn "Your kernel configuration couldn't be checked. Do you have" |
395 |
ewarn "/usr/src/linux/.config file there? Please check manually if" |
396 |
ewarn "following options are enabled:" |
397 |
ewarn "" |
398 |
ewarn " CONFIG_BLK_DEV_INITRD" |
399 |
ewarn " CONFIG_DEVTMPFS" |
400 |
ewarn "" |
401 |
fi |
402 |
|
403 |
if use dracut_modules_crypt || use dracut_modules_dmraid || use \ |
404 |
dracut_modules_mdraid || use dracut_modules_lvm; then |
405 |
|
406 |
if ! [[ $(</proc/cmdline) =~ rd.auto[\ =] ]]; then |
407 |
ewarn "Autoassembly of special devices like cryptoLUKS, dmraid, " |
408 |
ewarn "mdraid or lvm is off for default as of >=dracut-024." |
409 |
ewarn "Use rd.auto option to turn it on." |
410 |
fi |
411 |
fi |
412 |
} |