Annotation of /smage/trunk/core/dracut/dracut-048-r1.smage2
Parent Directory | Revision Log
Revision 12059 -
(hide annotations)
(download)
Tue Aug 21 21:15:19 2018 UTC (5 years, 10 months ago) by niro
File size: 6438 byte(s)
Tue Aug 21 21:15:19 2018 UTC (5 years, 10 months ago) by niro
File size: 6438 byte(s)
auto added: ver bump to 048-r1
1 | niro | 12059 | # $Id$ |
2 | |||
3 | PNAME="dracut" | ||
4 | PVER="048" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="sys-apps" | ||
8 | |||
9 | DESCRIPTION="Initramfs generator using udev which fully replaces mkinitrd." | ||
10 | HOMEPAGE="https://dracut.wiki.kernel.org/" | ||
11 | |||
12 | DEPEND=">= app-shells/bash-4.2 | ||
13 | >= virtual/bzip2 | ||
14 | >= virtual/gzip | ||
15 | >= virtual/xz-utils | ||
16 | >= virtual/cpio | ||
17 | >= virtual/tar | ||
18 | >= sys-apps/coreutils-8.22 | ||
19 | >= sys-apps/findutils-4.4 | ||
20 | >= virtual/grep | ||
21 | >= virtual/kbd | ||
22 | >= virtual/procps | ||
23 | >= virtual/module-tools | ||
24 | >= virtual/sed | ||
25 | >= virtual/eject | ||
26 | >= sys-apps/util-linux-2.27 | ||
27 | >= sys-apps/plymouth-0.8.8 | ||
28 | >= sys-apps/grubby-8.35 | ||
29 | >= sys-fs/device-mapper-2.02.111 | ||
30 | >= sys-fs/udev-230 | ||
31 | >= sys-apps/kmod-23 | ||
32 | >= sys-apps/systemd-230" | ||
33 | # >= sys-fs/lvm2-2.02.111 | ||
34 | |||
35 | PROVIDE="virtual/initramfs-tools" | ||
36 | |||
37 | SDEPEND=">= app-text/docbook-xml-dtd-9 | ||
38 | >= app-text/docbook-xml-dtd-9 | ||
39 | >= app-text/asciidoc-8.6 | ||
40 | >= sys-apps/util-linux-dev-2.25 | ||
41 | >= sys-fs/udev-dev-230 | ||
42 | >= sys-apps/kmod-dev-23 | ||
43 | >= sys-apps/systemd-dev-230" | ||
44 | |||
45 | SRCFILE="${PNAME}-${PVER}.tar.xz" | ||
46 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
47 | |||
48 | ALX_PKG_KEEP="etc/dracut.conf | ||
49 | etc/dracut.conf.d | ||
50 | usr/lib/dracut/dracut-install | ||
51 | usr/lib/dracut/dracut-logger.sh | ||
52 | usr/lib/dracut/dracut-functions | ||
53 | usr/lib/dracut/dracut-functions.sh | ||
54 | usr/lib/dracut/dracut-initramfs-restore | ||
55 | usr/lib/dracut/dracut-version.sh | ||
56 | usr/lib/kernel/install.d/50-dracut.install | ||
57 | usr/lib/kernel/install.d/51-dracut-rescue.install | ||
58 | usr/lib/dracut/dracut-init.sh | ||
59 | usr/lib/dracut/skipcpio | ||
60 | usr/lib/dracut/modules.d/00bash | ||
61 | usr/lib/dracut/modules.d/00systemd | ||
62 | usr/lib/dracut/modules.d/01systemd-initrd | ||
63 | usr/lib/dracut/modules.d/02systemd-networkd | ||
64 | usr/lib/dracut/modules.d/05busybox | ||
65 | usr/lib/dracut/modules.d/10i18n | ||
66 | usr/lib/dracut/modules.d/30convertfs | ||
67 | usr/lib/dracut/modules.d/40network | ||
68 | usr/lib/dracut/modules.d/45ifcfg | ||
69 | usr/lib/dracut/modules.d/45url-lib | ||
70 | usr/lib/dracut/modules.d/50drm | ||
71 | usr/lib/dracut/modules.d/50plymouth | ||
72 | usr/lib/dracut/modules.d/90dm | ||
73 | usr/lib/dracut/modules.d/90dmsquash-live | ||
74 | usr/lib/dracut/modules.d/90kernel-network-modules | ||
75 | usr/lib/dracut/modules.d/90kernel-modules | ||
76 | usr/lib/dracut/modules.d/95dasd | ||
77 | usr/lib/dracut/modules.d/95dasd_mod | ||
78 | usr/lib/dracut/modules.d/95dasd_rules | ||
79 | usr/lib/dracut/modules.d/95fstab-sys | ||
80 | usr/lib/dracut/modules.d/95resume | ||
81 | usr/lib/dracut/modules.d/95rootfs-block | ||
82 | usr/lib/dracut/modules.d/95terminfo | ||
83 | usr/lib/dracut/modules.d/95udev-rules | ||
84 | usr/lib/dracut/modules.d/98dracut-systemd | ||
85 | usr/lib/dracut/modules.d/98pollcdrom | ||
86 | usr/lib/dracut/modules.d/98syslog | ||
87 | usr/lib/dracut/modules.d/98usrmount | ||
88 | usr/lib/dracut/modules.d/99base | ||
89 | usr/lib/dracut/modules.d/99fs-lib | ||
90 | usr/lib/dracut/modules.d/99img-lib | ||
91 | usr/lib/dracut/modules.d/99shutdown | ||
92 | usr/lib/systemd | ||
93 | usr/bin/dracut | ||
94 | usr/bin/dracut-catimages | ||
95 | usr/bin/lsinitrd | ||
96 | usr/bin/mkinitrd | ||
97 | var/initramfs | ||
98 | var/log/dracut.log" | ||
99 | # not supported with alx | ||
100 | # usr/lib/dracut/modules.d/90dmraid | ||
101 | # usr/lib/dracut/modules.d/90mdraid | ||
102 | # usr/lib/dracut/modules.d/90multipath | ||
103 | # usr/lib/dracut/modules.d/97biosdevname | ||
104 | |||
105 | sminclude mbuild mtools systemd cleanutils alx-split | ||
106 | msetfeature "!check" | ||
107 | |||
108 | # += to add injection files (alx.sminc) | ||
109 | SRC_URI+=( | ||
110 | http://www.kernel.org/pub/linux/utils/boot/${PNAME}/${SRCFILE} | ||
111 | mirror://${PNAME}/${SRCFILE} | ||
112 | mirror://${PNAME}/${PNAME}-047-magellan.patch | ||
113 | mirror://${PNAME}/${PNAME}-036-mkinitrd-ignore-allow-missing-switch.patch | ||
114 | mirror://${PNAME}/${PNAME}-019-convertfs-make-selinux-optional.patch | ||
115 | mirror://${PNAME}/${PNAME}-047-network-support-udhcpc-dhcpcd.patch | ||
116 | mirror://${PNAME}/${PNAME}-047-busybox.patch | ||
117 | mirror://${PNAME}/${PNAME}-037-alx-busybox-install-method.patch | ||
118 | ) | ||
119 | |||
120 | UP2DATE="updatecmd http://www.kernel.org/pub/linux/utils/boot/${PNAME} | highesttarball xz" | ||
121 | |||
122 | src_prepare() | ||
123 | { | ||
124 | munpack ${SRCFILE} || die | ||
125 | cd ${SRCDIR} | ||
126 | |||
127 | # magellan compat patch | ||
128 | mpatch ${PNAME}-047-magellan.patch || die | ||
129 | |||
130 | # for better mkinitrd compat and to fully support new-kernel-pkg | ||
131 | # as drop-in replacement ignore the --allow-missing switch | ||
132 | mpatch ${PNAME}-036-mkinitrd-ignore-allow-missing-switch.patch || die | ||
133 | |||
134 | # make selinux optional, we do not use it yet | ||
135 | mpatch ${PNAME}-019-convertfs-make-selinux-optional.patch || die | ||
136 | |||
137 | # add support for dhcpcd and udhcpc in the network module | ||
138 | mpatch ${PNAME}-047-network-support-udhcpc-dhcpcd.patch || die | ||
139 | |||
140 | # be compatible with busybox cmds | ||
141 | mpatch ${PNAME}-047-busybox.patch || die | ||
142 | |||
143 | # install the busybox module with the alx method via busybox.links file | ||
144 | mpatch ${PNAME}-037-alx-busybox-install-method.patch || die | ||
145 | |||
146 | # remove gentoo specific modules | ||
147 | rm -rf modules.d/50gensplash || die | ||
148 | # remove rpm-bases specific modules | ||
149 | rm -rf modules.d/10rpmversion || die | ||
150 | # systemd-bootchart works better | ||
151 | rm -rf modules.d/00bootchart || die | ||
152 | # no dash support anymore | ||
153 | rm -rf modules.d/00dash || die | ||
154 | |||
155 | # fix plymouth libexecdir | ||
156 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/plymouth:g" \ | ||
157 | modules.d/50plymouth/module-setup.sh || die | ||
158 | |||
159 | # fix plymouth logo | ||
160 | local plymouth_logo=/usr/share/plymouth/magellan-logo.png | ||
161 | sed -i "s:^\(PLYMOUTH_LOGO_FILE=\).*:\1\"${plymouth_logo}\":" \ | ||
162 | modules.d/50plymouth/plymouth-populate-initrd.sh || die | ||
163 | |||
164 | # fix qemu libexecdir | ||
165 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/qemu:" test/run-qemu || die | ||
166 | } | ||
167 | |||
168 | src_compile() | ||
169 | { | ||
170 | cd ${SRCDIR} | ||
171 | |||
172 | # always usr /usr/lib as dracut modules dir | ||
173 | mconfigure --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib --systemdsystemunitdir=$(mget-systemd-unit-dir) || die | ||
174 | mmake || die | ||
175 | } | ||
176 | |||
177 | alx_generic_src_install() | ||
178 | { | ||
179 | cd ${SRCDIR} | ||
180 | mmake DESTDIR=${BINDIR} install || die | ||
181 | |||
182 | # fix sometimes broken permissions | ||
183 | mchmod 0755 /usr/lib/dracut/modules.d/40network/\*.sh || die | ||
184 | |||
185 | # needed directories | ||
186 | mkeepdir /var/initramfs || die | ||
187 | mkeepdir /var/log || die | ||
188 | memptyfile /var/log/dracut.log || die | ||
189 | |||
190 | # missing compat symlink | ||
191 | mlink dracut /usr/bin/mkinitrd || die | ||
192 | |||
193 | minstalldocs AUTHORS COPYING HACKING NEWS README* TODO || die | ||
194 | |||
195 | # install busybox-rc compatible config and remove upstream systemd one | ||
196 | echo -e ${COLGREEN}" injecting custom dracut-configs"${COLDEFAULT} | ||
197 | if [ -f ${BINDIR}/etc/dracut.conf.d/01-magellan.conf ] | ||
198 | then | ||
199 | mdelete /etc/dracut.conf.d/01-magellan.conf || die | ||
200 | fi | ||
201 | mcinjectfile 01-alx.conf /etc/dracut.conf.d || die | ||
202 | } | ||
203 | |||
204 | preinstall() | ||
205 | { | ||
206 | if [[ ! -z $(magequery -n mkinitrd) ]] | ||
207 | then | ||
208 | echo -e ${COLRED} | ||
209 | echo -e "Error: sys-apps/mkinitrd is installed!!" | ||
210 | echo -e "dracut will overwrite binaries from sys-apps/mkinitrd and fully replace it." | ||
211 | echo -e "Please uninstall sys-apps/mkinitrd first!" | ||
212 | echo -e ${COLDEFAULT} | ||
213 | die "sys-apps/mkinitrd found!" | ||
214 | fi | ||
215 | |||
216 | add_conf_prot_mask /etc/dracut.conf /etc/dracut.conf.d | ||
217 | } |