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