나는 내 커널을 컴파일하고 있는데 커널 6.3에서 오류가 발생했습니다.
$ make LSMOD=$XDG_CONFIG_HOME/modprobed.db localmodconfig
$ make deb-pkg -j4 LOCALVERSION=-custom
UPD include/config/kernel.release
GEN debian
error: creating source package requires git repository
make[1]: *** [scripts/Makefile.package:40: check-git] Error 1
make[1]: *** Waiting for unfinished jobs....
warning: Not a git repository. Use --no-index to compare two paths outside a working tree
usage: git diff --no-index [<options>] <path> <path>
Diff output format options
-p, --patch generate patch
-s, --no-patch suppress diff output
-u generate patch
-U, --unified[=<n>] generate diffs with <n> lines context
-W, --function-context
generate diffs with <n> lines context
--raw generate the diff in raw format
--patch-with-raw synonym for '-p --raw'
--patch-with-stat synonym for '-p --stat'
--numstat machine friendly --stat
--shortstat output only the last line of --stat
-X, --dirstat[=<param1,param2>...]
output the distribution of relative amount of changes for each sub-directory
--cumulative synonym for --dirstat=cumulative
--dirstat-by-file[=<param1,param2>...]
synonym for --dirstat=files,param1,param2...
--check warn if changes introduce conflict markers or whitespace errors
--summary condensed summary such as creations, renames and mode changes
--name-only show only names of changed files
--name-status show only names and status of changed files
--stat[=<width>[,<name-width>[,<count>]]]
generate diffstat
--stat-width <width> generate diffstat with a given width
--stat-name-width <width>
generate diffstat with a given name width
--stat-graph-width <width>
generate diffstat with a given graph width
--stat-count <count> generate diffstat with limited lines
--compact-summary generate compact summary in diffstat
--binary output a binary diff that can be applied
--full-index show full pre- and post-image object names on the "index" lines
--color[=<when>] show colored diff
--ws-error-highlight <kind>
highlight whitespace errors in the 'context', 'old' or 'new' lines in the diff
-z do not munge pathnames and use NULs as output field terminators in --raw or --numstat
--abbrev[=<n>] use <n> digits to display object names
--src-prefix <prefix>
show the given source prefix instead of "a/"
--dst-prefix <prefix>
show the given destination prefix instead of "b/"
--line-prefix <prefix>
prepend an additional prefix to every line of output
--no-prefix do not show any source or destination prefix
--inter-hunk-context <n>
show context between diff hunks up to the specified number of lines
--output-indicator-new <char>
specify the character to indicate a new line instead of '+'
--output-indicator-old <char>
specify the character to indicate an old line instead of '-'
--output-indicator-context <char>
specify the character to indicate a context instead of ' '
Diff rename options
-B, --break-rewrites[=<n>[/<m>]]
break complete rewrite changes into pairs of delete and create
-M, --find-renames[=<n>]
detect renames
-D, --irreversible-delete
omit the preimage for deletes
-C, --find-copies[=<n>]
detect copies
--find-copies-harder use unmodified files as source to find copies
--no-renames disable rename detection
--rename-empty use empty blobs as rename source
--follow continue listing the history of a file beyond renames
-l <n> prevent rename/copy detection if the number of rename/copy targets exceeds given limit
Diff algorithm options
--minimal produce the smallest possible diff
-w, --ignore-all-space
ignore whitespace when comparing lines
-b, --ignore-space-change
ignore changes in amount of whitespace
--ignore-space-at-eol
ignore changes in whitespace at EOL
--ignore-cr-at-eol ignore carrier-return at the end of line
--ignore-blank-lines ignore changes whose lines are all blank
-I, --ignore-matching-lines <regex>
ignore changes whose all lines match <regex>
--indent-heuristic heuristic to shift diff hunk boundaries for easy reading
--patience generate diff using the "patience diff" algorithm
--histogram generate diff using the "histogram diff" algorithm
--diff-algorithm <algorithm>
choose a diff algorithm
--anchored <text> generate diff using the "anchored diff" algorithm
--word-diff[=<mode>] show word diff, using <mode> to delimit changed words
--word-diff-regex <regex>
use <regex> to decide what a word is
--color-words[=<regex>]
equivalent to --word-diff=color --word-diff-regex=<regex>
--color-moved[=<mode>]
moved lines of code are colored differently
--color-moved-ws <mode>
how white spaces are ignored in --color-moved
Other diff options
--relative[=<prefix>]
when run from subdir, exclude changes outside and show relative paths
-a, --text treat all files as text
-R swap two inputs, reverse the diff
--exit-code exit with 1 if there were differences, 0 otherwise
--quiet disable all output of the program
--ext-diff allow an external diff helper to be executed
--textconv run external text conversion filters when comparing binary files
--ignore-submodules[=<when>]
ignore changes to submodules in the diff generation
--submodule[=<format>]
specify how differences in submodules are shown
--ita-invisible-in-index
hide 'git add -N' entries from the index
--ita-visible-in-index
treat 'git add -N' entries as real in the index
-S <string> look for differences that change the number of occurrences of the specified string
-G <regex> look for differences that change the number of occurrences of the specified regex
--pickaxe-all show all changes in the changeset with -S or -G
--pickaxe-regex treat <string> in -S as extended POSIX regular expression
-O <file> control the order in which files appear in the output
--rotate-to <path> show the change in the specified path first
--skip-to <path> skip the output to the specified path
--find-object <object-id>
look for differences that change the number of occurrences of the specified object
--diff-filter [(A|C|D|M|R|T|U|X|B)...[*]]
select files by diff type
--output <file> output to a specific file
make: *** [Makefile:1656: deb-pkg] Error 2
이 문제를 해결하는 방법에 대한 조언이 있는 사람이 있습니까? 감사해요.
우분투 23.04
답변1
2023년 3월 16일 리눅스 커널 git 커밋05e96e96a315fa49faca4da2aedd1761a218b616
kbuild: 소스 패키지 생성을 위해 git-archive 사용 Commit 5c3d1d0("kbuild: git에서 무시되는 파일 목록을 위한 도구 추가")에 scripts/list-gitignored라는 새 도구가 추가되었습니다. 내 의도는 git에 의존하지 않고 소스 트리를 정리하지 않고 소스 패키지를 만드는 것이었습니다.
Linus는 이에 강력하게 반대했고 대신 'git archive'를 사용할 것을 제안했습니다. [1] [2] [3]
이 커밋은 그런 방향으로 진행됩니다. scripts/list-gitignored.c를 제거하고 Makefile과 스크립트를 다시 작성하여 Debian 및 RPM 소스 패키지를 빌드하는 데 'git archive'를 사용합니다. 또한 'make perf-tar*-src-pkg'가 'git archive'를 다시 사용하도록 합니다.
앞으로 소스 패키지 구축은 git 관리 트리에서만 가능합니다. 바이너리 패키지를 빌드하는 데에는 git이 필요하지 않습니다.
따라서 위 커밋에 따라 "makebindeb-pkg"를 사용하거나 이전(6.3 이전)처럼 "make deb-pkg"를 사용하여 src pkg를 빌드하려면 커널 소스 트리를 git pull해야 합니다.
답변2
저 역시 마찬가지입니다. 알 수 없는 이유로 'make deb-pkg' 명령이 작동하지 않습니다(몇 년 동안 문제 없이 작동했습니다). 제안된 'make bindb-pkg' 명령은 작동했습니다. 이는 6.3 커널 릴리스에만 해당됩니다.