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