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