mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
kbuild: use git-archive for source package creation
Commit5c3d1d0abb
("kbuild: add a tool to list files ignored by git") added a new tool, scripts/list-gitignored. My intention was to create source packages without cleaning the source tree, without relying on git. Linus strongly objected to it, and suggested using 'git archive' instead. [1] [2] [3] This commit goes in that direction - Remove scripts/list-gitignored.c and rewrites Makefiles and scripts to use 'git archive' for building Debian and RPM source packages. It also makes 'make perf-tar*-src-pkg' use 'git archive' again. Going forward, building source packages is only possible in a git-managed tree. Building binary packages does not require git. [1]: https://lore.kernel.org/lkml/CAHk-=wi49sMaC7vY1yMagk7eqLK=1jHeHQ=yZ_k45P=xBccnmA@mail.gmail.com/ [2]: https://lore.kernel.org/lkml/CAHk-=wh5AixGsLeT0qH2oZHKq0FLUTbyTw4qY921L=PwYgoGVw@mail.gmail.com/ [3]: https://lore.kernel.org/lkml/CAHk-=wgM-W6Fu==EoAVCabxyX8eYBz9kNC88-tm9ExRQwA79UQ@mail.gmail.com/ Fixes:5c3d1d0abb
("kbuild: add a tool to list files ignored by git") Fixes:e0ca16749a
("kbuild: make perf-tar*-src-pkg work without relying on git") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
81f59a26f3
commit
05e96e96a3
10 changed files with 181 additions and 1155 deletions
14
scripts/check-git
Executable file
14
scripts/check-git
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# succeed if we are in a git repository
|
||||
|
||||
srctree="$(dirname $0)/.."
|
||||
|
||||
if ! git -C "${srctree}" rev-parse --verify HEAD >/dev/null 2>/dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! test -z $(git -C "${srctree}" rev-parse --show-cdup 2>/dev/null); then
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue