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