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