Bug 958524 - pygrub can't cope with extra double or single quotes in menuentry statements
Summary: pygrub can't cope with extra double or single quotes in menuentry statements
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xen
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michael Young
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-01 18:14 UTC by Ahmon Dancy
Modified: 2013-05-27 03:26 UTC (History)
4 users (show)

Fixed In Version: xen-4.2.2-5.fc19
Clone Of:
Environment:
Last Closed: 2013-05-27 00:29:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ahmon Dancy 2013-05-01 18:14:36 UTC
Description of problem:

pygrub does not properly handle a grub2-style grub.cfg with menuentry statements that contain a quote character outside of the two surrounding the title.  For example, it malfunctions w/ the following menuentry (which was created automatically the last time I upgraded the guest's kernel package via yum):

menuentry 'Fedora (3.8.8-100.fc17.i686.PAE)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-fc2d9f6c-3e6c-47a2-b767-2\
8b45d46fc6f' {


The problem is due to the regular expression in GrubConf.py:

          title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)

The greedy matching of .* is too aggressive.  If I change the .* to non-greedy matching (by adding a ? after it), it works properly again:

          title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)

Version-Release number of selected component (if applicable):

xen-runtime-4.1.4-6.fc17.x86_64


More information available upon request.   I think this is an important bug because it prevent my virtual machine from starting up and it took a long time to track down the issue.  Let's save others the downtime.

Comment 1 Fedora Update System 2013-05-15 21:03:14 UTC
xen-4.2.2-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/xen-4.2.2-4.fc19

Comment 2 Fedora Update System 2013-05-15 21:32:25 UTC
xen-4.2.2-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/xen-4.2.2-4.fc18

Comment 3 Fedora Update System 2013-05-15 22:09:56 UTC
xen-4.1.5-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/xen-4.1.5-3.fc17

Comment 4 Fedora Update System 2013-05-16 17:23:40 UTC
Package xen-4.2.2-4.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xen-4.2.2-4.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-8369/xen-4.2.2-4.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-05-17 20:30:37 UTC
xen-4.2.2-5.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/xen-4.2.2-5.fc19

Comment 6 Fedora Update System 2013-05-17 21:11:01 UTC
xen-4.2.2-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/xen-4.2.2-5.fc18

Comment 7 Fedora Update System 2013-05-17 21:54:46 UTC
xen-4.1.5-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/xen-4.1.5-4.fc17

Comment 8 Fedora Update System 2013-05-27 00:29:42 UTC
xen-4.1.5-4.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-05-27 00:30:23 UTC
xen-4.2.2-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-05-27 03:26:27 UTC
xen-4.2.2-5.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.