Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494716 - =sys-boot/grub-2.02_beta1: grub-mkconfig fails when not all expected files are executable
Summary: =sys-boot/grub-2.02_beta1: grub-mkconfig fails when not all expected files ar...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL: http://git.savannah.gnu.org/cgit/grub...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-12-19 07:02 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2013-12-23 20:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
grub-2.02_beta1-test_for_executable_scripts.patch (grub-2.02_beta1-test_for_executable_scripts.patch,466 bytes, patch)
2013-12-19 07:02 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff
0001-grub-mkconfig-only-use-scripts-that-are-executable.patch (0001-grub-mkconfig-only-use-scripts-that-are-executable.patch,1.09 KB, patch)
2013-12-20 07:17 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-12-19 07:02:31 UTC
Created attachment 365652 [details, diff]
grub-2.02_beta1-test_for_executable_scripts.patch

I only use /etc/grub.d/40_custom file to get my grub.cfg created by grub-mkconfig. But since grub-2.02_beta1 this fails:

breakmygentoo:~ # ls -l /etc/grub.d/
total 100
-rw-r--r-- 1 root root  8606 Dec 19 07:50 00_header
-rw-r--r-- 1 root root  6107 Dec 19 07:50 10_hurd
-rw-r--r-- 1 root root  2114 Dec 19 07:50 10_illumos
-rw-r--r-- 1 root root  8374 Dec 19 07:50 10_kfreebsd
-rw-r--r-- 1 root root  9706 Dec 19 07:50 10_linux
-rw-r--r-- 1 root root  6737 Dec 19 07:50 10_netbsd
-rw-r--r-- 1 root root  3481 Dec 19 07:50 10_xnu
-rw-r--r-- 1 root root 10003 Dec 19 07:50 20_linux_xen
-rw-r--r-- 1 root root 10879 Dec 19 07:50 30_os-prober
-rw-r--r-- 1 root root   197 Jul  2  2012 39_memtest86+
-rwxr-xr-x 1 root root  1349 Dec 12 20:22 40_custom*
-rw-r--r-- 1 root root   216 Dec 19 07:50 41_custom
-rw-r--r-- 1 root root   483 Dec 19 07:50 README
breakmygentoo:~ # grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
/usr/sbin/grub-mkconfig: 265: /usr/sbin/grub-mkconfig: /etc/grub.d/00_header: Permission denied
breakmygentoo:~ #


The attached patch fixes this problem.
Comment 1 Mike Gilbert gentoo-dev 2013-12-19 14:43:30 UTC
Thanks for catching this. Could you please submit this upstream?

https://savannah.gnu.org/bugs/?group=grub
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-12-19 17:41:13 UTC
Already sent to grub-devel ml (see URL).
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-12-20 07:17:01 UTC
Created attachment 365738 [details, diff]
0001-grub-mkconfig-only-use-scripts-that-are-executable.patch

Same patch but this time the git-formatted one I sent to upstream.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-12-22 22:20:08 UTC
It's now in their repository (see URL)...
Comment 5 Mike Gilbert gentoo-dev 2013-12-22 23:24:11 UTC
Thanks for the update. Feel free to commit it to the tree if you like; otherwise we will get it in beta2.
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-12-23 20:56:27 UTC
+*grub-2.02_beta1-r1 (23 Dec 2013)
+
+  23 Dec 2013; Lars Wendler <polynomial-c@gentoo.org>
+  +grub-2.02_beta1-r1.ebuild,
+  +files/grub-2.02_beta1-only-use-scripts-that-are-executable.patch:
+  Let grub-mkconfig only use scripts that are executable (bug #494716).
+