Make a "do-rebase" script we can use when we've rebased the github repo.

This rebuilds our patchset automatically.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2016-02-16 19:06:49 -05:00
parent bf8e18bc1d
commit 52f24b72a1
4 changed files with 194 additions and 83 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
po/exclude.pot binary

113
do-rebase Executable file
View File

@ -0,0 +1,113 @@
#!/bin/bash
set -e
shopt -qu globstar
export LC_COLLATE=C
export LC_ALL=C
usage()
{
retcode=0
if [ -n "$1" ]; then
exec 1>&2
retcode=$1
fi
echo usage: do-rebase \$releasever
exit $retcode
}
if ! git status | grep -q 'nothing to commit, working directory clean' ; then
echo "Working directory is not clean, cannot rebase." 1>&2
exit 1
fi
releasever=""
declare -a savedargs
while [ $# -gt 0 ]; do
case $1 in
--help|-h|--usage|-?|-u)
usage
;;
--dist=*)
releasever=${1##--dist=}
;;
--dist)
shift
releasever=$1
;;
*)
savedargs[${#savedargs[@]}]="$1"
;;
esac
shift
done
set -- "${savedargs[@]}"
if [ -z "${releasever}" -a $# -gt 0 ]; then
releasever=$1
shift
else
dist=$(git status | grep "On branch" | cut -d\ -f3-)
if [ -z "$dist" ]; then
echo "Could not figure out distro release version" 1>&2
usage 1
fi
case "$(eval echo \${dist})" in
.fc*)
releasever=$(echo ${dist} | \
sed 's/^\.fc\([[:digit:]]\+\)$/fedora-\1/')
;;
.*)
releasever=$(echo $dist | \
sed 's/^\.\([[:alpha:]]\+\)\([[:digit:]]\+\)$/\1-\2/')
;;
esac
if [ -z "${releasever}" -o "${releasever}" = "${dist}" ]; then
echo "Could not figure out distro release version" 1>&2
usage 1
fi
fi
if [ -z "$releasever" ]; then
echo "Could not figure out distro release version" 1>&2
usage 1
fi
if [ $# -ge 1 ]; then
echo "Unknown argument \"$1\"" 1>&2
usage 1
fi
if ! git remote show -n github >/dev/null 2>&1 ; then
git remote add \
github git@github.com:vathpela/grub2-fedora.git >/dev/null 2>&1
echo "Could not add remote: github" 1>&2
exit 1
fi
git fetch github
remote=$(git branch --list -r "github/${releasever}" 2>/dev/null)
if [ "${remote}" != " github/${releasever}" ]; then
echo branch \"${releasever}\" does not appear to exist 1>&2
exit 1
fi
unset LC_ALL
git rm -q 0*.patch
(cat <<EOF
From: Peter Jones <pjones@redhat.com>
Date: Wed Jul 22 10:18:00 2015 -0400
Subject: Stop trying to "git format-patch" across a merge that confuses it
EOF
git diff --full-index --binary refs/tags/grub-2.02-beta2..refs/remotes/github/master
) > grub-2.02-beta2-to-origin-master.patch
patches=$(git format-patch refs/remotes/github/master..refs/remotes/github/${releasever})
echo Patch0000: grub-2.02-beta2-to-origin-master.patch > grub.patches
for x in $patches ; do
echo Patch$(echo ${x} | cut -d- -f1): ${x} >> grub.patches
done
rpmdev-bumpspec -c "- Rebased to newer upstream for ${releasever}" grub2.spec
git add 0*.patch grub2.spec grub-2.02-beta2-to-origin-master.patch grub.patches
fedpkg commit -s -c

77
grub.patches Normal file
View File

@ -0,0 +1,77 @@
Patch0000: grub-2.02-beta2-to-origin-master.patch
Patch0001: 0001-Migrate-PPC-from-Yaboot-to-Grub2.patch
Patch0002: 0002-Add-fw_path-variable-revised.patch
Patch0003: 0003-Add-support-for-linuxefi.patch
Patch0004: 0004-Use-linuxefi-and-initrdefi-where-appropriate.patch
Patch0005: 0005-Don-t-allow-insmod-when-secure-boot-is-enabled.patch
Patch0006: 0006-Pass-x-hex-hex-straight-through-unmolested.patch
Patch0007: 0007-Fix-crash-on-http.patch
Patch0008: 0008-IBM-client-architecture-CAS-reboot-support.patch
Patch0009: 0009-Add-vlan-tag-support.patch
Patch0010: 0010-Add-X-option-to-printf-functions.patch
Patch0011: 0011-DHCP-client-ID-and-UUID-options-added.patch
Patch0012: 0012-Search-for-specific-config-file-for-netboot.patch
Patch0013: 0013-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch
Patch0014: 0014-Move-bash-completion-script-922997.patch
Patch0015: 0015-for-ppc-reset-console-display-attr-when-clear-screen.patch
Patch0016: 0016-Don-t-write-messages-to-the-screen.patch
Patch0017: 0017-Don-t-print-GNU-GRUB-header.patch
Patch0018: 0018-Don-t-add-to-highlighted-row.patch
Patch0019: 0019-Message-string-cleanups.patch
Patch0020: 0020-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch
Patch0021: 0021-Use-the-correct-indentation-for-the-term-help-text.patch
Patch0022: 0022-Indent-menu-entries.patch
Patch0023: 0023-Fix-margins.patch
Patch0024: 0024-Add-support-for-UEFI-operating-systems-returned-by-o.patch
Patch0025: 0025-Disable-GRUB-video-support-for-IBM-power-machines.patch
Patch0026: 0026-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch
Patch0027: 0027-Use-linux16-when-appropriate-880840.patch
Patch0028: 0028-Enable-pager-by-default.-985860.patch
Patch0029: 0029-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch
Patch0030: 0030-Don-t-say-GNU-Linux-in-generated-menus.patch
Patch0031: 0031-Don-t-draw-a-border-around-the-menu.patch
Patch0032: 0032-Use-the-standard-margin-for-the-timeout-string.patch
Patch0033: 0033-Fix-grub_script_execute_sourcecode-usage-on-ppc.patch
Patch0034: 0034-Add-.eh_frame-to-list-of-relocations-stripped.patch
Patch0035: 0035-Make-10_linux-work-with-our-changes-for-linux16-and-.patch
Patch0036: 0036-Don-t-print-during-fdt-loading-method.patch
Patch0037: 0037-Honor-a-symlink-when-generating-configuration-by-gru.patch
Patch0038: 0038-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch
Patch0039: 0039-Don-t-require-a-password-to-boot-entries-generated-b.patch
Patch0040: 0040-Don-t-emit-Booting-.-message.patch
Patch0041: 0041-Make-CTRL-and-ALT-keys-work-as-expected-on-EFI-syste.patch
Patch0042: 0042-May-as-well-try-it.patch
Patch0043: 0043-use-fw_path-prefix-when-fallback-searching-for-grub-.patch
Patch0044: 0044-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch
Patch0045: 0045-trim-arp-packets-with-abnormal-size.patch
Patch0046: 0046-Fix-convert-function-to-support-NVMe-devices.patch
Patch0047: 0047-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch
Patch0048: 0048-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch
Patch0049: 0049-Use-the-default-device-tree-from-the-grub-default-fi.patch
Patch0050: 0050-reopen-SNP-protocol-for-exclusive-use-by-grub.patch
Patch0051: 0051-Reduce-timer-event-frequency-by-10.patch
Patch0052: 0052-always-return-error-to-UEFI.patch
Patch0053: 0053-Suport-for-bi-endianess-in-elf-file.patch
Patch0054: 0054-Add-grub_util_readlink.patch
Patch0055: 0055-Make-editenv-chase-symlinks-including-those-across-d.patch
Patch0056: 0056-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch
Patch0057: 0057-Fix-GRUB_DISABLE_SUBMENU-one-more-time.patch
Patch0058: 0058-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch
Patch0059: 0059-Add-GRUB_DISABLE_UUID.patch
Patch0060: 0060-Allow-fallback-to-include-entries-by-title-not-just-.patch
Patch0061: 0061-Load-arm-with-SB-enabled.patch
Patch0062: 0062-Try-prefix-if-fw_path-doesn-t-work.patch
Patch0063: 0063-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch
Patch0064: 0064-Update-to-minilzo-2.08.patch
Patch0065: 0065-Make-grub2-mkconfig-construct-titles-that-look-like-.patch
Patch0066: 0066-Make-rescue-and-debug-entries-sort-right-again-in-gr.patch
Patch0067: 0067-Make-.gitignore-suck-way-less.patch
Patch0068: 0068-Update-info-with-grub.cfg-netboot-selection-order-11.patch
Patch0069: 0069-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch
Patch0070: 0070-Add-friendly-grub2-password-config-tool-985962.patch
Patch0071: 0071-Make-exit-take-a-return-code.patch
Patch0072: 0072-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch
Patch0073: 0073-Fix-race-in-EFI-validation.patch
Patch0074: 0074-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch
Patch0075: 0075-Fix-security-issue-when-reading-username-and-passwor.patch
Patch0076: 0076-01_users-Handle-GRUB_PASSWORD-better.patch

View File

@ -53,93 +53,13 @@ License: GPLv3+
URL: http://www.gnu.org/software/grub/
Obsoletes: grub < 1:0.98
Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{tarversion}.tar.xz
#Source0: ftp://ftp.gnu.org/gnu/grub/grub-%{tarversion}.tar.xz
#Source0: ftp://ftp.gnu.org/gnu/grub/grub-%%{tarversion}.tar.xz
Source4: http://unifoundry.com/unifont-5.1.20080820.pcf.gz
Source5: theme.tar.bz2
Source6: gitignore
# generate with:
# git diff grub-2.02-beta2..origin/master
Patch0000: grub-2.02-beta2-to-origin-master.patch
# generate all the patches after this with:
# git format-patch fedora-diff-from-here..fedora-23
Patch0001: 0001-Migrate-PPC-from-Yaboot-to-Grub2.patch
Patch0002: 0002-Add-fw_path-variable-revised.patch
Patch0003: 0003-Add-support-for-linuxefi.patch
Patch0004: 0004-Use-linuxefi-and-initrdefi-where-appropriate.patch
Patch0005: 0005-Don-t-allow-insmod-when-secure-boot-is-enabled.patch
Patch0006: 0006-Pass-x-hex-hex-straight-through-unmolested.patch
Patch0007: 0007-Fix-crash-on-http.patch
Patch0008: 0008-IBM-client-architecture-CAS-reboot-support.patch
Patch0009: 0009-Add-vlan-tag-support.patch
Patch0010: 0010-Add-X-option-to-printf-functions.patch
Patch0011: 0011-DHCP-client-ID-and-UUID-options-added.patch
Patch0012: 0012-Search-for-specific-config-file-for-netboot.patch
Patch0013: 0013-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch
Patch0014: 0014-Move-bash-completion-script-922997.patch
Patch0015: 0015-for-ppc-reset-console-display-attr-when-clear-screen.patch
Patch0016: 0016-Don-t-write-messages-to-the-screen.patch
Patch0017: 0017-Don-t-print-GNU-GRUB-header.patch
Patch0018: 0018-Don-t-add-to-highlighted-row.patch
Patch0019: 0019-Message-string-cleanups.patch
Patch0020: 0020-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch
Patch0021: 0021-Use-the-correct-indentation-for-the-term-help-text.patch
Patch0022: 0022-Indent-menu-entries.patch
Patch0023: 0023-Fix-margins.patch
Patch0024: 0024-Add-support-for-UEFI-operating-systems-returned-by-o.patch
Patch0025: 0025-Disable-GRUB-video-support-for-IBM-power-machines.patch
Patch0026: 0026-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch
Patch0027: 0027-Use-linux16-when-appropriate-880840.patch
Patch0028: 0028-Enable-pager-by-default.-985860.patch
Patch0029: 0029-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch
Patch0030: 0030-Don-t-say-GNU-Linux-in-generated-menus.patch
Patch0031: 0031-Don-t-draw-a-border-around-the-menu.patch
Patch0032: 0032-Use-the-standard-margin-for-the-timeout-string.patch
Patch0033: 0033-Fix-grub_script_execute_sourcecode-usage-on-ppc.patch
Patch0034: 0034-Add-.eh_frame-to-list-of-relocations-stripped.patch
Patch0035: 0035-Make-10_linux-work-with-our-changes-for-linux16-and-.patch
Patch0036: 0036-Don-t-print-during-fdt-loading-method.patch
Patch0037: 0037-Honor-a-symlink-when-generating-configuration-by-gru.patch
Patch0038: 0038-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch
Patch0039: 0039-Don-t-require-a-password-to-boot-entries-generated-b.patch
Patch0040: 0040-Don-t-emit-Booting-.-message.patch
Patch0041: 0041-Make-CTRL-and-ALT-keys-work-as-expected-on-EFI-syste.patch
Patch0042: 0042-May-as-well-try-it.patch
Patch0043: 0043-use-fw_path-prefix-when-fallback-searching-for-grub-.patch
Patch0044: 0044-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch
Patch0045: 0045-trim-arp-packets-with-abnormal-size.patch
Patch0046: 0046-Fix-convert-function-to-support-NVMe-devices.patch
Patch0047: 0047-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch
Patch0048: 0048-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch
Patch0049: 0049-Use-the-default-device-tree-from-the-grub-default-fi.patch
Patch0050: 0050-reopen-SNP-protocol-for-exclusive-use-by-grub.patch
Patch0051: 0051-Reduce-timer-event-frequency-by-10.patch
Patch0052: 0052-always-return-error-to-UEFI.patch
Patch0053: 0053-Suport-for-bi-endianess-in-elf-file.patch
Patch0054: 0054-Add-grub_util_readlink.patch
Patch0055: 0055-Make-editenv-chase-symlinks-including-those-across-d.patch
Patch0056: 0056-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch
Patch0057: 0057-Fix-GRUB_DISABLE_SUBMENU-one-more-time.patch
Patch0058: 0058-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch
Patch0059: 0059-Add-GRUB_DISABLE_UUID.patch
Patch0060: 0060-Allow-fallback-to-include-entries-by-title-not-just-.patch
Patch0061: 0061-Load-arm-with-SB-enabled.patch
Patch0062: 0062-Try-prefix-if-fw_path-doesn-t-work.patch
Patch0063: 0063-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch
Patch0064: 0064-Update-to-minilzo-2.08.patch
Patch0065: 0065-Make-grub2-mkconfig-construct-titles-that-look-like-.patch
Patch0066: 0066-Make-rescue-and-debug-entries-sort-right-again-in-gr.patch
Patch0067: 0067-Make-.gitignore-suck-way-less.patch
Patch0068: 0068-Update-info-with-grub.cfg-netboot-selection-order-11.patch
Patch0069: 0069-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch
Patch0070: 0070-Add-friendly-grub2-password-config-tool-985962.patch
Patch0071: 0071-Make-exit-take-a-return-code.patch
Patch0072: 0072-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch
Patch0073: 0073-Fix-race-in-EFI-validation.patch
Patch0074: 0074-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch
Patch0075: 0075-Fix-security-issue-when-reading-username-and-passwor.patch
Patch0076: 0076-01_users-Handle-GRUB_PASSWORD-better.patch
# generate with do-rebase
%include grub.patches