Gentoo Archives: gentoo-commits

From: "Amadeusz Zolnowski (aidecoe)" <aidecoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-kernel/dracut: ChangeLog dracut-022-r1.ebuild
Date: Mon, 30 Jul 2012 20:26:57
Message-Id: 20120730202632.17DD32004B@flycatcher.gentoo.org
1 aidecoe 12/07/30 20:26:32
2
3 Modified: ChangeLog
4 Added: dracut-022-r1.ebuild
5 Log:
6 Rev-bump. Fixes bug #428232.
7
8 (Portage version: 2.1.11.9/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.74 sys-kernel/dracut/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.74&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.74&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?r1=1.73&r2=1.74
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v
20 retrieving revision 1.73
21 retrieving revision 1.74
22 diff -u -r1.73 -r1.74
23 --- ChangeLog 27 Jul 2012 20:06:32 -0000 1.73
24 +++ ChangeLog 30 Jul 2012 20:26:31 -0000 1.74
25 @@ -1,6 +1,13 @@
26 # ChangeLog for sys-kernel/dracut
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.73 2012/07/27 20:06:32 aidecoe Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.74 2012/07/30 20:26:31 aidecoe Exp $
30 +
31 +*dracut-022-r1 (30 Jul 2012)
32 +
33 + 30 Jul 2012; Amadeusz Żołnowski <aidecoe@g.o>
34 + +files/022-0016-dracut.sh-test-if-we-can-lazy-resolve-.patch,
35 + +dracut-022-r1.ebuild:
36 + Rev-bump. Fixes bug #428232.
37
38 27 Jul 2012; Amadeusz Żołnowski <aidecoe@g.o> dracut-014-r3.ebuild,
39 dracut-018-r2.ebuild, dracut-019-r2.ebuild, dracut-022.ebuild:
40
41
42
43 1.1 sys-kernel/dracut/dracut-022-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-022-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-022-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: dracut-022-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-022-r1.ebuild,v 1.1 2012/07/30 20:26:31 aidecoe Exp $
53
54 EAPI=4
55
56 inherit eutils linux-info toolchain-funcs
57
58 add_req_use_for() {
59 local dep="$1"; shift
60 local f
61
62 for f in "$@"; do
63 REQUIRED_USE+="${f}? ( ${dep} )
64 "
65 done
66 }
67
68 DESCRIPTION="Generic initramfs generation tool"
69 HOMEPAGE="http://dracut.wiki.kernel.org"
70 SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
71 LICENSE="GPL-2"
72 SLOT="0"
73 KEYWORDS="~amd64 ~x86"
74
75 REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt )
76 dracut_modules_livenet? ( dracut_modules_dmsquash-live )
77 "
78 COMMON_MODULES="
79 dracut_modules_biosdevname
80 dracut_modules_bootchart
81 dracut_modules_btrfs
82 dracut_modules_caps
83 dracut_modules_crypt-gpg
84 dracut_modules_gensplash
85 dracut_modules_mdraid
86 dracut_modules_multipath
87 dracut_modules_plymouth
88 dracut_modules_syslog
89 "
90 DM_MODULES="
91 dracut_modules_crypt
92 dracut_modules_dmraid
93 dracut_modules_dmsquash-live
94 dracut_modules_livenet
95 dracut_modules_lvm
96 "
97 NETWORK_MODULES="
98 dracut_modules_iscsi
99 dracut_modules_livenet
100 dracut_modules_nbd
101 dracut_modules_nfs
102 dracut_modules_ssh-client
103 "
104 add_req_use_for device-mapper ${DM_MODULES}
105 add_req_use_for net ${NETWORK_MODULES}
106 IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}"
107 IUSE="debug device-mapper optimization net selinux ${IUSE_DRACUT_MODULES}"
108
109 RESTRICT="test"
110
111 RDEPEND="
112 app-arch/cpio
113 >=app-shells/bash-4.0
114 >=app-shells/dash-0.5.4.11
115 >=sys-apps/baselayout-1.12.14-r1
116 || ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] )
117 >=sys-apps/sysvinit-2.87-r3
118 >=sys-apps/util-linux-2.20
119 >=sys-fs/udev-166
120
121 debug? ( dev-util/strace )
122 device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) )
123 net? ( net-misc/curl >=net-misc/dhcp-4.2.1-r1 sys-apps/iproute2 )
124 selinux? ( sys-libs/libselinux sys-libs/libsepol )
125 dracut_modules_biosdevname? ( sys-apps/biosdevname )
126 dracut_modules_bootchart? ( app-benchmarks/bootchart2 )
127 dracut_modules_btrfs? ( sys-fs/btrfs-progs )
128 dracut_modules_caps? ( sys-libs/libcap )
129 dracut_modules_crypt? ( sys-fs/cryptsetup )
130 dracut_modules_crypt-gpg? ( app-crypt/gnupg )
131 dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools )
132 dracut_modules_gensplash? ( media-gfx/splashutils )
133 dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 )
134 dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 )
135 dracut_modules_mdraid? ( sys-fs/mdadm )
136 dracut_modules_multipath? ( sys-fs/multipath-tools )
137 dracut_modules_nbd? ( sys-block/nbd )
138 dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind )
139 dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 )
140 dracut_modules_ssh-client? ( dev-libs/openssl )
141 dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) )
142 "
143 DEPEND="
144 app-text/asciidoc
145 >=dev-libs/libxslt-1.1.26
146 app-text/docbook-xml-dtd:4.5
147 >=app-text/docbook-xsl-stylesheets-1.75.2
148 "
149
150 #
151 # Helper functions
152 #
153
154 # Returns true if any of specified modules is enabled by USE flag and false
155 # otherwise.
156 # $1 = list of modules (which have corresponding USE flags of the same name)
157 any_module() {
158 local m modules=" $@ "
159
160 for m in ${modules}; do
161 ! use $m && modules=${modules/ $m / }
162 done
163
164 shopt -s extglob
165 modules=${modules%%+( )}
166 shopt -u extglob
167
168 [[ ${modules} ]]
169 }
170
171 # Removes module from modules.d.
172 # $1 = module name
173 # Module name can be specified without number prefix.
174 rm_module() {
175 local force m
176 [[ $1 = -f ]] && force=-f
177
178 for m in $@; do
179 if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then
180 rm ${force} --interactive=never -r "${modules_dir}"/$m
181 else
182 rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m
183 fi
184 done
185 }
186
187 #
188 # ebuild functions
189 #
190
191 src_prepare() {
192 epatch "${FILESDIR}/${PV}-0001-qemu-module-setup.sh-provide-alternati.patch"
193 epatch "${FILESDIR}/${PV}-0002-Makefile-use-implicit-rules-for-instal.patch"
194 epatch "${FILESDIR}/${PV}-0003-kernel-modules-module-setup.sh-just-op.patch"
195 epatch "${FILESDIR}/${PV}-0004-90multipath-added-kpartx.rules-multipa.patch"
196 epatch "${FILESDIR}/${PV}-0005-gentoo.conf-set-udevdir.patch"
197 epatch "${FILESDIR}/${PV}-0006-Config-file-for-systemd-on-Gentoo.patch"
198 epatch "${FILESDIR}/${PV}-0007-Remove-obsolete-gentoo-conf-file.patch"
199 epatch "${FILESDIR}/${PV}-0008-95rootfs-block-fix-left-fsck-rel.-chec.patch"
200 epatch "${FILESDIR}/${PV}-0009-98usrmount-use-rw-and-ro-options-inste.patch"
201 epatch "${FILESDIR}/${PV}-0010-98usrmount-print-mount-options.patch"
202 epatch "${FILESDIR}/${PV}-0011-dracut-lib-new-functions-listlist-and-.patch"
203 epatch "${FILESDIR}/${PV}-0012-apply-ro-and-rw-options-from-cmdline-t.patch"
204 epatch "${FILESDIR}/${PV}-0013-ro_mnt-option-at-build-time-to-force-r.patch"
205 epatch "${FILESDIR}/${PV}-0014-parse-root-opts-first-check-for-ro-lat.patch"
206 epatch "${FILESDIR}/${PV}-0015-gentoo.conf-enable-ro_mnt.patch"
207 epatch "${FILESDIR}/${PV}-0016-dracut.sh-test-if-we-can-lazy-resolve-.patch"
208 einfo "Removing ${S}/install/hashmap.o ..."
209 rm "${S}/install/hashmap.o" || die
210 }
211
212 src_compile() {
213 if use optimization; then
214 ewarn "Enabling experimental optimization!"
215 tc-export CC
216 emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" doc \
217 install/dracut-install
218 fi
219 }
220
221 src_install() {
222 emake prefix=/usr libdir="/usr/$(get_libdir)" sysconfdir=/etc \
223 DESTDIR="${D}" install
224
225 dodir /var/lib/dracut/overlay
226 dodoc HACKING TODO AUTHORS NEWS README*
227
228 insinto /etc/dracut.conf.d
229 newins dracut.conf.d/gentoo.conf.example gentoo.conf
230
231 insinto /etc/logrotate.d
232 newins dracut.logrotate dracut
233
234 dohtml dracut.html
235
236 #
237 # Modules
238 #
239 local module
240 modules_dir="${D}/usr/$(get_libdir)/dracut/modules.d"
241
242 # Remove modules not enabled by USE flags
243 for module in ${IUSE_DRACUT_MODULES} ; do
244 ! use ${module} && rm_module -f ${module#dracut_modules_}
245 done
246
247 # Those flags are specific, and even are corresponding to modules, they need
248 # to be declared as regular USE flags.
249 use debug || rm_module 95debug
250 use selinux || rm_module 98selinux
251
252 # Following flags define set of helper modules which are base dependencies
253 # for others and as so have no practical use, so remove these modules.
254 use device-mapper || rm_module 90dm
255 use net || rm_module 40network 45ifcfg 45url-lib
256
257 # Remove S/390 modules which are not tested at all
258 rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet
259
260 # Remove modules which won't work for sure
261 rm_module 95fcoe # no tools
262 # fips module depends on masked app-crypt/hmaccalc
263 rm_module 01fips 02fips-aesni
264
265 # Remove extra modules which go to future dracut-extras
266 rm_module 05busybox 97masterkey 98ecryptfs 98integrity 98systemd
267 }
268
269 pkg_postinst() {
270 if linux-info_get_any_version && linux_config_src_exists; then
271 ewarn ""
272 ewarn "If the following test report contains a missing kernel"
273 ewarn "configuration option, you should reconfigure and rebuild your"
274 ewarn "kernel before booting image generated with this Dracut version."
275 ewarn ""
276
277 local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS ~MODULES"
278
279 # Kernel configuration options descriptions:
280 local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev"
281 local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\
282 "(initramfs/initrd) support"
283 local desc_MODULES="Enable loadable module support"
284
285 local opt desc
286
287 # Generate ERROR_* variables for check_extra_config.
288 for opt in ${CONFIG_CHECK}; do
289 opt=${opt#\~}
290 desc=desc_${opt}
291 eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \
292 "is missing and REQUIRED'"
293 done
294
295 check_extra_config
296 echo
297 else
298 ewarn ""
299 ewarn "Your kernel configuration couldn't be checked. Do you have"
300 ewarn "/usr/src/linux/.config file there? Please check manually if"
301 ewarn "following options are enabled:"
302 ewarn ""
303 ewarn " CONFIG_BLK_DEV_INITRD"
304 ewarn " CONFIG_DEVTMPFS"
305 ewarn " CONFIG_MODULES"
306 ewarn ""
307 fi
308
309 if has_version virtual/pkgconfig; then
310 elog ""
311 elog "virtual/pkgconfig is no longer needed by dracut."
312 elog ""
313 fi
314 }