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