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-010-r3.ebuild
Date: Thu, 30 Jun 2011 21:23:49
Message-Id: 20110630212339.A68B120054@flycatcher.gentoo.org
1 aidecoe 11/06/30 21:23:39
2
3 Modified: ChangeLog
4 Added: dracut-010-r3.ebuild
5 Log:
6 sys-kernel/dracut-010: -r4 revbump; fixes bug #373007
7
8 rd.driver.* kernel args handling patches.
9
10 (Portage version: 2.1.10.3/cvs/Linux x86_64)
11
12 Revision Changes Path
13 1.25 sys-kernel/dracut/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.25&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.25&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?r1=1.24&r2=1.25
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v
22 retrieving revision 1.24
23 retrieving revision 1.25
24 diff -u -r1.24 -r1.25
25 --- ChangeLog 23 Jun 2011 10:38:17 -0000 1.24
26 +++ ChangeLog 30 Jun 2011 21:23:39 -0000 1.25
27 @@ -1,6 +1,13 @@
28 # ChangeLog for sys-kernel/dracut
29 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.24 2011/06/23 10:38:17 aidecoe Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.25 2011/06/30 21:23:39 aidecoe Exp $
32 +
33 +*dracut-010-r3 (30 Jun 2011)
34 +
35 + 30 Jun 2011; Amadeusz Żołnowski <aidecoe@g.o> +dracut-010-r3.ebuild,
36 + +files/dracut-010-rd.driver.post-fixed.patch,
37 + +files/dracut-010-rd.driver.pre-and-blacklist-fix.patch:
38 + rd.driver.* kernel args handling patches. Fixes bug #373007.
39
40 23 Jun 2011; Amadeusz Żołnowski <aidecoe@g.o> dracut-009-r1.ebuild,
41 dracut-010.ebuild, dracut-010-r1.ebuild, dracut-010-r2.ebuild:
42
43
44
45 1.1 sys-kernel/dracut/dracut-010-r3.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-010-r3.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-010-r3.ebuild?rev=1.1&content-type=text/plain
49
50 Index: dracut-010-r3.ebuild
51 ===================================================================
52 # Copyright 1999-2011 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-010-r3.ebuild,v 1.1 2011/06/30 21:23:39 aidecoe Exp $
55
56 EAPI=2
57
58 inherit eutils
59
60 DESCRIPTION="Generic initramfs generation tool"
61 HOMEPAGE="http://dracut.wiki.kernel.org"
62 SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
63
64 LICENSE="GPL-2"
65 SLOT="0"
66 KEYWORDS="~x86 ~amd64"
67
68 COMMON_MODULES="
69 dracut_modules_biosdevname
70 dracut_modules_btrfs
71 dracut_modules_caps
72 dracut_modules_gensplash
73 dracut_modules_mdraid
74 dracut_modules_multipath
75 dracut_modules_plymouth
76 dracut_modules_syslog
77 dracut_modules_xen
78 "
79 NETWORK_MODULES="
80 dracut_modules_iscsi
81 dracut_modules_nbd
82 dracut_modules_nfs
83 "
84 DM_MODULES="
85 dracut_modules_crypt
86 dracut_modules_dmraid
87 dracut_modules_dmsquash-live
88 dracut_modules_lvm
89 "
90 IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}"
91 IUSE="debug selinux ${IUSE_DRACUT_MODULES}"
92 RESTRICT="test"
93
94 NETWORK_DEPS="net-misc/bridge-utils >=net-misc/dhcp-4.2.1-r1 sys-apps/iproute2
95 net-misc/ifenslave"
96 DM_DEPS="|| ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 )"
97
98 RDEPEND="
99 >=app-shells/bash-4.0
100 >=app-shells/dash-0.5.4.11
101 >=sys-apps/baselayout-1.12.14-r1
102 >=sys-apps/module-init-tools-3.5
103 >=sys-apps/sysvinit-2.87-r3
104 >=sys-apps/util-linux-2.16
105 >=sys-fs/udev-149
106
107 debug? ( dev-util/strace )
108 selinux? ( sys-libs/libselinux sys-libs/libsepol )
109 dracut_modules_biosdevname? ( sys-apps/biosdevname )
110 dracut_modules_btrfs? ( sys-fs/btrfs-progs )
111 dracut_modules_caps? ( sys-libs/libcap )
112 dracut_modules_crypt? ( sys-fs/cryptsetup ${DM_DEPS} )
113 dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools ${DM_DEPS} )
114 dracut_modules_dmsquash-live? ( virtual/eject ${DM_DEPS} )
115 dracut_modules_gensplash? ( media-gfx/splashutils )
116 dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 ${NETWORK_DEPS} )
117 dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 )
118 dracut_modules_mdraid? ( sys-fs/mdadm )
119 dracut_modules_multipath? ( sys-fs/multipath-tools )
120 dracut_modules_nbd? ( sys-block/nbd ${NETWORK_DEPS} )
121 dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind ${NETWORK_DEPS} )
122 dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 )
123 dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) )
124 dracut_modules_xen? ( app-emulation/xen )
125 "
126 DEPEND="
127 >=dev-libs/libxslt-1.1.26
128 app-text/docbook-xml-dtd:4.5
129 >=app-text/docbook-xsl-stylesheets-1.75.2
130 "
131
132 #
133 # Helper functions
134 #
135
136 # Returns true if any of specified modules is enabled by USE flag and false
137 # otherwise.
138 # $1 = list of modules (which have corresponding USE flags of the same name)
139 any_module() {
140 local m modules=" $@ "
141
142 for m in ${modules}; do
143 ! use $m && modules=${modules/ $m / }
144 done
145
146 shopt -s extglob
147 modules=${modules%%+( )}
148 shopt -u extglob
149
150 [[ ${modules} ]]
151 }
152
153 # Removes module from modules.d.
154 # $1 = module name
155 # Module name can be specified without number prefix.
156 rm_module() {
157 local m
158
159 for m in $@; do
160 if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then
161 rm -rf "${modules_dir}"/$m
162 else
163 rm -rf "${modules_dir}"/[0-9][0-9]$m
164 fi
165 done
166 }
167
168 # Displays Gentoo Base System major release number
169 base_sys_maj_ver() {
170 local line
171
172 read line < /etc/gentoo-release
173 line=${line##* }
174 echo "${line%%.*}"
175 }
176
177 #
178 # ebuild functions
179 #
180
181 src_prepare() {
182 epatch "${FILESDIR}/${P}-multipath-udev-rules.patch"
183 epatch "${FILESDIR}/${P}-empty-etc-ld.so.conf.d.patch"
184 epatch "${FILESDIR}/${P}-rd.driver.post-fixed.patch"
185 epatch "${FILESDIR}/${P}-rd.driver.pre-and-blacklist-fix.patch"
186 }
187
188 src_compile() {
189 emake WITH_SWITCH_ROOT=0 || die "emake failed"
190 }
191
192 src_install() {
193 emake WITH_SWITCH_ROOT=0 \
194 prefix=/usr sysconfdir=/etc DESTDIR="${D}" \
195 install || die "emake install failed"
196
197 local gen2conf
198
199 dodir /var/lib/dracut/overlay
200 dodoc HACKING TODO AUTHORS NEWS README* || die 'dodoc failed'
201
202 case "$(base_sys_maj_ver)" in
203 1) gen2conf=gentoo.conf ;;
204 2) gen2conf=gentoo-openrc.conf ;;
205 *) die "Expected ver. 1 or 2 of Gentoo Base System (/etc/gentoo-release)."
206 esac
207
208 insinto /etc/dracut.conf.d
209 newins dracut.conf.d/${gen2conf}.example ${gen2conf} \
210 || die 'gen2conf ins failed'
211
212 insinto /etc/logrotate.d
213 newins dracut.logrotate dracut || die 'dracut.logrotate ins failed'
214
215 #
216 # Modules
217 #
218 local module
219 modules_dir="${D}/usr/share/dracut/modules.d"
220
221 echo "${PF}" > "${modules_dir}"/10rpmversion/dracut-version \
222 || die 'dracut-version failed'
223
224 # Remove modules not enabled by USE flags
225 for module in ${IUSE_DRACUT_MODULES} ; do
226 ! use ${module} && rm_module ${module#dracut_modules_}
227 done
228
229 # Those flags are specific, and even are corresponding to modules, they need
230 # to be declared as regular USE flags.
231 use debug || rm_module 95debug
232 use selinux || rm_module 98selinux
233
234 ! any_module ${DM_MODULES} && rm_module 90dm
235 ! any_module ${NETWORK_MODULES} && rm_module 45ifcfg 40network
236
237 # Remove S/390 modules which are not tested at all
238 rm_module 95dasd 95dasd_mod 95zfcp 95znet
239
240 # Remove modules which won't work for sure
241 rm_module 00bootchart 05busybox # broken
242 rm_module 95fcoe # no tools
243
244 # fips module depends on masked app-crypt/hmaccalc
245 rm_module 01fips
246 }
247
248 pkg_postinst() {
249 elog 'To generate the initramfs:'
250 elog ' # mount /boot (if necessary)'
251 elog ' # dracut "" <kernel-version>'
252 elog ''
253 elog 'For command line documentation see dracut.kernel(7).'
254 elog ''
255 elog 'Simple example to select root and resume partition:'
256 elog ' root=/dev/sda1 resume=/dev/sda2'
257 elog ''
258 elog 'The default config (in /etc/dracut.conf) is very minimal and is highly'
259 elog 'recommended you adjust based on your needs. To include only dracut'
260 elog 'modules and kernel drivers for this system, use the "-H" option.'
261 elog 'Some modules need to be explicitly added with "-a" option even if'
262 elog 'required tools are installed.'
263 echo
264 elog 'Options (documented in dracut.kernel(7)) have new format since'
265 elog 'version 008. Old format is preserved, but will be removed in future.'
266 elog 'Please migrate to the new one.'
267 }