Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions debian/.git-dpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# see git-dpm(1) from git-dpm package
71e87f5ac2ffac3705655aecc22f3f872fb603d6
71e87f5ac2ffac3705655aecc22f3f872fb603d6
578bb115fbd47e1c464696f1f8d6183e5443975d
578bb115fbd47e1c464696f1f8d6183e5443975d
grub2_2.04.orig.tar.xz
3ed21de7be5970d7638b9f526bca3292af78e0fc
6393864
signature:d6df202a9bfa89abe2d7f288c1d438197c6f371a:833:grub2_2.04.orig.tar.xz.asc
110 changes: 110 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
*.bash-completion
*.config
*.debhelper*
*.postinst
*.postrm
*.preinst
*.templates
files
grub-common
grub-common.maintscript
grub-coreboot
grub-coreboot*.dirs
grub-coreboot*.install
grub-coreboot*.links
grub-coreboot*.maintscript
grub-coreboot-bin
grub-coreboot-dbg
grub-efi
grub-efi-amd64
grub-efi-amd64*.dirs
grub-efi-amd64*.install
grub-efi-amd64*.links
grub-efi-amd64*.maintscript
grub-efi-amd64-bin
grub-efi-amd64-dbg
grub-efi-amd64-signed-template
grub-efi-arm
grub-efi-arm*.dirs
grub-efi-arm*.install
grub-efi-arm*.links
grub-efi-arm*.maintscript
grub-efi-arm-bin
grub-efi-arm-dbg
grub-efi-arm64
grub-efi-arm64*.dirs
grub-efi-arm64*.install
grub-efi-arm64*.links
grub-efi-arm64*.maintscript
grub-efi-arm64-bin
grub-efi-arm64-dbg
grub-efi-arm64-signed-template
grub-efi-ia32
grub-efi-ia32*.dirs
grub-efi-ia32*.install
grub-efi-ia32*.links
grub-efi-ia32*.maintscript
grub-efi-ia32-bin
grub-efi-ia32-dbg
grub-efi-ia32-signed-template
grub-efi-ia64
grub-efi-ia64*.dirs
grub-efi-ia64*.install
grub-efi-ia64*.links
grub-efi-ia64*.maintscript
grub-efi-ia64-bin
grub-efi-ia64-dbg
grub-emu
grub-emu*.dirs
grub-emu*.install
grub-emu*.links
grub-emu*.maintscript
grub-emu-dbg
grub-extras-enabled
grub-extras/*/conf/*.mk
grub-firmware-qemu
grub-ieee1275
grub-ieee1275*.dirs
grub-ieee1275*.install
grub-ieee1275*.links
grub-ieee1275*.maintscript
grub-ieee1275-bin
grub-ieee1275-dbg
grub-linuxbios
grub-mount-udeb
grub-pc
grub-pc*.dirs
grub-pc*.install
grub-pc*.links
grub-pc*.maintscript
grub-pc-bin
grub-pc-dbg
grub-rescue-pc
grub-theme-starfield
grub-uboot
grub-uboot*.dirs
grub-uboot*.install
grub-uboot*.links
grub-uboot*.maintscript
grub-uboot-bin
grub-uboot-dbg
grub-xen
grub-xen*.dirs
grub-xen*.install
grub-xen*.links
grub-xen*.maintscript
grub-xen-bin
grub-xen-dbg
grub-xen-host
grub-yeeloong
grub-yeeloong*.dirs
grub-yeeloong*.install
grub-yeeloong*.links
grub-yeeloong*.maintscript
grub-yeeloong-bin
grub-yeeloong-dbg
grub2
grub2-common
prep-bootdev
stamps
tmp-*
13 changes: 13 additions & 0 deletions debian/NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
grub2 (1.96+20090609-1) experimental; urgency=low

Before this version, grub-efi was 32bit on i386 and 64bit on amd64.
However, EFI can be 32bit even if you have a 64bit CPU, like in the
first MacBook models with Core 2 Duo released in late 2006. Thus,
grub-efi has been split into grub-efi-amd64 and grub-efi-ia32 which are
available on both amd64 and i386.

If you've experienced problems trying to load grub.efi, please try
again using the package that doesn't match your CPU's architecture.

-- Felix Zielcke <fzielcke@z-51.de> Tue, 09 Jun 2009 19:21:15 +0200

41 changes: 41 additions & 0 deletions debian/README.source
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Git Tree
========

The grub2 packaging is maintained via the grub-team project on Salsa:
https://salsa.debian.org/grub-team

The primary git tree is grub-team/grub. It can be obtained with:

git clone https://salsa.debian.org/grub-team/grub

Git Subtrees
------------

grub.git/debian/grub-extras is maintained using git subtree merges. To
update it to a given commit, first ensure that you have the relevant
upstream remote, e.g.:

git remote add -f grub-extras https://git.sv.gnu.org/git/grub-extras.git

And then:

git subtree merge -P debian/grub-extras <commit>

Git Branches
------------

grub-team/grub uses git-dpm and contains the following branches:

- upstream:

The master branch of the upstream grub.git tree, at the point
corresponding to the current Debian package version.

- master:

The main packaging branch, based on upstream. debian/patches
maintained using git-dpm.

- pristine-tar:

pritine-tar metadata based on upstream (not upstream).
105 changes: 105 additions & 0 deletions debian/apport/source_grub2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# vim: set fileencoding=UTF-8 :
'''apport package hook for grub2

Author: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version. See http://www.gnu.org/copyleft/gpl.html for
the full text of the license.
'''

from __future__ import print_function

import os
import re
import subprocess

from apport.hookutils import (
attach_default_grub,
attach_file,
attach_file_if_exists,
path_to_key,
)


def check_shell_syntax(path):
''' Check the syntax of a shell script '''
try:
with open(os.devnull, 'w') as devnull:
subprocess.check_call(['/bin/sh', '-n', path], stderr=devnull)
except subprocess.CalledProcessError:
return False
return True


def check_shell_syntax_harder(path):
''' Check the syntax of a shell script '''
try:
# sh -n is tempting, but not good enough. Consider this case:
#
# GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash nomodeset”
#
# The quotes are Unicode quotes, not valid in the shell and probably
# caused by copying a line out of a web page. This is parsed as an
# instruction to run the 'splash' command with argument 'nomodeset”'
# and with the GRUB_CMDLINE_LINUX_DEFAULT environment variable set
# to '”quiet'. 'sh -n' allows this because this is a valid parse
# and it's possible that the command 'splash' might exist, but what
# we need to know is whether sourcing the file will fail.
#
# Unfortunately this test may involve executing code. However, this
# file is already sourced as root when running update-grub, so it
# seems unlikely that this could do any further harm.
with open(os.devnull, 'w') as devnull:
subprocess.check_call(
['/bin/sh', '-ec', '. %s' % re.escape(path)], stderr=devnull)
except subprocess.CalledProcessError:
return False
return True


def add_info(report):
if report['ProblemType'] == 'Package':
# To detect if root fs is a loop device
attach_file(report, '/proc/cmdline', 'ProcCmdLine')
attach_default_grub(report, 'EtcDefaultGrub')
attach_file_if_exists(report, '/boot/grub/device.map', 'DeviceMap')
try:
grub_d = '/etc/default/grub.d'
for name in sorted(os.listdir(grub_d)):
if name.endswith('.cfg'):
key = 'EtcDefaultGrubD.' + path_to_key(name)
attach_file_if_exists(
report, os.path.join(grub_d, name), key)
except OSError:
pass

invalid_grub_script = []
if not check_shell_syntax_harder('/etc/default/grub'):
invalid_grub_script.append('/etc/default/grub')

# Check scripts in /etc/grub.d since some users directly change
# configuration there
grubdir = '/etc/grub.d'
for f in os.listdir(grubdir):
fullpath = os.path.join(grubdir, f)
if f != 'README' and os.access(fullpath, os.X_OK) \
and not check_shell_syntax(fullpath):
invalid_grub_script.append(fullpath)
attach_file(report, fullpath)

# TODO: Add some UI to ask if the user modified the invalid script
# and if he still wants to report it
if invalid_grub_script:
report['InvalidGrubScript'] = ' '.join(invalid_grub_script)


if __name__ == '__main__':
r = {}
r['ProblemType'] = 'Package'
add_info(r)
for k, v in r.items():
print('%s: "%s"' % (k, v))
print("========================================")
23 changes: 23 additions & 0 deletions debian/bug-presubj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

MAKE SURE YOU ARE RUNNING THE LATEST VERSION

The grub packages never update the installed version of GRUB
automatically, except if you choose a device in the debconf prompt
`GRUB install devices', which is currently only implemented for grub-pc.

Because of this, you need to make sure you're running the LATEST VERSION of
GRUB before you report a bug. Use grub-install to update it, and then check
if the bug still applies. Debugging problems we already fixed makes us waste
valuable time, so please try to avoid it.

IMPORTANT NOTE WHEN SUBMITTING PATCHES

Like many other FSF projects, GRUB upstream has specific requirements for
accepting patches with regard to copyright assignment. If you're going to
submit a patch, it is likely that it will only be accepted in upstream if you're
willing to submit your paperwork as well.

Because of this, we want to avoid diverging from upstream by adding patches to
the Debian package unless we know the copyright issues can be sorted out. We
encourage you to submit your work to upstream directly by sending a mail to the
GRUB maintainers <grub-devel@gnu.org>.
61 changes: 61 additions & 0 deletions debian/bug-script
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
set -e

if test -e /boot/grub/setup_left_core_image_in_filesystem ; then
echo >&3
echo "*********************** WARNING grub-setup left core.img in filesystem" >&3
fi

for i in /proc/mounts ; do
if test -e $i ; then
echo >&3
echo "*********************** BEGIN $i" >&3
grep ^/dev/ $i >&3
echo "*********************** END $i" >&3
fi
done

for i in /boot/grub/{device.map,grub.cfg} ; do
if ! test -e $i ; then
continue
fi
echo >&3
echo "*********************** BEGIN $i" >&3
if test -r $i ; then
sed $i -e "s/.*password.*/### PASSWORD LINE REMOVED ###/g" >&3
else
echo "$i is not readable by you. Please enter your root password."
echo "Any password line in it gets removed."
su root -c "sed $i -e 's/.*password.*/### PASSWORD LINE REMOVED ###/g'" >&3
fi
echo "*********************** END $i" >&3
done

echo >&3
echo "*********************** BEGIN /proc/mdstat" >&3
cat /proc/mdstat >&3 2>&1 || true
echo "*********************** END /proc/mdstat" >&3

cat <<EOF
Information on any LVM volumes on this system is valuable to the GRUB
developers, but gathering this information requires the root password.
EOF
yesno "Do you want to provide LVM volume information?" nop
if [ "$REPLY" = yep ]; then
echo >&3
echo "*********************** BEGIN LVM" >&3
su root -c "vgdisplay; pvdisplay; lvdisplay" >&3 || true
echo "*********************** END LVM" >&3
fi

echo >&3
echo "*********************** BEGIN /dev/disk/by-id" >&3
ls -l /dev/disk/by-id >&3 2>&1 || true
echo "*********************** END /dev/disk/by-id" >&3

echo >&3
echo "*********************** BEGIN /dev/disk/by-uuid" >&3
ls -l /dev/disk/by-uuid >&3 2>&1 || true
echo "*********************** END /dev/disk/by-uuid" >&3

exit 0
Loading