Contents of /smage/trunk/core/dracut/dracut-034-r6.smage2
Parent Directory
|
Revision Log
Revision 5408 -
(show annotations)
(download)
Mon Jan 20 14:49:25 2014 UTC (10 years, 5 months ago) by niro
File size: 6261 byte(s)
Mon Jan 20 14:49:25 2014 UTC (10 years, 5 months ago) by niro
File size: 6261 byte(s)
-keep the network module
1 | # $Id$ |
2 | |
3 | PNAME="dracut" |
4 | PVER="034" |
5 | PBUILD="r6" |
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 | >= app-arch/cpio-2.11 |
17 | >= virtual/tar |
18 | >= sys-apps/coreutils-8.12 |
19 | >= sys-apps/findutils-4.4 |
20 | >= virtual/grep |
21 | >= virtual/kbd |
22 | >= virtual/module-tools |
23 | >= virtual/sed |
24 | >= virtual/eject |
25 | >= sys-apps/util-linux-2.19 |
26 | >= sys-apps/v86d-0.1.9 |
27 | >= sys-apps/plymouth-0.8.5 |
28 | >= sys-apps/grubby-8 |
29 | >= sys-fs/device-mapper-2.02.85 |
30 | >= sys-fs/udev-208 |
31 | >= virtual/sysvinit-tools" |
32 | |
33 | PROVIDE="virtual/initramfs-tools" |
34 | |
35 | SDEPEND=">= app-text/docbook-xml-dtd-9 |
36 | >= app-text/docbook-xml-dtd-9 |
37 | >= app-text/asciidoc-8.6" |
38 | |
39 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
40 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
41 | |
42 | ALX_PKG_KEEP="etc/dracut.conf |
43 | etc/dracut.conf.d |
44 | usr/lib/dracut/dracut-install |
45 | usr/lib/dracut/dracut-logger.sh |
46 | usr/lib/dracut/dracut-functions |
47 | usr/lib/dracut/dracut-functions.sh |
48 | usr/lib/dracut/dracut-initramfs-restore |
49 | usr/lib/dracut/dracut-version.sh |
50 | usr/lib/dracut/modules.d/05busybox |
51 | usr/lib/dracut/modules.d/10i18n |
52 | usr/lib/dracut/modules.d/30convertfs |
53 | usr/lib/dracut/modules.d/40uvesafb |
54 | usr/lib/dracut/modules.d/40network |
55 | usr/lib/dracut/modules.d/45url-lib |
56 | usr/lib/dracut/modules.d/50drm |
57 | usr/lib/dracut/modules.d/50plymouth |
58 | usr/lib/dracut/modules.d/90dm |
59 | usr/lib/dracut/modules.d/90dmsquash-live |
60 | usr/lib/dracut/modules.d/90dmraid |
61 | usr/lib/dracut/modules.d/90kernel-modules |
62 | usr/lib/dracut/modules.d/90mdraid |
63 | usr/lib/dracut/modules.d/90multipath |
64 | usr/lib/dracut/modules.d/95dasd |
65 | usr/lib/dracut/modules.d/95dasd_mod |
66 | usr/lib/dracut/modules.d/95fstab-sys |
67 | usr/lib/dracut/modules.d/95resume |
68 | usr/lib/dracut/modules.d/95rootfs-block |
69 | usr/lib/dracut/modules.d/95terminfo |
70 | usr/lib/dracut/modules.d/95udev-rules |
71 | usr/lib/dracut/modules.d/97biosdevname |
72 | usr/lib/dracut/modules.d/98pollcdrom |
73 | usr/lib/dracut/modules.d/98syslog |
74 | usr/lib/dracut/modules.d/98systemd |
75 | usr/lib/dracut/modules.d/98usrmount |
76 | usr/lib/dracut/modules.d/99base |
77 | usr/lib/dracut/modules.d/99fs-lib |
78 | usr/lib/dracut/modules.d/99img-lib |
79 | usr/lib/dracut/modules.d/99shutdown |
80 | usr/lib/systemd |
81 | usr/bin/dracut |
82 | usr/bin/dracut-catimages |
83 | usr/bin/lsinitrd |
84 | usr/bin/mkinitrd |
85 | var/initramfs |
86 | var/log/dracut.log" |
87 | sminclude mbuild mtools systemd cleanutils alx-split |
88 | msetfeature "!check" |
89 | |
90 | SRC_URI=( |
91 | http://www.kernel.org/pub/linux/utils/boot/${PNAME}/${SRCFILE} |
92 | mirror://${PNAME}/${SRCFILE} |
93 | mirror://${PNAME}/${PNAME}-034-wait_for_if_up-wait-for-state-up.patch |
94 | mirror://${PNAME}/${PNAME}-034-iface_has_link-fixup.patch |
95 | mirror://${PNAME}/${PNAME}-034-before-doing-dhcp-check-if-the-link-has-a-carrier.patch |
96 | mirror://${PNAME}/${PNAME}-033-magellan-3.patch |
97 | mirror://${PNAME}/${PNAME}-024-add-uvesafb-module.patch |
98 | mirror://${PNAME}/${PNAME}-023-mkinitrd-ignore-allow-missing-switch-2.patch |
99 | mirror://${PNAME}/${PNAME}-019-convertfs-make-selinux-optional.patch |
100 | mirror://${PNAME}/${PNAME}-034-network-support-udhcpc-dhcpcd-2.patch |
101 | mirror://${PNAME}/${PNAME}-033-busybox.patch |
102 | mirror://${PNAME}/${PNAME}-034-alx-busybox-install-method.patch |
103 | ) |
104 | |
105 | UP2DATE="updatecmd http://www.kernel.org/pub/linux/utils/boot/${PNAME} | lasttarball" |
106 | |
107 | src_prepare() |
108 | { |
109 | munpack ${SRCFILE} || die |
110 | cd ${SRCDIR} |
111 | |
112 | # upstream network fixes |
113 | mpatch ${PNAME}-034-wait_for_if_up-wait-for-state-up.patch || die |
114 | mpatch ${PNAME}-034-iface_has_link-fixup.patch || die |
115 | mpatch ${PNAME}-034-before-doing-dhcp-check-if-the-link-has-a-carrier.patch || die |
116 | |
117 | # magellan compat patch |
118 | mpatch ${PNAME}-033-magellan-3.patch || die |
119 | |
120 | # add uvesafb module to run v86d inside the initrd (default off) |
121 | mpatch ${PNAME}-024-add-uvesafb-module.patch || die |
122 | |
123 | # for better mkinitrd compat and to fully support new-kernel-pkg |
124 | # as drop-in replacement ignore the --allow-missing switch |
125 | mpatch ${PNAME}-023-mkinitrd-ignore-allow-missing-switch-2.patch || die |
126 | |
127 | # make selinux optional, we do not use it yet |
128 | mpatch ${PNAME}-019-convertfs-make-selinux-optional.patch || die |
129 | |
130 | # add support for dhcpcd and udhcpc in the network module |
131 | mpatch ${PNAME}-034-network-support-udhcpc-dhcpcd-2.patch || die |
132 | |
133 | # be compatible with busybox cmds |
134 | mpatch ${PNAME}-033-busybox.patch || die |
135 | |
136 | # install the busybox module with the alx method via busybox.links file |
137 | mpatch ${PNAME}-034-alx-busybox-install-method.patch || die |
138 | |
139 | # remove gentoo specific modules |
140 | rm -rf modules.d/50gensplash || die |
141 | # remove rpm-bases specific modules |
142 | rm -rf modules.d/10rpmversion || die |
143 | # systemd-bootchart works better |
144 | rm -rf modules.d/00bootchart || die |
145 | # no dash support anymore |
146 | rm -rf modules.d/00dash || die |
147 | |
148 | # fix plymouth libexecdir |
149 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/plymouth:" \ |
150 | modules.d/50plymouth/module-setup.sh || die |
151 | |
152 | # fix plymouth logo |
153 | local plymouth_logo=/usr/share/plymouth/magellan-logo.png |
154 | sed -i "s:^\(PLYMOUTH_LOGO_FILE=\).*:\1\"${plymouth_logo}\":" \ |
155 | modules.d/50plymouth/plymouth-populate-initrd.sh || die |
156 | |
157 | # fix qemu libexecdir |
158 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/qemu:" test/run-qemu || die |
159 | } |
160 | |
161 | src_compile() |
162 | { |
163 | cd ${SRCDIR} |
164 | mmake || die |
165 | } |
166 | |
167 | alx_generic_src_install() |
168 | { |
169 | cd ${SRCDIR} |
170 | mmake DESTDIR=${BINDIR} sysconfdir=/etc sbindir=/usr/bin systemdsystemunitdir=$(mget-systemd-unit-dir) install || die |
171 | |
172 | # needed directories |
173 | mkeepdir /var/initramfs || die |
174 | mkeepdir /var/log || die |
175 | memptyfile /var/log/dracut.log || die |
176 | |
177 | # missing compat symlink |
178 | mlink dracut /usr/bin/mkinitrd || die |
179 | |
180 | minstalldocs AUTHORS COPYING HACKING NEWS README* TODO || die |
181 | |
182 | # install busybox-rc compatible config and remove upstream systemd one |
183 | echo -e ${COLGREEN}" injecting custom dracut-configs"${COLDEFAULT} |
184 | if [ -f ${BINDIR}/etc/dracut.conf.d/01-magellan.conf ] |
185 | then |
186 | mdelete /etc/dracut.conf.d/01-magellan.conf || die |
187 | fi |
188 | mcinjectfile 01-alx.conf /etc/dracut.conf.d || die |
189 | } |
190 | |
191 | preinstall() |
192 | { |
193 | if [[ ! -z $(magequery -n mkinitrd) ]] |
194 | then |
195 | echo -e ${COLRED} |
196 | echo -e "Error: sys-apps/mkinitrd is installed!!" |
197 | echo -e "dracut will overwrite binaries from sys-apps/mkinitrd and fully replace it." |
198 | echo -e "Please uninstall sys-apps/mkinitrd first!" |
199 | echo -e ${COLDEFAULT} |
200 | die "sys-apps/mkinitrd found!" |
201 | fi |
202 | |
203 | add_conf_prot_mask /etc/dracut.conf /etc/dracut.conf.d |
204 | } |