1 |
polynomial-c 13/12/23 20:56:21 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: grub-2.02_beta1-r1.ebuild |
5 |
Log: |
6 |
Let grub-mkconfig only use scripts that are executable (bug #494716) |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC) |
9 |
|
10 |
Revision Changes Path |
11 |
1.299 sys-boot/grub/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.299&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.299&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/ChangeLog?r1=1.298&r2=1.299 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v |
20 |
retrieving revision 1.298 |
21 |
retrieving revision 1.299 |
22 |
diff -u -r1.298 -r1.299 |
23 |
--- ChangeLog 19 Dec 2013 14:57:24 -0000 1.298 |
24 |
+++ ChangeLog 23 Dec 2013 20:56:20 -0000 1.299 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for sys-boot/grub |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.298 2013/12/19 14:57:24 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.299 2013/12/23 20:56:20 polynomial-c Exp $ |
30 |
+ |
31 |
+*grub-2.02_beta1-r1 (23 Dec 2013) |
32 |
+ |
33 |
+ 23 Dec 2013; Lars Wendler <polynomial-c@g.o> |
34 |
+ +grub-2.02_beta1-r1.ebuild, |
35 |
+ +files/grub-2.02_beta1-only-use-scripts-that-are-executable.patch: |
36 |
+ Let grub-mkconfig only use scripts that are executable (bug #494716). |
37 |
|
38 |
19 Dec 2013; Mike Gilbert <floppym@g.o> +files/grub.default-3, |
39 |
grub-2.02_beta1.ebuild, grub-9999-r1.ebuild: |
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-boot/grub/grub-2.02_beta1-r1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/grub-2.02_beta1-r1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/grub-2.02_beta1-r1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: grub-2.02_beta1-r1.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2013 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.02_beta1-r1.ebuild,v 1.1 2013/12/23 20:56:20 polynomial-c Exp $ |
53 |
|
54 |
EAPI=5 |
55 |
|
56 |
if [[ ${PV} == 9999 ]]; then |
57 |
AUTOTOOLS_AUTORECONF=1 |
58 |
GRUB_AUTOGEN=1 |
59 |
fi |
60 |
|
61 |
if [[ -n ${GRUB_AUTOGEN} ]]; then |
62 |
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} ) |
63 |
inherit python-any-r1 |
64 |
fi |
65 |
|
66 |
inherit autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils toolchain-funcs versionator |
67 |
|
68 |
if [[ ${PV} != 9999 ]]; then |
69 |
if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then |
70 |
MY_P="${P/_/~}" |
71 |
SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz" |
72 |
S=${WORKDIR}/${MY_P} |
73 |
else |
74 |
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz |
75 |
mirror://gentoo/${P}.tar.xz |
76 |
http://dev.gentoo.org/~floppym/dist/${P}.tar.xz" |
77 |
S=${WORKDIR}/${P%_*} |
78 |
fi |
79 |
KEYWORDS="~amd64 ~x86" |
80 |
PATCHES=( "${FILESDIR}/${P}-only-use-scripts-that-are-executable.patch" ) |
81 |
else |
82 |
inherit git-r3 |
83 |
EGIT_REPO_URI="git://git.sv.gnu.org/grub.git |
84 |
http://git.savannah.gnu.org/r/grub.git" |
85 |
fi |
86 |
|
87 |
DEJAVU=dejavu-sans-ttf-2.34 |
88 |
UNIFONT=unifont-6.3.20131217 |
89 |
SRC_URI+=" truetype? ( |
90 |
mirror://sourceforge/dejavu/${DEJAVU}.zip |
91 |
http://unifoundry.com/pub/${UNIFONT}/${UNIFONT}.pcf.gz |
92 |
)" |
93 |
|
94 |
DESCRIPTION="GNU GRUB boot loader" |
95 |
HOMEPAGE="http://www.gnu.org/software/grub/" |
96 |
|
97 |
# Includes licenses for dejavu and unifont |
98 |
LICENSE="GPL-3 truetype? ( BitstreamVera GPL-2-with-font-exception )" |
99 |
SLOT="2" |
100 |
IUSE="debug device-mapper doc efiemu mount +multislot nls static sdl test truetype libzfs" |
101 |
|
102 |
GRUB_ALL_PLATFORMS=( |
103 |
# everywhere: |
104 |
emu |
105 |
# mips only: |
106 |
qemu-mips yeeloong |
107 |
# amd64, x86, ppc, ppc64: |
108 |
ieee1275 |
109 |
# amd64, x86: |
110 |
coreboot multiboot efi-32 pc qemu |
111 |
# amd64, ia64: |
112 |
efi-64 |
113 |
) |
114 |
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}" |
115 |
|
116 |
REQUIRED_USE="grub_platforms_qemu? ( truetype ) |
117 |
grub_platforms_yeeloong? ( truetype )" |
118 |
|
119 |
# os-prober: Used on runtime to detect other OSes |
120 |
# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue |
121 |
RDEPEND=" |
122 |
app-arch/xz-utils |
123 |
>=sys-libs/ncurses-5.2-r5 |
124 |
debug? ( |
125 |
sdl? ( media-libs/libsdl ) |
126 |
) |
127 |
device-mapper? ( >=sys-fs/lvm2-2.02.45 ) |
128 |
libzfs? ( sys-fs/zfs ) |
129 |
mount? ( sys-fs/fuse ) |
130 |
truetype? ( media-libs/freetype ) |
131 |
ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) |
132 |
ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) |
133 |
" |
134 |
DEPEND="${RDEPEND} |
135 |
${PYTHON_DEPS} |
136 |
app-misc/pax-utils |
137 |
sys-devel/flex |
138 |
sys-devel/bison |
139 |
sys-apps/help2man |
140 |
sys-apps/texinfo |
141 |
static? ( |
142 |
app-arch/xz-utils[static-libs(+)] |
143 |
truetype? ( |
144 |
app-arch/bzip2[static-libs(+)] |
145 |
media-libs/freetype[static-libs(+)] |
146 |
sys-libs/zlib[static-libs(+)] |
147 |
) |
148 |
) |
149 |
test? ( |
150 |
dev-libs/libisoburn |
151 |
app-emulation/qemu |
152 |
) |
153 |
truetype? ( app-arch/unzip ) |
154 |
" |
155 |
RDEPEND+=" |
156 |
kernel_linux? ( |
157 |
grub_platforms_efi-32? ( sys-boot/efibootmgr ) |
158 |
grub_platforms_efi-64? ( sys-boot/efibootmgr ) |
159 |
) |
160 |
!multislot? ( !sys-boot/grub:0 ) |
161 |
" |
162 |
|
163 |
STRIP_MASK="*/grub/*/*.{mod,img}" |
164 |
RESTRICT="test" |
165 |
|
166 |
QA_EXECSTACK=" |
167 |
usr/bin/grub* |
168 |
usr/sbin/grub* |
169 |
usr/lib*/grub/*/*.mod |
170 |
usr/lib*/grub/*/*.module |
171 |
usr/lib*/grub/*/kernel.exec |
172 |
usr/lib*/grub/*/kernel.img |
173 |
" |
174 |
|
175 |
QA_WX_LOAD=" |
176 |
usr/lib*/grub/*/kernel.exec |
177 |
usr/lib*/grub/*/kernel.img |
178 |
usr/lib*/grub/*/*.image |
179 |
" |
180 |
|
181 |
QA_PRESTRIPPED=" |
182 |
usr/lib.*/grub/.*/kernel.img |
183 |
" |
184 |
|
185 |
pkg_pretend() { |
186 |
if [[ ${MERGE_TYPE} != binary ]]; then |
187 |
# Bug 439082 |
188 |
if ! version_is_at_least 4.8 "$(gcc-version)" && |
189 |
$(tc-getLD) --version | grep -q "GNU gold"; then |
190 |
eerror "GRUB does not function correctly when built with the gold linker." |
191 |
eerror "Please select the bfd linker with binutils-config." |
192 |
die "GNU gold detected" |
193 |
fi |
194 |
fi |
195 |
} |
196 |
|
197 |
src_unpack() { |
198 |
if [[ ${PV} == 9999 ]]; then |
199 |
git-r3_src_unpack |
200 |
fi |
201 |
default_src_unpack |
202 |
} |
203 |
|
204 |
src_prepare() { |
205 |
[[ ${PATCHES} ]] && epatch "${PATCHES[@]}" |
206 |
sed -i -e /autoreconf/d autogen.sh || die |
207 |
if use multislot; then |
208 |
# fix texinfo file name, bug 416035 |
209 |
sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die |
210 |
fi |
211 |
epatch_user |
212 |
if [[ -n ${GRUB_AUTOGEN} ]]; then |
213 |
python_setup |
214 |
bash autogen.sh || die |
215 |
fi |
216 |
if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then |
217 |
autopoint() { return 0; } |
218 |
eautoreconf |
219 |
fi |
220 |
} |
221 |
|
222 |
setup_fonts() { |
223 |
ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die |
224 |
ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die |
225 |
} |
226 |
|
227 |
grub_configure() { |
228 |
local platform |
229 |
|
230 |
case ${MULTIBUILD_VARIANT} in |
231 |
efi-32) |
232 |
platform=efi |
233 |
if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then |
234 |
local CTARGET=${CTARGET:-i386} |
235 |
fi ;; |
236 |
efi-64) |
237 |
platform=efi |
238 |
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then |
239 |
local CTARGET=${CTARGET:-x86_64} |
240 |
local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" |
241 |
local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" |
242 |
export TARGET_CFLAGS TARGET_CPPFLAGS |
243 |
fi ;; |
244 |
guessed) ;; |
245 |
*) platform=${MULTIBUILD_VARIANT} ;; |
246 |
esac |
247 |
|
248 |
local myeconfargs=( |
249 |
--disable-werror |
250 |
--program-prefix= |
251 |
--libdir="${EPREFIX}"/usr/lib |
252 |
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html |
253 |
$(use_enable debug mm-debug) |
254 |
$(use_enable debug grub-emu-usb) |
255 |
$(use_enable device-mapper) |
256 |
$(use_enable mount grub-mount) |
257 |
$(use_enable nls) |
258 |
$(use_enable truetype grub-mkfont) |
259 |
$(use_enable libzfs) |
260 |
$(use sdl && use_enable debug grub-emu-sdl) |
261 |
${platform:+--with-platform=}${platform} |
262 |
|
263 |
# Let configure detect this where supported |
264 |
$(usex efiemu '' '--disable-efiemu') |
265 |
) |
266 |
|
267 |
if use multislot; then |
268 |
myeconfargs+=( --program-transform-name="s,grub,grub2," ) |
269 |
fi |
270 |
|
271 |
if use truetype; then |
272 |
mkdir -p "${BUILD_DIR}" || die |
273 |
run_in_build_dir setup_fonts |
274 |
fi |
275 |
|
276 |
autotools-utils_src_configure |
277 |
} |
278 |
|
279 |
src_configure() { |
280 |
# We don't want to leak flags onto boot code. |
281 |
export HOST_CCASFLAGS=${CCASFLAGS} |
282 |
export HOST_CFLAGS=${CFLAGS} |
283 |
export HOST_CPPFLAGS=${CPPFLAGS} |
284 |
export HOST_LDFLAGS=${LDFLAGS} |
285 |
unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS |
286 |
|
287 |
use static && HOST_LDFLAGS+=" -static" |
288 |
|
289 |
if version_is_at_least 4.8 "$(gcc-version)"; then |
290 |
export TARGET_LDFLAGS+=" -fuse-ld=bfd" |
291 |
fi |
292 |
|
293 |
tc-export CC NM OBJCOPY STRIP |
294 |
export TARGET_CC=${TARGET_CC:-${CC}} |
295 |
tc-export BUILD_CC # Bug 485592 |
296 |
|
297 |
# Portage will take care of cleaning up GRUB_PLATFORMS |
298 |
MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} ) |
299 |
multibuild_parallel_foreach_variant grub_configure |
300 |
} |
301 |
|
302 |
src_compile() { |
303 |
# Sandbox bug 404013. |
304 |
use libzfs && addpredict /etc/dfs:/dev/zfs |
305 |
|
306 |
multibuild_foreach_variant autotools-utils_src_compile |
307 |
|
308 |
use doc && multibuild_for_best_variant \ |
309 |
autotools-utils_src_compile -C docs html |
310 |
} |
311 |
|
312 |
src_test() { |
313 |
# The qemu dependency is a bit complex. |
314 |
# You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform. |
315 |
multibuild_foreach_variant autotools-utils_src_test |
316 |
} |
317 |
|
318 |
src_install() { |
319 |
multibuild_foreach_variant autotools-utils_src_install \ |
320 |
bashcompletiondir="$(get_bashcompdir)" |
321 |
|
322 |
use doc && multibuild_for_best_variant run_in_build_dir \ |
323 |
emake -C docs DESTDIR="${D}" install-html |
324 |
|
325 |
if use multislot; then |
326 |
mv "${ED%/}"/usr/share/info/grub{,2}.info || die |
327 |
fi |
328 |
|
329 |
insinto /etc/default |
330 |
newins "${FILESDIR}"/grub.default-3 grub |
331 |
|
332 |
cd "${ED}" || die |
333 |
pax-mark mpes $(scanelf -BF %F usr/{bin,sbin}) |
334 |
} |
335 |
|
336 |
pkg_postinst() { |
337 |
mount-boot_mount_boot_partition |
338 |
|
339 |
if [[ -e "${ROOT%/}/boot/grub2/grub.cfg" && ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then |
340 |
mkdir -p "${ROOT%/}/boot/grub" |
341 |
ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg" |
342 |
fi |
343 |
|
344 |
mount-boot_pkg_postinst |
345 |
|
346 |
elog "For information on how to configure GRUB2 please refer to the guide:" |
347 |
elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start" |
348 |
|
349 |
if has_version 'sys-boot/grub:0'; then |
350 |
elog "A migration guide for GRUB Legacy users is available:" |
351 |
elog " http://www.gentoo.org/doc/en/grub2-migration.xml" |
352 |
fi |
353 |
|
354 |
if [[ -z ${REPLACING_VERSIONS} ]]; then |
355 |
if ! has_version sys-boot/os-prober; then |
356 |
elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig." |
357 |
fi |
358 |
if ! has_version dev-libs/libisoburn; then |
359 |
elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue." |
360 |
fi |
361 |
else |
362 |
local v |
363 |
for v in ${REPLACING_VERSIONS}; do |
364 |
if use multislot && ! version_is_at_least 2.00_p5107-r1 ${v}; then |
365 |
ewarn "The grub directory has changed from /boot/grub2 to /boot/grub." |
366 |
ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg." |
367 |
break |
368 |
fi |
369 |
done |
370 |
fi |
371 |
} |