Gentoo Archives: gentoo-commits

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