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