1 |
commit: b5cb6c719a24b118865777640682e269b33a6e62 |
2 |
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Jul 3 20:35:03 2017 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Jul 3 20:35:50 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=b5cb6c71 |
7 |
|
8 |
sys-kernel/dracut: add 045 (most recent) |
9 |
|
10 |
Now depends on libfts on musl, so we need a patch in order to detect its |
11 |
presence. |
12 |
|
13 |
sys-kernel/dracut/Manifest | 4 + |
14 |
sys-kernel/dracut/dracut-045.ebuild | 168 ++++++++++++++++++++++++ |
15 |
sys-kernel/dracut/files/dracut-045-libfts.patch | 87 ++++++++++++ |
16 |
sys-kernel/dracut/metadata.xml | 28 ++++ |
17 |
4 files changed, 287 insertions(+) |
18 |
|
19 |
diff --git a/sys-kernel/dracut/Manifest b/sys-kernel/dracut/Manifest |
20 |
new file mode 100644 |
21 |
index 0000000..481a285 |
22 |
--- /dev/null |
23 |
+++ b/sys-kernel/dracut/Manifest |
24 |
@@ -0,0 +1,4 @@ |
25 |
+AUX dracut-045-libfts.patch 2744 SHA256 49151e4f1f1042f9cdc7caa2388f0785526f27820323ca02dc65f6ed61d7d611 SHA512 cb94e734471118c414c8f78b1e528fb19712e1eb4ccec6999bb1e9e57c239647a5205b63dff69b4f921c6ac6eddfc3c3c6ffef973bff6acd690365a3fe245d56 WHIRLPOOL 1170ee991d4dc6f1066737a2fe46e2bf200b537151c4e5ba8c0ec7f0b92cda834e7779004918df21845a2441bc454874a00d7f5532490aaed4ee758278e75039 |
26 |
+DIST dracut-045.tar.xz 292652 SHA256 ca9c7ea54d3efc8b57ac1427cc5fa4d66688f6cf9d3088f4c5e7ae7c7e84ebf8 SHA512 b57aab1f6fbdd5ad52a13a0eb99937b1abcd11507a2a3e6ec9bcb94e578cc32edc01a814ea2cef93158c27c17e3e40bcdd32a66457a20363f8136b8b546bbb4a WHIRLPOOL d9cdf32e4fb745b2598aa2f0504c943f5a069dddc17d5261d594b2fc33921306196386bc35156d5bf71983cc15be3b0cddd504d1b6a2042b45b5c5ae622b23b9 |
27 |
+EBUILD dracut-045.ebuild 4822 SHA256 f843b16a682e4d9fca90398c9509e48c26e6d1f3b54b54d7416ef24bffb9c40b SHA512 f2dd17ecbe36fa64f6c5ab84a7c5777636bb0832a22deb274ea01b5e2bc18fdc66c3e526486fc9e4bf59f53d28d60f6935a0b85ad0db17be333688a89a630ed7 WHIRLPOOL 09410575b79ab230cfc3593b78914cb8bc6e7e7549334879b4ab9e14bb22dd0bf5bb04aca97d7c92abc4f3907a909c6ddbcae14beab90e3c4a6af9c29b64809a |
28 |
+MISC metadata.xml 840 SHA256 8ef5aab36d95735b3b0b1cdba609ef3cd8e883ac38fb619c957fe5ae1e35bd6d SHA512 d347acc0a7c8b821804280f198aa28cbd4198a8f2d570c2725584b18b04125a684bed6adb48f5cb71fe1ef0e1c19320ad3dbff612dbf972f741b50b91fc388ba WHIRLPOOL 9edf380512d517d1eb6303a81379e8df8c342c3ab4501b150f2c23078185d09251903b4ea182a65c49caeda51ce21845ba34783875b7c8111883ff3855f0dbac |
29 |
|
30 |
diff --git a/sys-kernel/dracut/dracut-045.ebuild b/sys-kernel/dracut/dracut-045.ebuild |
31 |
new file mode 100644 |
32 |
index 0000000..20908ce |
33 |
--- /dev/null |
34 |
+++ b/sys-kernel/dracut/dracut-045.ebuild |
35 |
@@ -0,0 +1,168 @@ |
36 |
+# Copyright 1999-2017 Gentoo Foundation |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=6 |
40 |
+ |
41 |
+inherit bash-completion-r1 linux-info toolchain-funcs systemd |
42 |
+ |
43 |
+DESCRIPTION="Generic initramfs generation tool" |
44 |
+HOMEPAGE="https://dracut.wiki.kernel.org" |
45 |
+SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.xz" |
46 |
+LICENSE="GPL-2" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
49 |
+IUSE="debug selinux" |
50 |
+ |
51 |
+RESTRICT="test" |
52 |
+ |
53 |
+CDEPEND="virtual/udev |
54 |
+ virtual/pkgconfig |
55 |
+ >=sys-apps/kmod-15[tools] |
56 |
+ " |
57 |
+RDEPEND="${CDEPEND} |
58 |
+ app-arch/cpio |
59 |
+ >=app-shells/bash-4.0:0 |
60 |
+ || ( |
61 |
+ >=sys-apps/sysvinit-2.87-r3 |
62 |
+ sys-apps/systemd[sysv-utils] |
63 |
+ sys-apps/systemd-sysv-utils |
64 |
+ ) |
65 |
+ sys-apps/coreutils[xattr(-)] |
66 |
+ >=sys-apps/util-linux-2.21 |
67 |
+ |
68 |
+ debug? ( dev-util/strace ) |
69 |
+ elibc_musl? ( sys-libs/fts-standalone ) |
70 |
+ selinux? ( |
71 |
+ sys-libs/libselinux |
72 |
+ sys-libs/libsepol |
73 |
+ sec-policy/selinux-dracut |
74 |
+ ) |
75 |
+ !net-analyzer/arping |
76 |
+ " |
77 |
+DEPEND="${CDEPEND} |
78 |
+ app-text/asciidoc |
79 |
+ >=dev-libs/libxslt-1.1.26 |
80 |
+ app-text/docbook-xml-dtd:4.5 |
81 |
+ >=app-text/docbook-xsl-stylesheets-1.75.2 |
82 |
+ " |
83 |
+ |
84 |
+DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules |
85 |
+ README.testsuite TODO ) |
86 |
+ |
87 |
+QA_MULTILIB_PATHS="usr/lib/dracut" |
88 |
+ |
89 |
+PATCHES=( |
90 |
+ "${FILESDIR}"/${P}-libfts.patch |
91 |
+) |
92 |
+ |
93 |
+src_configure() { |
94 |
+ local myconf=( |
95 |
+ --prefix="${EPREFIX}/usr" |
96 |
+ --sysconfdir="${EPREFIX}/etc" |
97 |
+ --bashcompletiondir="$(get_bashcompdir)" |
98 |
+ --systemdsystemunitdir="$(systemd_get_systemunitdir)" |
99 |
+ ) |
100 |
+ |
101 |
+ tc-export CC PKG_CONFIG |
102 |
+ |
103 |
+ echo ./configure "${myconf[@]}" |
104 |
+ ./configure "${myconf[@]}" || die |
105 |
+} |
106 |
+ |
107 |
+src_install() { |
108 |
+ default |
109 |
+ |
110 |
+ local dracutlibdir="usr/lib/dracut" |
111 |
+ |
112 |
+ local libdirs="/$(get_libdir) /usr/$(get_libdir)" |
113 |
+ if [[ ${SYMLINK_LIB} = yes ]]; then |
114 |
+ # Preserve lib -> lib64 symlinks in initramfs |
115 |
+ [[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" |
116 |
+ fi |
117 |
+ |
118 |
+ einfo "Setting libdirs to \"${libdirs}\" ..." |
119 |
+ echo "libdirs=\"${libdirs}\"" > "${T}/gentoo.conf" |
120 |
+ insinto "${dracutlibdir}/dracut.conf.d" |
121 |
+ doins "${T}/gentoo.conf" |
122 |
+ |
123 |
+ insinto /etc/logrotate.d |
124 |
+ newins dracut.logrotate dracut |
125 |
+ |
126 |
+ dodir /var/lib/dracut/overlay |
127 |
+ |
128 |
+ dodoc dracut.html |
129 |
+} |
130 |
+ |
131 |
+pkg_postinst() { |
132 |
+ if linux-info_get_any_version && linux_config_exists; then |
133 |
+ ewarn "" |
134 |
+ ewarn "If the following test report contains a missing kernel" |
135 |
+ ewarn "configuration option, you should reconfigure and rebuild your" |
136 |
+ ewarn "kernel before booting image generated with this Dracut version." |
137 |
+ ewarn "" |
138 |
+ |
139 |
+ local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS" |
140 |
+ |
141 |
+ # Kernel configuration options descriptions: |
142 |
+ local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" |
143 |
+ local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ |
144 |
+"(initramfs/initrd) support" |
145 |
+ |
146 |
+ local opt desc |
147 |
+ |
148 |
+ # Generate ERROR_* variables for check_extra_config. |
149 |
+ for opt in ${CONFIG_CHECK}; do |
150 |
+ opt=${opt#\~} |
151 |
+ desc=desc_${opt} |
152 |
+ eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ |
153 |
+ "is missing and REQUIRED'" |
154 |
+ done |
155 |
+ |
156 |
+ check_extra_config |
157 |
+ echo |
158 |
+ else |
159 |
+ ewarn "" |
160 |
+ ewarn "Your kernel configuration couldn't be checked. Do you have" |
161 |
+ ewarn "/usr/src/linux/.config file there? Please check manually if" |
162 |
+ ewarn "following options are enabled:" |
163 |
+ ewarn "" |
164 |
+ ewarn " CONFIG_BLK_DEV_INITRD" |
165 |
+ ewarn " CONFIG_DEVTMPFS" |
166 |
+ ewarn "" |
167 |
+ fi |
168 |
+ |
169 |
+ elog "To get additional features, a number of optional runtime" |
170 |
+ elog "dependencies may be installed:" |
171 |
+ elog "" |
172 |
+ optfeature "Networking support" net-misc/curl "net-misc/dhcp[client]" \ |
173 |
+ sys-apps/iproute2 "net-misc/iputils[arping]" |
174 |
+ optfeature \ |
175 |
+ "Measure performance of the boot process for later visualisation" \ |
176 |
+ app-benchmarks/bootchart2 app-admin/killproc sys-process/acct |
177 |
+ optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs |
178 |
+ optfeature "Load kernel modules and drop this privilege for real init" \ |
179 |
+ sys-libs/libcap |
180 |
+ optfeature "Support CIFS" net-fs/cifs-utils |
181 |
+ optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \ |
182 |
+ "sys-fs/cryptsetup[-static-libs]" |
183 |
+ optfeature "Support for GPG-encrypted keys for crypt module" \ |
184 |
+ app-crypt/gnupg |
185 |
+ optfeature \ |
186 |
+ "Allows use of dash instead of default bash (on your own risk)" \ |
187 |
+ app-shells/dash |
188 |
+ optfeature "Framebuffer splash (media-gfx/splashutils)" \ |
189 |
+ media-gfx/splashutils |
190 |
+ optfeature "Support iSCSI" sys-block/open-iscsi |
191 |
+ optfeature "Support Logical Volume Manager" sys-fs/lvm2 |
192 |
+ optfeature "Support MD devices, also known as software RAID devices" \ |
193 |
+ sys-fs/mdadm |
194 |
+ optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools |
195 |
+ optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5' |
196 |
+ optfeature "Support network block devices" sys-block/nbd |
197 |
+ optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind |
198 |
+ optfeature \ |
199 |
+ "Install ssh and scp along with config files and specified keys" \ |
200 |
+ net-misc/openssh |
201 |
+ optfeature "Enable logging with syslog-ng or rsyslog" app-admin/syslog-ng \ |
202 |
+ app-admin/rsyslog |
203 |
+} |
204 |
|
205 |
diff --git a/sys-kernel/dracut/files/dracut-045-libfts.patch b/sys-kernel/dracut/files/dracut-045-libfts.patch |
206 |
new file mode 100644 |
207 |
index 0000000..cb35fe5 |
208 |
--- /dev/null |
209 |
+++ b/sys-kernel/dracut/files/dracut-045-libfts.patch |
210 |
@@ -0,0 +1,87 @@ |
211 |
+diff -Naur dracut-045.orig/Makefile dracut-045/Makefile |
212 |
+--- dracut-045.orig/Makefile 2017-07-03 12:44:30.407689932 -0700 |
213 |
++++ dracut-045/Makefile 2017-07-03 13:17:10.262396884 -0700 |
214 |
+@@ -12,7 +12,7 @@ |
215 |
+ sysconfdir ?= ${prefix}/etc |
216 |
+ bindir ?= ${prefix}/bin |
217 |
+ mandir ?= ${prefix}/share/man |
218 |
+-CFLAGS ?= -O2 -g -Wall $(KMOD_CFLAGS) |
219 |
++CFLAGS ?= -O2 -g -Wall $(KMOD_CFLAGS) $(FTS_CFLAGS) |
220 |
+ CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 |
221 |
+ bashcompletiondir ?= ${datadir}/bash-completion/completions |
222 |
+ pkgconfigdatadir ?= $(datadir)/pkgconfig |
223 |
+@@ -61,7 +61,7 @@ |
224 |
+ install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h |
225 |
+ |
226 |
+ install/dracut-install: $(DRACUT_INSTALL_OBJECTS) |
227 |
+- $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS) |
228 |
++ $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS) $(FTS_LIBS) |
229 |
+ |
230 |
+ dracut-install: install/dracut-install |
231 |
+ ln -fs $< $@ |
232 |
+diff -Naur dracut-045.orig/configure dracut-045/configure |
233 |
+--- dracut-045.orig/configure 2017-07-03 12:44:30.409689958 -0700 |
234 |
++++ dracut-045/configure 2017-07-03 13:29:29.159797981 -0700 |
235 |
+@@ -7,6 +7,7 @@ |
236 |
+ |
237 |
+ enable_documentation=yes |
238 |
+ |
239 |
++CC="${CC:-gcc}" |
240 |
+ PKG_CONFIG="${PKG_CONFIG:-pkg-config}" |
241 |
+ |
242 |
+ # Little helper function for reading args from the commandline. |
243 |
+@@ -52,10 +53,40 @@ |
244 |
+ shift |
245 |
+ done |
246 |
+ |
247 |
++printf "checking for libkmod... " |
248 |
+ if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then |
249 |
++ printf "no\n" |
250 |
+ echo "dracut needs pkg-config and libkmod >= 15." >&2 |
251 |
+ exit 1 |
252 |
+ fi |
253 |
++printf "yes\n" |
254 |
++ |
255 |
++tmpc="./conftest.c" |
256 |
++ |
257 |
++printf "checking whether we have fts available from libc... " |
258 |
++echo '#if !defined(__x86_64__)' > "$tmpc" |
259 |
++echo '#undef _FILE_OFFSET_BITS' >> "$tmpc" |
260 |
++echo '#define _FILE_OFFSET_BITS 32' >> "$tmpc" |
261 |
++echo '#endif' >> "$tmpc" |
262 |
++echo '#include <fts.h>' >> "$tmpc" |
263 |
++echo 'int main() { FTS* fts = 0; return fts_close(fts); return 0; }' >> "$tmpc" |
264 |
++if $CC -o /dev/null "$tmpc" >/dev/null 2>&1 ; then |
265 |
++printf "yes\n" |
266 |
++fts_library=false |
267 |
++else |
268 |
++printf "no\n" |
269 |
++printf "checking whether we have fts available from libfts... " |
270 |
++if $CC -lfts -o /dev/null "$tmpc" >/dev/null 2>&1 ; then |
271 |
++printf "yes\n" |
272 |
++fts_library=true |
273 |
++else |
274 |
++printf "no\n" |
275 |
++echo "fts not in libc and libfts not found." |
276 |
++exit 1 |
277 |
++fi |
278 |
++fi |
279 |
++ |
280 |
++rm $tmpc |
281 |
+ |
282 |
+ cat > Makefile.inc.$$ <<EOF |
283 |
+ prefix ?= ${prefix} |
284 |
+@@ -70,6 +101,13 @@ |
285 |
+ KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ") |
286 |
+ EOF |
287 |
+ |
288 |
++if $fts_library ; then |
289 |
++cat >> Makefile.inc.$$ <<EOF |
290 |
++FTS_CFLAGS ?= $(${PKG_CONFIG} --cflags " fts-standalone ") |
291 |
++FTS_LIBS ?= $(${PKG_CONFIG} --libs " fts-standalone ") |
292 |
++EOF |
293 |
++fi |
294 |
++ |
295 |
+ { |
296 |
+ [[ $programprefix ]] && echo "programprefix ?= ${programprefix}" |
297 |
+ [[ $execprefix ]] && echo "execprefix ?= ${execprefix}" |
298 |
|
299 |
diff --git a/sys-kernel/dracut/metadata.xml b/sys-kernel/dracut/metadata.xml |
300 |
new file mode 100644 |
301 |
index 0000000..f5d5063 |
302 |
--- /dev/null |
303 |
+++ b/sys-kernel/dracut/metadata.xml |
304 |
@@ -0,0 +1,28 @@ |
305 |
+<?xml version="1.0" encoding="UTF-8"?> |
306 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
307 |
+<pkgmetadata> |
308 |
+ <maintainer type="person"> |
309 |
+ <email>chutzpah@g.o</email> |
310 |
+ <name>Patrick McLean</name> |
311 |
+ </maintainer> |
312 |
+ <maintainer type="person"> |
313 |
+ <email>alexander@××××.me</email> |
314 |
+ <name>Alexander Tsoy</name> |
315 |
+ </maintainer> |
316 |
+ <maintainer type="person"> |
317 |
+ <email>aidecoe@g.o</email> |
318 |
+ <name>Amadeusz Żołnowski</name> |
319 |
+ </maintainer> |
320 |
+ <maintainer type="person"> |
321 |
+ <email>floppym@g.o</email> |
322 |
+ <name>Mike Gilbert</name> |
323 |
+ </maintainer> |
324 |
+ <use> |
325 |
+ <flag name="debug">Module installing additional tools like strace, file |
326 |
+ editor, ssh and more</flag> |
327 |
+ </use> |
328 |
+ <longdescription lang="en"> |
329 |
+ Generic, modular initramfs generation tool that can be used across various |
330 |
+ distributions. |
331 |
+ </longdescription> |
332 |
+</pkgmetadata> |