Package Details: grub-luks-keyfile-git 2:2.06rc1-2

Git Clone URL: https://aur.archlinux.org/grub-luks-keyfile-git.git (read-only, click to copy)
Package Base: grub-luks-keyfile-git
Description: GNU GRand Unified Bootloader (2)
Upstream URL: https://www.gnu.org/software/grub/
Licenses: GPL3
Conflicts: grub-bios, grub-common, grub-efi-x86_64, grub-emu, grub-legacy
Provides: grub-bios, grub-common, grub-efi-x86_64, grub-emu
Replaces: grub-bios, grub-common, grub-efi-x86_64, grub-emu
Submitter: mxfm
Maintainer: mxfm
Last Packager: mxfm
Votes: 1
Popularity: 0.46
First Submitted: 2021-01-16 16:36
Last Updated: 2021-03-25 05:31

Dependencies (23)

Required by (2)

Sources (13)

Latest Comments

gamezelda commented on 2021-03-09 22:49

@mxfm: Every time I got a conflict I took some time to understand what was the intention behind both the changes in the patch and what changed upstream to cause the conflict, so all changes from upstream should be included. (Though in case there was some "copy-pasted" code instead of refactored code in the original patches I can't tell it, since I'm not very familiar with the grub code base.)

I didn't try to build grub-extras, but you seem to have figured it out already though :). I agree that upstreaming those patches would be a blessing, since they are quite large and conflict-prone.

mxfm commented on 2021-03-06 06:26

@gamezelda Thanks for the feedback. It is good to know, that someone is also interested in these patches.

Yes, I followed the easy way and discarded some changes because there was a mess. I will try your patch #4. Does it include all upstream changes?

Btw, did you tried to compile grub-extras in PKGBUILD? It is a separate repo which contains some tools moved outside the grub core repo. Grub developers told that they are against including patch #4 (plain dm-crypt) but are fine, if it is included into extras as a separate module.

In January, when I was updating these patches I also planned to rewrite the patch #4 into a module to submit it to grub-extras. Including in the repo will greatly simplify keeping the patches up to date, because the patch #4 is the most time consuming. Unfortunately, for some reason grub autoconf ignores "export GRUB_CONTRIB" command in PKGBUILD, and I didn't have more time to fix it.

EDIT: It seems the problem was in bootstrap script. Recently grub compilation steps changed. Now autogen.sh is called by bootstrap.sh and is run in _prepare, before exporting GRUB_CONTRIB variable in _build_grub-common_and_bios().

gamezelda commented on 2021-03-05 20:13

I just recently finished rebasing the patches myself for the grub 2:2.04.r340.g8fcfd1e0f-1 which recently landed on the testing repo, and which includes some quite tricky parts to merge, and after I finished, I realized someone may have already done most of the job - facepalm.

However I found something of note by comparing your patches to mine, which is that in the original 4th patch ( https://grub.johnlane.ie/assets/0004-Cryptomount-support-plain-dm-crypt.patch ), there's a chunk where a part of grub-core/disk/luks.c:configure_ciphers is refactored into a new function grub-core/disk/cryptodisk.c:grub_cryptodisk_create.

At some point there were some other upstream refactors to configure_ciphers, which causes a mess which is quite tricky to merge. It looks like you discarded the deletion from configure_ciphers and kept the old version of the code from grub_cryptodisk_create, which causes the patches to miss some upstream changes like those (however nothing looks too important):

https://github.com/olafhering/grub/commit/1066336dc88ef59556be91003388d8a1dfd0fd91 https://github.com/olafhering/grub/commit/cf3a3acff057f61e6562fe07f7370a01bc634240#diff-bfdb726f85c56e03da19e56e055718dd74c29b8e71ce4d8c66e329fe2fe52bedL127

FWIW this is my rebased version of the patches, where I tried to pull the changes from configure_ciphers into grub_cryptodisk_create as best as I could: https://zealcharm.soon.it/grub2-lukskeyfile-rebased-2.04.r340.g8fcfd1e0f.tar.gz