1 |
aidecoe 15/06/02 09:34:01 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dracut-041-r3.ebuild |
5 |
Log: |
6 |
Make dracut tools compile on musl. Fix bug #550204. |
7 |
|
8 |
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key F0134531E1DBFAB5) |
9 |
|
10 |
Revision Changes Path |
11 |
1.191 sys-kernel/dracut/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.191&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.191&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?r1=1.190&r2=1.191 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v |
20 |
retrieving revision 1.190 |
21 |
retrieving revision 1.191 |
22 |
diff -u -r1.190 -r1.191 |
23 |
--- ChangeLog 31 Mar 2015 10:54:29 -0000 1.190 |
24 |
+++ ChangeLog 2 Jun 2015 09:34:01 -0000 1.191 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for sys-kernel/dracut |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.190 2015/03/31 10:54:29 aidecoe Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.191 2015/06/02 09:34:01 aidecoe Exp $ |
30 |
+ |
31 |
+*dracut-041-r3 (02 Jun 2015) |
32 |
+ |
33 |
+ 02 Jun 2015; Amadeusz Żołnowski <aidecoe@g.o> +dracut-041-r3.ebuild, |
34 |
+ +files/041-r2-0004-Portability-fixes.patch: |
35 |
+ Make dracut tools compile on musl. Fix bug #550204. |
36 |
|
37 |
31 Mar 2015; Amadeusz Żołnowski <aidecoe@g.o> dracut-040-r3.ebuild, |
38 |
dracut-041.ebuild, dracut-041-r2.ebuild: |
39 |
|
40 |
|
41 |
|
42 |
1.1 sys-kernel/dracut/dracut-041-r3.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-041-r3.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-041-r3.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: dracut-041-r3.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2015 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-041-r3.ebuild,v 1.1 2015/06/02 09:34:01 aidecoe Exp $ |
52 |
|
53 |
EAPI=4 |
54 |
|
55 |
inherit bash-completion-r1 eutils linux-info multilib systemd |
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.xz" |
60 |
LICENSE="GPL-2" |
61 |
SLOT="0" |
62 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
63 |
IUSE="debug selinux systemd" |
64 |
|
65 |
RESTRICT="test" |
66 |
|
67 |
CDEPEND="virtual/udev |
68 |
systemd? ( >=sys-apps/systemd-199 ) |
69 |
" |
70 |
RDEPEND="${CDEPEND} |
71 |
app-arch/cpio |
72 |
>=app-shells/bash-4.0 |
73 |
>sys-apps/kmod-5[tools] |
74 |
|| ( |
75 |
>=sys-apps/sysvinit-2.87-r3 |
76 |
sys-apps/systemd[sysv-utils] |
77 |
sys-apps/systemd-sysv-utils |
78 |
) |
79 |
>=sys-apps/util-linux-2.21 |
80 |
|
81 |
debug? ( dev-util/strace ) |
82 |
selinux? ( |
83 |
sys-libs/libselinux |
84 |
sys-libs/libsepol |
85 |
sec-policy/selinux-dracut |
86 |
) |
87 |
" |
88 |
DEPEND="${CDEPEND} |
89 |
app-text/asciidoc |
90 |
>=dev-libs/libxslt-1.1.26 |
91 |
app-text/docbook-xml-dtd:4.5 |
92 |
>=app-text/docbook-xsl-stylesheets-1.75.2 |
93 |
virtual/pkgconfig |
94 |
" |
95 |
|
96 |
DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules |
97 |
README.testsuite TODO ) |
98 |
MY_LIBDIR=/usr/lib |
99 |
PATCHES=( |
100 |
"${FILESDIR}/${PVR}-0001-Use-the-same-paths-in-dracut.sh-as-tho.patch" |
101 |
"${FILESDIR}/${PVR}-0002-Install-dracut-install-and-skipcpio-in.patch" |
102 |
"${FILESDIR}/${PVR}-0003-Take-into-account-lib64-dirs-when-dete.patch" |
103 |
"${FILESDIR}/${PVR}-0004-Portability-fixes.patch" |
104 |
) |
105 |
QA_MULTILIB_PATHS=" |
106 |
usr/lib/dracut/dracut-install |
107 |
usr/lib/dracut/skipcpio |
108 |
" |
109 |
|
110 |
# |
111 |
# Helper functions |
112 |
# |
113 |
|
114 |
# Removes module from modules.d. |
115 |
# $1 = module name |
116 |
# Module name can be specified without number prefix. |
117 |
rm_module() { |
118 |
local force m |
119 |
[[ $1 = -f ]] && force=-f |
120 |
|
121 |
for m in $@; do |
122 |
if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then |
123 |
rm ${force} --interactive=never -r "${modules_dir}"/$m |
124 |
else |
125 |
rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m |
126 |
fi |
127 |
done |
128 |
} |
129 |
|
130 |
# Grabbed from net-misc/netctl ebuild. |
131 |
optfeature() { |
132 |
local desc=$1 |
133 |
shift |
134 |
while (( $# )); do |
135 |
if has_version "$1"; then |
136 |
elog " [I] $1 to ${desc}" |
137 |
else |
138 |
elog " [ ] $1 to ${desc}" |
139 |
fi |
140 |
shift |
141 |
done |
142 |
} |
143 |
|
144 |
# |
145 |
# ebuild functions |
146 |
# |
147 |
|
148 |
src_prepare() { |
149 |
epatch "${PATCHES[@]}" |
150 |
|
151 |
local libdirs="/$(get_libdir) /usr/$(get_libdir)" |
152 |
if [[ ${SYMLINK_LIB} = yes ]]; then |
153 |
# Preserve lib -> lib64 symlinks in initramfs |
154 |
[[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" |
155 |
fi |
156 |
einfo "Setting libdirs to \"${libdirs}\" ..." |
157 |
sed -e "3alibdirs=\"${libdirs}\"" \ |
158 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
159 |
|
160 |
local udevdir="$("$(tc-getPKG_CONFIG)" udev --variable=udevdir)" |
161 |
einfo "Setting udevdir to ${udevdir}..." |
162 |
sed -r -e "s|^(udevdir=).*$|\1${udevdir}|" \ |
163 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
164 |
|
165 |
if use systemd; then |
166 |
local systemdutildir="$(systemd_get_utildir)" |
167 |
local systemdsystemunitdir="$(systemd_get_unitdir)" |
168 |
local systemdsystemconfdir="$("$(tc-getPKG_CONFIG)" systemd \ |
169 |
--variable=systemdsystemconfdir)" |
170 |
[[ ${systemdsystemconfdir} ]] \ |
171 |
|| systemdsystemconfdir=/etc/systemd/system |
172 |
einfo "Setting systemdutildir to ${systemdutildir} and ..." |
173 |
sed -e "5asystemdutildir=\"${systemdutildir}\"" \ |
174 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
175 |
einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir} and..." |
176 |
sed -e "6asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \ |
177 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
178 |
einfo "Setting systemdsystemconfdir to ${systemdsystemconfdir}..." |
179 |
sed -e "7asystemdsystemconfdir=\"${systemdsystemconfdir}\"" \ |
180 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
181 |
else |
182 |
local systemdutildir="/lib/systemd" |
183 |
einfo "Setting systemdutildir for standalone udev to" \ |
184 |
"${systemdutildir}..." |
185 |
sed -e "5asystemdutildir=\"${systemdutildir}\"" \ |
186 |
-i "${S}/dracut.conf.d/gentoo.conf.example" || die |
187 |
fi |
188 |
|
189 |
epatch_user |
190 |
} |
191 |
|
192 |
src_configure() { |
193 |
local myconf="--libdir=${MY_LIBDIR}" |
194 |
myconf+=" --bashcompletiondir=$(get_bashcompdir)" |
195 |
|
196 |
if use systemd; then |
197 |
myconf+=" --systemdsystemunitdir='$(systemd_get_unitdir)'" |
198 |
fi |
199 |
|
200 |
econf ${myconf} |
201 |
} |
202 |
|
203 |
src_compile() { |
204 |
tc-export CC |
205 |
emake doc install/dracut-install skipcpio/skipcpio |
206 |
} |
207 |
|
208 |
src_install() { |
209 |
default |
210 |
|
211 |
local my_libdir="${MY_LIBDIR}" |
212 |
local dracutlibdir="${my_libdir#/}/dracut" |
213 |
|
214 |
echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh" |
215 |
|
216 |
insinto "${dracutlibdir}/dracut.conf.d/" |
217 |
newins dracut.conf.d/gentoo.conf.example gentoo.conf |
218 |
|
219 |
insinto /etc/logrotate.d |
220 |
newins dracut.logrotate dracut |
221 |
|
222 |
dodir /var/lib/dracut/overlay |
223 |
|
224 |
dohtml dracut.html |
225 |
|
226 |
if ! use systemd; then |
227 |
# Scripts in kernel/install.d are systemd-specific |
228 |
rm -r "${D%/}/${my_libdir}/kernel" || die |
229 |
fi |
230 |
|
231 |
# |
232 |
# Modules |
233 |
# |
234 |
local module |
235 |
modules_dir="${D%/}/${dracutlibdir}/modules.d" |
236 |
|
237 |
use debug || rm_module 95debug |
238 |
use selinux || rm_module 98selinux |
239 |
|
240 |
if use systemd; then |
241 |
# With systemd following modules do not make sense |
242 |
rm_module 96securityfs 97masterkey 98integrity |
243 |
else |
244 |
rm_module 98systemd |
245 |
# Without systemd following modules do not make sense |
246 |
rm_module 00systemd-bootchart |
247 |
fi |
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 02fips-aesni |
253 |
} |
254 |
|
255 |
pkg_postinst() { |
256 |
if linux-info_get_any_version && linux_config_src_exists; then |
257 |
ewarn "" |
258 |
ewarn "If the following test report contains a missing kernel" |
259 |
ewarn "configuration option, you should reconfigure and rebuild your" |
260 |
ewarn "kernel before booting image generated with this Dracut version." |
261 |
ewarn "" |
262 |
|
263 |
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS" |
264 |
|
265 |
# Kernel configuration options descriptions: |
266 |
local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" |
267 |
local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ |
268 |
"(initramfs/initrd) support" |
269 |
|
270 |
local opt desc |
271 |
|
272 |
# Generate ERROR_* variables for check_extra_config. |
273 |
for opt in ${CONFIG_CHECK}; do |
274 |
opt=${opt#\~} |
275 |
desc=desc_${opt} |
276 |
eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ |
277 |
"is missing and REQUIRED'" |
278 |
done |
279 |
|
280 |
check_extra_config |
281 |
echo |
282 |
else |
283 |
ewarn "" |
284 |
ewarn "Your kernel configuration couldn't be checked. Do you have" |
285 |
ewarn "/usr/src/linux/.config file there? Please check manually if" |
286 |
ewarn "following options are enabled:" |
287 |
ewarn "" |
288 |
ewarn " CONFIG_BLK_DEV_INITRD" |
289 |
ewarn " CONFIG_DEVTMPFS" |
290 |
ewarn "" |
291 |
fi |
292 |
|
293 |
elog "To get additional features, a number of optional runtime" |
294 |
elog "dependencies may be installed:" |
295 |
elog "" |
296 |
optfeature "Networking support" net-misc/curl "net-misc/dhcp[client]" \ |
297 |
sys-apps/iproute2 |
298 |
optfeature \ |
299 |
"Measure performance of the boot process for later visualisation" \ |
300 |
app-benchmarks/bootchart2 app-admin/killproc sys-process/acct |
301 |
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs |
302 |
optfeature "Load kernel modules and drop this privilege for real init" \ |
303 |
sys-libs/libcap |
304 |
optfeature "Support CIFS" net-fs/cifs-utils |
305 |
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \ |
306 |
"sys-fs/cryptsetup[-static-libs]" |
307 |
optfeature "Support for GPG-encrypted keys for crypt module" \ |
308 |
app-crypt/gnupg |
309 |
optfeature \ |
310 |
"Allows use of dash instead of default bash (on your own risk)" \ |
311 |
app-shells/dash |
312 |
optfeature "Framebuffer splash (media-gfx/splashutils)" \ |
313 |
media-gfx/splashutils |
314 |
optfeature "Support iSCSI" sys-block/open-iscsi |
315 |
optfeature "Support Logical Volume Manager" sys-fs/lvm2 |
316 |
optfeature "Support MD devices, also known as software RAID devices" \ |
317 |
sys-fs/mdadm |
318 |
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools |
319 |
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5' |
320 |
optfeature "Support network block devices" sys-block/nbd |
321 |
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind |
322 |
optfeature \ |
323 |
"Install ssh and scp along with config files and specified keys" \ |
324 |
net-misc/openssh |
325 |
optfeature "Enable logging with syslog-ng or rsyslog" app-admin/syslog-ng \ |
326 |
app-admin/rsyslog |
327 |
} |