FS#76255 - Handling of git submodules in PKGBUILDs broken as of git 2.38.1 update
Attached to Project:
Arch Linux
Opened by Paul Mulders (justinkb) - Thursday, 20 October 2022, 11:46 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 08 November 2022, 21:37 GMT
Opened by Paul Mulders (justinkb) - Thursday, 20 October 2022, 11:46 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 08 November 2022, 21:37 GMT
|
Details
Description:
Because of security-related changes in git 2.38.1 (see https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/), the way makepkg interacts with git repositories with submodules (cloning method) is no longer functional. Additional info: Using pacman 6.0.1-8 and git 2.38.1-1 Steps to reproduce: $ asp checkout libtool $ makepkg -s leads to: ``` ==> Starting prepare()... patching file m4/libtool.m4 Hunk #1 succeeded at 730 (offset 2 lines). patching file tests/link-order2.at Hunk #1 succeeded at 48 (offset 1 line). Hunk #2 succeeded at 92 (offset 1 line). Hunk #3 succeeded at 121 (offset 1 line). Submodule 'bootstrap' (https://github.com/gnulib-modules/bootstrap.git) registered for path 'gl-mod/bootstrap' Submodule 'gnulib' (git://git.savannah.gnu.org/gnulib.git) registered for path 'gnulib' Cloning into '/home/paul/Developer/abs/libtool/trunk/src/libtool/gl-mod/bootstrap'... Cloning into '/home/paul/Developer/abs/libtool/trunk/src/libtool/gnulib'... fatal: transport 'file' not allowed fatal: clone of '/home/paul/Developer/abs/libtool/trunk/src/gnulib' into submodule path '/home/paul/Developer/abs/libtool/trunk/src/libtool/gnulib' failed Failed to clone 'gnulib'. Retry scheduled Cloning into '/home/paul/Developer/abs/libtool/trunk/src/libtool/gnulib'... fatal: transport 'file' not allowed fatal: clone of '/home/paul/Developer/abs/libtool/trunk/src/gnulib' into submodule path '/home/paul/Developer/abs/libtool/trunk/src/libtool/gnulib' failed Failed to clone 'gnulib' a second time, aborting ==> ERROR: A failure occurred in prepare(). Aborting... ``` |
This task depends upon
Closed by Toolybird (Toolybird)
Tuesday, 08 November 2022, 21:37 GMT
Reason for closing: Fixed
Additional comments about closing: wiki has been updated
Tuesday, 08 November 2022, 21:37 GMT
Reason for closing: Fixed
Additional comments about closing: wiki has been updated
If the submodules are as set by upstream then you are relying on the commit being pinned in the PKGBUILD and the maintainer monitoring the submodules. The PKGBUILD would also need to allow the data which has been copied from outside $srcdir and is now available inside it to be exploited.
The PKGBUILD change suggested benjarobin [2] seems the best fix available to date.
Edit:
Also avoiding the local clone would make offline building impossible, requiring network connectivity at least in prepare().
[1] https://github.com/git/git/commit/a1d4f67c12ac172f835e6d5e4e0a197075e2146b
[2] https://bbs.archlinux.org/viewtopic.php?pid=2063104#p2063104
Are we happy with `git -c protocol.file.allow=always submodule update ...' as mentioned in the BBS thread? I'm guessing there'll be quite a few pkgs that are now FTBFS so maybe we need a TODO action list?
[1] https://wiki.archlinux.org/title/VCS_package_guidelines#Git_submodules