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