diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-11-01 16:47:42 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-11-01 16:47:42 -0400 |
commit | e3082c313b75f13e8e1049673efe6a42dcd1499f (patch) | |
tree | 0d11815c9bed24ca9f27d3839ac0f9577d8308e5 /pkgs/tools/misc/grub/grub1.patches.sh | |
parent | f2ed7c7af9f5b2db5e88b78e192b470c47f4c4fd (diff) | |
parent | cc41aefe4485dea399930b8d173c26e438cb5e22 (diff) | |
download | nixlib-e3082c313b75f13e8e1049673efe6a42dcd1499f.tar nixlib-e3082c313b75f13e8e1049673efe6a42dcd1499f.tar.gz nixlib-e3082c313b75f13e8e1049673efe6a42dcd1499f.tar.bz2 nixlib-e3082c313b75f13e8e1049673efe6a42dcd1499f.tar.lz nixlib-e3082c313b75f13e8e1049673efe6a42dcd1499f.tar.xz nixlib-e3082c313b75f13e8e1049673efe6a42dcd1499f.tar.zst nixlib-e3082c313b75f13e8e1049673efe6a42dcd1499f.zip |
Merge remote-tracking branch 'upstream/master' into release-lib-cleanup
Diffstat (limited to 'pkgs/tools/misc/grub/grub1.patches.sh')
-rwxr-xr-x | pkgs/tools/misc/grub/grub1.patches.sh | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/tools/misc/grub/grub1.patches.sh b/pkgs/tools/misc/grub/grub1.patches.sh new file mode 100755 index 000000000000..d3b138ad3577 --- /dev/null +++ b/pkgs/tools/misc/grub/grub1.patches.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env nix-shell +#!nix-shell -p nix -i bash --pure + +# Does like `maintainers/scripts/debian-patches.sh`, but specialized for +# grub1 patches, and using the new salsa service. + +# Most common usage: `pkgs/tools/misc/grub/grub1.patches.sh pkgs/tools/misc/grub/grub1.patches.nix` +# That is, after updating the script with the new list from the series file, +# removing (by commenting) patches as required. + +set -e +set -u + +# https://salsa.debian.org/grub-team/grub-legacy/tree/master/debian/patches +SERIES=( + snapshot.patch + menu.lst_gnu-hurd.patch + graphics.patch + raid.patch + raid_cciss.patch + xfs_freeze.patch + 2gb_limit.patch + grub-special_device_names.patch + grub-xvd_drives.patch + initrd_max_address.patch + splashimage_help.patch + grub-install_addsyncs.patch + grub-install_regexp.patch + grub-install_aoe_support.patch + grub-install_xvd.patch + geometry-26kernel.patch + print_func.patch + mprotect.patch + savedefault.patch + find-grub-dir.patch + intelmac.patch + crossreference_manpages.patch + ext3_256byte_inode.patch + # Breaks on NixOS. + #use_grub-probe_in_grub-install.patch + objcopy-absolute.patch + no-reorder-functions.patch + + # We aren't building amd64 binaries, see #244498 + #fix_amd64_compile.patch + modern-automake.patch + no-combine-stack-adjustments.patch + no-pie.patch +) + +# Revision mapping to current tip of the 0.97-73 branch. +rev="1dad5507d74ef97fdd3c6cf2a028084f6f2850c3" +prefix="https://salsa.debian.org/grub-team/grub-legacy/raw/${rev}/debian/patches" +FILE="$1" +shift + +cat <<EOF > "$FILE" +# Generated by grub1-patches.sh +let + prefix = "${prefix}"; +in +[ +EOF + +for PATCH in "${SERIES[@]}"; do + URL="$prefix/$PATCH" + HASH="$(nix-prefetch-url "$URL")" + echo "{ url = \"\${prefix}/$PATCH\"; sha256 = \"$HASH\"; }" >> "$FILE" +done +echo "]" >> "$FILE" |