Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/
Date: Mon, 15 Apr 2019 16:14:24
Message-Id: 1555343655.7b6f7d86b31bfc401614c2d6a2e3c9808559c5be.floppym@gentoo
1 commit: 7b6f7d86b31bfc401614c2d6a2e3c9808559c5be
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 15 15:50:47 2019 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 15 15:54:15 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b6f7d86
7
8 sys-boot/grub: bump to 2.04_rc1
9
10 Package-Manager: Portage-2.3.62_p4, Repoman-2.3.12_p87
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 sys-boot/grub/Manifest | 1 +
14 sys-boot/grub/grub-2.04_rc1.ebuild | 309 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 310 insertions(+)
16
17 diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
18 index 6dca1dcd23a..a4e5b75373b 100644
19 --- a/sys-boot/grub/Manifest
20 +++ b/sys-boot/grub/Manifest
21 @@ -1,4 +1,5 @@
22 DIST dejavu-sans-ttf-2.37.zip 417746 BLAKE2B c8904f3cd5a49370a7dc10e456684c88aeae998a99090bf4d0a5baa4f36cc8fb8f70586cf6d610a5ffeee97261d28c80f55bbe9dcfc3ed796d5c2d60e79adb58 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae
23 DIST grub-2.02.tar.xz 6113260 BLAKE2B 7c5ec61a8dc5a00e9cdc91c489f0d2ee37cd7e673eef8e8e26bbc18c5ec28829f563b9298874fb96d45a5d523ce366e936649c21ebda7462afda0cc328b970ce SHA512 cc6eb0a42b5c8df2f671cc128ff725afb3ff1f8832a196022e433cf0d3b75decfca2316d0aa5fabea75747d55e88f3d021dd93508563f8ca80fd7b9e7fe1f088
24 +DIST grub-2.04~rc1.tar.xz 6422420 BLAKE2B cf189fea32badba00051734d4e67954009bae016a6b8a366ce41a2ac8ddf8792e2b63262c0a80f1fa5771394ebc76b090f50eac1ccd9f81d594feb8cc15ab400 SHA512 c0bee6a7aced0408d7477fdb8b6fdd3ec48f80f0ecc4e7602d76f9a37081fe08e405faa030b4e4f181f45793641b13f398fe0bed121058ad8729f9a8908703d3
25 DIST unifont-12.0.01.pcf.gz 1360857 BLAKE2B ab87e58aee2295e52dc49b7bb131793ad775abbf49f4b64758045a9b5158e75afd01a8425b56e6f6d0ba288a733bf426df363c1ecc78daddec516c33d461bc3b SHA512 9d34a005dd10f212e43075beb71eb39b9cc3403ae1cddec7d79af91b3a3a1beb4a3696075cc94563c8402efe2ad05de552ace77a24da09f1c0b7f95e99b056a3
26 DIST unifont-9.0.06.pcf.gz 1360354 BLAKE2B 09b96e1711c729ef159d62e3ea7b289ca2d01dc0ea417e35a18b73dc02a23f62ce7821d9761bceee4002d9eeaabd91cfb69bbacc6fbdfdfa00445d18fe8f1d66 SHA512 dd0a1afa72f5204c62055d83f22750c74af38ffafdb8eda8e1f1cf7292e572a14969b8a9a6a2cb336d5bed4ab633f6b5a962c59117a590e4238788959cb82774
27
28 diff --git a/sys-boot/grub/grub-2.04_rc1.ebuild b/sys-boot/grub/grub-2.04_rc1.ebuild
29 new file mode 100644
30 index 00000000000..1a043112525
31 --- /dev/null
32 +++ b/sys-boot/grub/grub-2.04_rc1.ebuild
33 @@ -0,0 +1,309 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +if [[ ${PV} == 9999 ]]; then
40 + GRUB_AUTORECONF=1
41 + GRUB_BOOTSTRAP=1
42 +fi
43 +
44 +if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then
45 + PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5,3_6} )
46 + inherit python-any-r1
47 +fi
48 +
49 +if [[ -n ${GRUB_AUTORECONF} ]]; then
50 + WANT_LIBTOOL=none
51 + inherit autotools
52 +fi
53 +
54 +inherit bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs
55 +
56 +if [[ ${PV} != 9999 ]]; then
57 + if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
58 + # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
59 + MY_P=${P/_/'~'}
60 + SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
61 + S=${WORKDIR}/${MY_P}
62 + else
63 + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
64 + S=${WORKDIR}/${P%_*}
65 + fi
66 + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
67 +else
68 + inherit git-r3
69 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git"
70 +fi
71 +
72 +PATCHES=(
73 + "${FILESDIR}"/gfxpayload.patch
74 + "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
75 +)
76 +
77 +DEJAVU=dejavu-sans-ttf-2.37
78 +UNIFONT=unifont-12.0.01
79 +SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
80 + themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
81 +
82 +DESCRIPTION="GNU GRUB boot loader"
83 +HOMEPAGE="https://www.gnu.org/software/grub/"
84 +
85 +# Includes licenses for dejavu and unifont
86 +LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )"
87 +SLOT="2/${PVR}"
88 +IUSE="debug device-mapper doc efiemu +fonts mount nls static sdl test +themes truetype libzfs"
89 +
90 +GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 )
91 +IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
92 +
93 +REQUIRED_USE="
94 + grub_platforms_coreboot? ( fonts )
95 + grub_platforms_qemu? ( fonts )
96 + grub_platforms_ieee1275? ( fonts )
97 + grub_platforms_loongson? ( fonts )
98 +"
99 +
100 +BDEPEND="
101 + ${PYTHON_DEPS}
102 + app-misc/pax-utils
103 + sys-devel/flex
104 + sys-devel/bison
105 + sys-apps/help2man
106 + sys-apps/texinfo
107 + fonts? (
108 + media-libs/freetype:2
109 + virtual/pkgconfig
110 + )
111 + test? (
112 + app-admin/genromfs
113 + app-arch/cpio
114 + app-arch/lzop
115 + app-emulation/qemu
116 + dev-libs/libisoburn
117 + sys-apps/miscfiles
118 + sys-block/parted
119 + sys-fs/squashfs-tools
120 + )
121 + themes? (
122 + app-arch/unzip
123 + media-libs/freetype:2
124 + virtual/pkgconfig
125 + )
126 + truetype? ( virtual/pkgconfig )
127 +"
128 +COMMON_DEPEND="
129 + app-arch/xz-utils
130 + >=sys-libs/ncurses-5.2-r5:0=
131 + debug? (
132 + sdl? ( media-libs/libsdl )
133 + )
134 + device-mapper? ( >=sys-fs/lvm2-2.02.45 )
135 + libzfs? ( sys-fs/zfs )
136 + mount? ( sys-fs/fuse:0 )
137 + truetype? ( media-libs/freetype:2= )
138 + ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
139 + ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
140 + grub_platforms_xen? ( app-emulation/xen-tools:= )
141 + grub_platforms_xen-32? ( app-emulation/xen-tools:= )
142 +"
143 +DEPEND="${COMMON_DEPEND}
144 + static? (
145 + app-arch/xz-utils[static-libs(+)]
146 + truetype? (
147 + app-arch/bzip2[static-libs(+)]
148 + media-libs/freetype[static-libs(+)]
149 + sys-libs/zlib[static-libs(+)]
150 + virtual/pkgconfig
151 + )
152 + )
153 +"
154 +RDEPEND="${COMMON_DEPEND}
155 + kernel_linux? (
156 + grub_platforms_efi-32? ( sys-boot/efibootmgr )
157 + grub_platforms_efi-64? ( sys-boot/efibootmgr )
158 + )
159 + !sys-boot/grub:0 !sys-boot/grub-static
160 + nls? ( sys-devel/gettext )
161 +"
162 +
163 +RESTRICT="strip !test? ( test )"
164 +
165 +QA_EXECSTACK="usr/bin/grub*-emu* usr/lib/grub/*"
166 +QA_WX_LOAD="usr/lib/grub/*"
167 +QA_MULTILIB_PATHS="usr/lib/grub/.*"
168 +
169 +src_unpack() {
170 + if [[ ${PV} == 9999 ]]; then
171 + git-r3_src_unpack
172 + pushd "${P}" >/dev/null || die
173 + local GNULIB_URI="https://git.savannah.gnu.org/git/gnulib.git"
174 + local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo "${GNULIB_REVISION}")
175 + git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}"
176 + git-r3_checkout "${GNULIB_URI}" gnulib
177 + popd >/dev/null || die
178 + fi
179 + default
180 +}
181 +
182 +src_prepare() {
183 + default
184 +
185 + sed -i -e /autoreconf/d autogen.sh || die
186 +
187 + # Nothing in Gentoo packages 'american-english' in the exact path
188 + # wanted for the test, but all that is needed is a compressible text
189 + # file, and we do have 'words' from miscfiles in the same path.
190 + sed -i \
191 + -e '/CFILESSRC.*=/s,american-english,words,' \
192 + tests/util/grub-fs-tester.in \
193 + || die
194 +
195 + if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then
196 + python_setup
197 + fi
198 +
199 + if [[ -n ${GRUB_BOOTSTRAP} ]]; then
200 + eautopoint --force
201 + AUTOPOINT=: AUTORECONF=: ./bootstrap || die
202 + elif [[ -n ${GRUB_AUTOGEN} ]]; then
203 + ./autogen.sh || die
204 + fi
205 +
206 + if [[ -n ${GRUB_AUTORECONF} ]]; then
207 + eautoreconf
208 + fi
209 +}
210 +
211 +grub_do() {
212 + multibuild_foreach_variant run_in_build_dir "$@"
213 +}
214 +
215 +grub_do_once() {
216 + multibuild_for_best_variant run_in_build_dir "$@"
217 +}
218 +
219 +grub_configure() {
220 + local platform
221 +
222 + case ${MULTIBUILD_VARIANT} in
223 + efi*) platform=efi ;;
224 + xen*) platform=xen ;;
225 + guessed) ;;
226 + *) platform=${MULTIBUILD_VARIANT} ;;
227 + esac
228 +
229 + case ${MULTIBUILD_VARIANT} in
230 + *-32)
231 + if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
232 + local CTARGET=i386
233 + fi ;;
234 + *-64)
235 + if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
236 + local CTARGET=x86_64
237 + local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
238 + local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
239 + fi ;;
240 + esac
241 +
242 + local myeconfargs=(
243 + --disable-werror
244 + --program-prefix=
245 + --libdir="${EPREFIX}"/usr/lib
246 + --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
247 + $(use_enable debug mm-debug)
248 + $(use_enable device-mapper)
249 + $(use_enable mount grub-mount)
250 + $(use_enable nls)
251 + $(use_enable themes grub-themes)
252 + $(use_enable truetype grub-mkfont)
253 + $(use_enable libzfs)
254 + $(use sdl && use_enable debug grub-emu-sdl)
255 + ${platform:+--with-platform=}${platform}
256 +
257 + # Let configure detect this where supported
258 + $(usex efiemu '' '--disable-efiemu')
259 + )
260 +
261 + if use fonts; then
262 + ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
263 + fi
264 +
265 + if use themes; then
266 + ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
267 + fi
268 +
269 + local ECONF_SOURCE="${S}"
270 + econf "${myeconfargs[@]}"
271 +}
272 +
273 +src_configure() {
274 + # Bug 508758.
275 + replace-flags -O3 -O2
276 +
277 + # We don't want to leak flags onto boot code.
278 + export HOST_CCASFLAGS=${CCASFLAGS}
279 + export HOST_CFLAGS=${CFLAGS}
280 + export HOST_CPPFLAGS=${CPPFLAGS}
281 + export HOST_LDFLAGS=${LDFLAGS}
282 + unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
283 +
284 + use static && HOST_LDFLAGS+=" -static"
285 +
286 + tc-ld-disable-gold #439082 #466536 #526348
287 + export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
288 + unset LDFLAGS
289 +
290 + tc-export CC NM OBJCOPY RANLIB STRIP
291 + tc-export BUILD_CC # Bug 485592
292 +
293 + MULTIBUILD_VARIANTS=()
294 + local p
295 + for p in "${GRUB_ALL_PLATFORMS[@]}"; do
296 + use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" )
297 + done
298 + [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed )
299 + grub_do grub_configure
300 +}
301 +
302 +src_compile() {
303 + # Sandbox bug 404013.
304 + use libzfs && addpredict /etc/dfs:/dev/zfs
305 +
306 + grub_do emake
307 + use doc && grub_do_once emake -C docs html
308 +}
309 +
310 +src_test() {
311 + # The qemu dependency is a bit complex.
312 + # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
313 + grub_do emake check
314 +}
315 +
316 +src_install() {
317 + grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)"
318 + use doc && grub_do_once emake -C docs install-html DESTDIR="${D}"
319 +
320 + einstalldocs
321 +
322 + insinto /etc/default
323 + newins "${FILESDIR}"/grub.default-3 grub
324 +}
325 +
326 +pkg_postinst() {
327 + elog "For information on how to configure GRUB2 please refer to the guide:"
328 + elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
329 +
330 + if has_version 'sys-boot/grub:0'; then
331 + elog "A migration guide for GRUB Legacy users is available:"
332 + elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
333 + fi
334 +
335 + if [[ -z ${REPLACING_VERSIONS} ]]; then
336 + elog
337 + elog "You may consider installing the following optional packages:"
338 + optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober
339 + optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn
340 + optfeature "Enable RAID device detection" sys-fs/mdadm
341 + fi
342 +}