|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4 |
|
| #
657f96cb |
| 22-Apr-2025 |
WangYuli <[email protected]> |
kbuild: deb-pkg: Add libdw-dev:native to Build-Depends-Arch
The dwarf.h header, which is included by scripts/gendwarfksyms/gendwarfksyms.h, resides within the libdw-dev package.
This portion of the
kbuild: deb-pkg: Add libdw-dev:native to Build-Depends-Arch
The dwarf.h header, which is included by scripts/gendwarfksyms/gendwarfksyms.h, resides within the libdw-dev package.
This portion of the code is compiled under the condition that CONFIG_GENDWARFKSYMS is enabled.
Consequently, add libdw-dev to Build-Depends-Arch to prevent unforeseen compilation failures.
Fix follow possible error: In file included from scripts/gendwarfksyms/symbols.c:6: scripts/gendwarfksyms/gendwarfksyms.h:6:10: fatal error: 'dwarf.h' file not found 6 | #include <dwarf.h> | ^~~~~~~~~
Fixes: f28568841ae0 ("tools: Add gendwarfksyms") Reviewed-by: Sami Tolvanen <[email protected]> Signed-off-by: WangYuli <[email protected]> Reviewed-by: Nicolas Schier <[email protected]> Tested-by: Nicolas Schier <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7 |
|
| #
1c3107ec |
| 11-Mar-2025 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: remove "version" variable in mkdebian
${version} and ${KERNELRELEASE} are the same.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <nathan@ker
kbuild: deb-pkg: remove "version" variable in mkdebian
${version} and ${KERNELRELEASE} are the same.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
show more ...
|
| #
7e752910 |
| 11-Mar-2025 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: fix versioning for -rc releases
The version number with -rc should be considered older than the final release.
For example, 6.14-rc1 should be older than 6.14, but to handle this c
kbuild: deb-pkg: fix versioning for -rc releases
The version number with -rc should be considered older than the final release.
For example, 6.14-rc1 should be older than 6.14, but to handle this correctly (just like Debian kernel), "-rc" must be replace with "~rc".
$ dpkg --compare-versions 6.14-rc1 lt 6.14 $ echo $? 1 $ dpkg --compare-versions 6.14~rc1 lt 6.14 $ echo $? 0
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc6, v6.14-rc5 |
|
| #
1195306e |
| 24-Feb-2025 |
WangYuli <[email protected]> |
kbuild: deb-pkg: add debarch for ARCH=loongarch64
Fix follow warning when 'make ARCH=loongarch64 bindeb-pkg':
** ** ** WARNING ** ** **
Your architecture doesn't have its equivalent Debian
kbuild: deb-pkg: add debarch for ARCH=loongarch64
Fix follow warning when 'make ARCH=loongarch64 bindeb-pkg':
** ** ** WARNING ** ** **
Your architecture doesn't have its equivalent Debian userspace architecture defined! Falling back to the current host architecture (loong64). Please add support for loongarch64 to ./scripts/package/mkdebian ...
Reported-by: Shiwei Liu <[email protected]> Signed-off-by: WangYuli <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4 |
|
| #
82a1978d |
| 18-Dec-2024 |
Masahiro Yamada <[email protected]> |
kheaders: use 'tar' instead of 'cpio' for copying files
The 'cpio' command is used solely for copying header files to the temporary directory. However, there is no strong reason to use 'cpio' for th
kheaders: use 'tar' instead of 'cpio' for copying files
The 'cpio' command is used solely for copying header files to the temporary directory. However, there is no strong reason to use 'cpio' for this purpose. For example, scripts/package/install-extmod-build uses the 'tar' command to copy files.
This commit replaces the use of 'cpio' with 'tar' because 'tar' is already used in this script to generate kheaders_data.tar.xz anyway.
Performance-wide, there is no significant difference between 'cpio' and 'tar'.
[Before]
$ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | cpio --quiet -pd kheaders ' real 0m0.148s user 0m0.021s sys 0m0.140s
[After]
$ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | tar -c -f - -T - | tar -xf - -C kheaders ' real 0m0.098s user 0m0.024s sys 0m0.131s
Revert commit 69ef0920bdd3 ("Docs: Add cpio requirement to changes.rst") because 'cpio' is not used anywhere else during the kernel build. Please note that the built-in initramfs is created by the in-tree tool, usr/gen_init_cpio, so it does not rely on the external 'cpio' command at all.
Remove 'cpio' from the package build dependencies as well.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc3, v6.13-rc2 |
|
| #
a34e92d2 |
| 03-Dec-2024 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: add debarch for ARCH=um
'make ARCH=um bindeb-pkg' shows the following warning.
$ make ARCH=um bindeb-pkg [snip] GEN debian
** ** ** WARNING ** ** **
Your arc
kbuild: deb-pkg: add debarch for ARCH=um
'make ARCH=um bindeb-pkg' shows the following warning.
$ make ARCH=um bindeb-pkg [snip] GEN debian
** ** ** WARNING ** ** **
Your architecture doesn't have its equivalent Debian userspace architecture defined! Falling back to the current host architecture (amd64). Please add support for um to ./scripts/package/mkdebian ...
This commit hard-codes i386/amd64 because UML is only supported for x86.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc1 |
|
| #
6b1fabce |
| 23-Nov-2024 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: add python3:native to build dependency
Python3 is necessary for running some scripts such as drivers/gpu/drm/msm/registers/gen_header.py
Both scripts/package/kernel.spec and script
kbuild: deb-pkg: add python3:native to build dependency
Python3 is necessary for running some scripts such as drivers/gpu/drm/msm/registers/gen_header.py
Both scripts/package/kernel.spec and scripts/package/PKGBUILD already list Python as the build dependency.
Do likewise for scripts/package/mkdebian.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
2ad7126c |
| 22-Oct-2024 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: add pkg.linux-upstream.nokerneldbg build profile
The Debian kernel supports the pkg.linux.nokerneldbg build profile.
The debug package tends to become huge, and you may not want to
kbuild: deb-pkg: add pkg.linux-upstream.nokerneldbg build profile
The Debian kernel supports the pkg.linux.nokerneldbg build profile.
The debug package tends to become huge, and you may not want to build it even when CONFIG_DEBUG_INFO is enabled.
This commit introduces a similar profile for the upstream kernel.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
e2c31822 |
| 22-Oct-2024 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: add pkg.linux-upstream.nokernelheaders build profile
Since commit f1d87664b82a ("kbuild: cross-compile linux-headers package when possible"), 'make bindeb-pkg' may attempt to cross-
kbuild: deb-pkg: add pkg.linux-upstream.nokernelheaders build profile
Since commit f1d87664b82a ("kbuild: cross-compile linux-headers package when possible"), 'make bindeb-pkg' may attempt to cross-compile the linux-headers package, but it fails under certain circumstances.
For example, when CONFIG_MODULE_SIG_FORMAT is enabled on Debian, the following command fails:
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bindeb-pkg [ snip ] Rebuilding host programs with aarch64-linux-gnu-gcc... HOSTCC debian/linux-headers-6.12.0-rc4/usr/src/linux-headers-6.12.0-rc4/scripts/kallsyms HOSTCC debian/linux-headers-6.12.0-rc4/usr/src/linux-headers-6.12.0-rc4/scripts/sorttable HOSTCC debian/linux-headers-6.12.0-rc4/usr/src/linux-headers-6.12.0-rc4/scripts/asn1_compiler HOSTCC debian/linux-headers-6.12.0-rc4/usr/src/linux-headers-6.12.0-rc4/scripts/sign-file In file included from /usr/include/openssl/opensslv.h:109, from debian/linux-headers-6.12.0-rc4/usr/src/linux-headers-6.12.0-rc4/scripts/sign-file.c:25: /usr/include/openssl/macros.h:14:10: fatal error: openssl/opensslconf.h: No such file or directory 14 | #include <openssl/opensslconf.h> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
This commit adds a new profile, pkg.linux-upstream.nokernelheaders, to guard the linux-headers package.
There are two options to fix the above issue.
Option 1: Set the pkg.linux-upstream.nokernelheaders build profile
$ DEB_BUILD_PROFILES=pkg.linux-upstream.nokernelheaders \ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bindeb-pkg
This skips the building of the linux-headers package.
Option 2: Install the necessary build dependencies
If you want to cross-compile the linux-headers package, you need to install additional packages.
For example, on Debian, the packages necessary for cross-compiling it to arm64 can be installed with the following commands:
# dpkg --add-architecture arm64 # apt update # apt install gcc-aarch64-linux-gnu libssl-dev:arm64
Fixes: f1d87664b82a ("kbuild: cross-compile linux-headers package when possible") Reported-by: Ron Economos <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Ron Economos <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7 |
|
| #
d67015ee |
| 04-Jul-2024 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: use default string when variable is unset or null
${DEBFULLNAME-${user}} falls back to ${user} when DEBFULLNAME is unset. It is more reasonable to do so when DEBFULLNAME is unset or
kbuild: deb-pkg: use default string when variable is unset or null
${DEBFULLNAME-${user}} falls back to ${user} when DEBFULLNAME is unset. It is more reasonable to do so when DEBFULLNAME is unset or null.
Otherwise, the command:
$ DEBFULLNAME= make deb-pkg
will leave the name field blank.
The same applies to KBUILD_BUILD_USER and KBUILD_BUILD_HOST.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
show more ...
|
| #
c0414419 |
| 02-Jul-2024 |
Masahiro Yamada <[email protected]> |
kbuild: package: add -e and -u options to some shell scripts
Set -e to make these scripts fail on the first error.
Set -u because these scripts are invoked by Makefile, and do not work properly wit
kbuild: package: add -e and -u options to some shell scripts
Set -e to make these scripts fail on the first error.
Set -u because these scripts are invoked by Makefile, and do not work properly without necessary variables defined.
I tweaked mkdebian to cope with optional environment variables.
Remove the explicit "test -n ..." from install-extmod-build.
Both options are described in POSIX. [1]
[1]: https://pubs.opengroup.org/onlinepubs/009604499/utilities/set.html
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
c5209080 |
| 02-Jul-2024 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: remove support for "name <email>" form for DEBEMAIL
Commit d5940c60e057 ("kbuild: deb-pkg improve maintainer address generation") supported the "name <email>" form for DEBEMAIL, wit
kbuild: deb-pkg: remove support for "name <email>" form for DEBEMAIL
Commit d5940c60e057 ("kbuild: deb-pkg improve maintainer address generation") supported the "name <email>" form for DEBEMAIL, with behavior slightly different from devscripts.
In Kbuild, if DEBEMAIL is given in the form "name <email>", it is used as-is, and DEBFULLNAME is ignored.
In contrast, debchange takes the name from DEBFULLNAME (or NAME) if set, as described in 'man debchange':
If this variable has the form "name <email>", then the maintainer name will also be taken from here if neither DEBFULLNAME nor NAME is set.
This commit removes support for the "name <email> form for DEBEMAIL, as the current behavior is already different from debchange, and the Debian manual suggests setting the email address and name separately in DEBEMAIL and DEBFULLNAME. [1]
If there are any complaints about this removal, we can re-add it, with better alignment with the debchange implementation. [2]
[1]: https://www.debian.org/doc/manuals/debmake-doc/ch03.en.html#email-setup [2]: https://salsa.debian.org/debian/devscripts/-/blob/v2.23.7/scripts/debchange.pl#L802
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
62767619 |
| 02-Jul-2024 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: remove support for EMAIL environment variable
Commit edec611db047 ("kbuild, deb-pkg: improve maintainer identification") added the EMAIL and NAME environment variables.
Commit d594
kbuild: deb-pkg: remove support for EMAIL environment variable
Commit edec611db047 ("kbuild, deb-pkg: improve maintainer identification") added the EMAIL and NAME environment variables.
Commit d5940c60e057 ("kbuild: deb-pkg improve maintainer address generation") removed support for NAME, but kept support for EMAIL.
The EMAIL and NAME environment variables are supported by some tools (see 'man debchange'), but not by all.
We should support both of them, or neither of them. We should not stop halfway.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc6, v6.10-rc5, v6.10-rc4 |
|
| #
ae4c4cee |
| 11-Jun-2024 |
Masahiro Yamada <[email protected]> |
kbuild: move init/build-version to scripts/
At first, I thought this script would be needed only in init/Makefile.
However, commit 5db8face97f8 ("kbuild: Restore .version auto-increment behaviour f
kbuild: move init/build-version to scripts/
At first, I thought this script would be needed only in init/Makefile.
However, commit 5db8face97f8 ("kbuild: Restore .version auto-increment behaviour for Debian packages") and commit 1789fc912541 ("kbuild: rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg") revealed that it was actually needed for scripts/package/mk* as well.
After all, scripts/ is a better place for it.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8 |
|
| #
5e73758b |
| 26-Dec-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: use more debhelper commands in builddeb
Commit 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages") started to require the debhelper tool suite.
Use more
kbuild: deb-pkg: use more debhelper commands in builddeb
Commit 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages") started to require the debhelper tool suite.
Use more dh_* commands in create_package():
- dh_installdocs to install copyright - dh_installchangelogs to install changelog - dh_compress to compress changelog - dh_fixperms to replace the raw chmod command - dh_gencontrol to replace the raw dpkg-gencontrol command - dh_md5sums to record the md5sum of included files - dh_builddeb to replace the raw dpkg-deb command
Set DEB_RULES_REQUIRES_ROOT to 'no' in case debian/rules is executed directly.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc7 |
|
| #
b88365b6 |
| 19-Dec-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: hard-code Build-Depends
The condition to require libelf-dev:native is stale because objtool is now enabled by CONFIG_OBJTOOL instead of CONFIG_UNWINDER_ORC. Not only objtool but als
kbuild: deb-pkg: hard-code Build-Depends
The condition to require libelf-dev:native is stale because objtool is now enabled by CONFIG_OBJTOOL instead of CONFIG_UNWINDER_ORC. Not only objtool but also resolve_btfids requires libelf-dev:native; therefore, CONFIG_DEBUG_INFO_BTF should be checked as well.
Similarly, CONFIG_SYSTEM_TRUSTED_KEYRING is not the only case that requires libssl-dev:native.
Perhaps, the following code would provide better coverage, but it is hard to maintain (and may still be imperfect).
if is_enabled CONFIG_OBJTOOL || is_enabled CONFIG_DEBUG_INFO_BTF; then build_depends="${build_depends}, libelf-dev:native" fi
if is_enabled CONFIG_SYSTEM_TRUSTED_KEYRING || is_enabled CONFIG_SYSTEM_REVOCATION_LIST || is_enabled CONFIG_MODULE_SIG_FORMAT; then build_depends="${build_depends}, libssl-dev:native" fi
Let's hard-code the build dependency.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
9c65810c |
| 19-Dec-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: split debian/copyright from the mkdebian script
Copy debian/copyright instead of generating it by the 'cat' command.
I also updated '2018' to '2023' while I was here.
Signed-off-b
kbuild: deb-pkg: split debian/copyright from the mkdebian script
Copy debian/copyright instead of generating it by the 'cat' command.
I also updated '2018' to '2023' while I was here.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3 |
|
| #
0df8e970 |
| 24-Nov-2023 |
Masahiro Yamada <[email protected]> |
scripts: clean up IA-64 code
A little more janitorial work after commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture").
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by
scripts: clean up IA-64 code
A little more janitorial work after commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture").
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5 |
|
| #
d9287ea8 |
| 01-Aug-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: split debian/rules
debian/rules is generated by shell, but the escape sequence (\$) is unreadable.
debian/rules embeds only two variables (ARCH and KERNELRELEASE).
Split them out
kbuild: deb-pkg: split debian/rules
debian/rules is generated by shell, but the escape sequence (\$) is unreadable.
debian/rules embeds only two variables (ARCH and KERNELRELEASE).
Split them out to debian/rules.vars, and check-in the rest of Makefile code to scripts/package/debian/rules.
Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
4b970e43 |
| 01-Aug-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: use Debian compliant shebang for debian/rules
Debian Policy "4.9. Main building script: debian/rules" requires "debian/rules must start with the line #!/usr/bin/make -f". [1]
Curre
kbuild: deb-pkg: use Debian compliant shebang for debian/rules
Debian Policy "4.9. Main building script: debian/rules" requires "debian/rules must start with the line #!/usr/bin/make -f". [1]
Currently, Kbuild does not follow this policy.
When Kbuild generates debian/rules, "#!$(command -v $MAKE) -f" is expanded by shell. The resuling string may not be "#!/usr/bin/make -f".
There was a reason to opt out the Debian policy.
If you run '/path/to/my/custom/make deb-pkg', debian/rules must also be invoked by the same Make program. If #!/usr/bin/make were hard-coded in debian/rules, the sub-make would be executed by a possibly different Make version.
This is problematic due to the MAKEFLAGS incompatibility, especially the job server flag. Old Make versions used --jobserver-fds to propagate job server file descriptors, but Make >= 4.2 uses --jobserver-auth. The flag disagreement between the parent/child Makes would result in a process fork explosion.
However, having a non-standard path in the shebang causes another issue; the generated source package is not portable as such a path does not exist in other build environments.
This commit solves those conflicting demands.
Hard-code '#!/usr/bin/make -f' in debian/rules to create a portable and Debian-compliant source package.
Pass '--rules-file=$(MAKE) -f debian/rules' when dpkg-buildpackage is invoked from Makefile so that debian/rules is executed by the same Make program as used to start Kbuild.
[1] https://www.debian.org/doc/debian-policy/ch-source.html#main-building-script-debian-rules
Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc4, v6.5-rc3 |
|
| #
76a48b8f |
| 22-Jul-2023 |
Masahiro Yamada <[email protected]> |
kbuild: add a phony target to run a command with Kbuild env vars
There are some cases where we want to run a command with the same environment variables as Kbuild uses. For example, 'make coccicheck
kbuild: add a phony target to run a command with Kbuild env vars
There are some cases where we want to run a command with the same environment variables as Kbuild uses. For example, 'make coccicheck' invokes scripts/coccicheck from the top Makefile so that the script can reference to ${LINUXINCLUDE}, ${KBUILD_EXTMOD}, etc. The top Makefile defines several phony targets that run a script.
We do it also for an internally used script, which results in a somewhat complex call graph.
One example:
debian/rules binary-arch -> make intdeb-pkg -> scripts/package/builddeb
It is also tedious to add a dedicated target like 'intdeb-pkg' for each use case.
Add a generic target 'run-command' to run an arbitrary command in an environment with all Kbuild variables set.
The usage is:
$ make run-command KBUILD_RUN_COMMAND=<command>
The concept is similar to:
$ dpkg-architecture -c <command>
This executes <command> in an environment which has all DEB_* variables defined.
Convert the existing 'make intdeb-pkg'.
Another possible usage is to interrogate a Make variable.
$ make run-command KBUILD_RUN_COMMAND='echo $(KBUILD_CFLAGS)'
might be useful to see KBUILD_CFLAGS set by the top Makefile.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1 |
|
| #
9892bd72 |
| 25-Apr-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: specify targets in debian/rules as .PHONY
If a file with the same name exists, the target is not run.
For example, the following command fails.
$ make O=build-arch bindeb-pkg
kbuild: deb-pkg: specify targets in debian/rules as .PHONY
If a file with the same name exists, the target is not run.
For example, the following command fails.
$ make O=build-arch bindeb-pkg [ snip ] sed: can't read modules.order: No such file or directory make[6]: *** [../Makefile:1577: __modinst_pre] Error 2 make[5]: *** [../scripts/Makefile.package:150: intdeb-pkg] Error 2 make[4]: *** [../Makefile:1657: intdeb-pkg] Error 2 make[3]: *** [debian/rules:14: binary-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[2]: *** [../scripts/Makefile.package:139: bindeb-pkg] Error 2
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
show more ...
|
|
Revision tags: v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5 |
|
| #
8b824220 |
| 31-Mar-2023 |
Woody Suwalski <[email protected]> |
kbuild: deb-pkg: Fix a spell typo in mkdebian script
Signed-off-by: Woody Suwalski <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
|
| #
aa7d233f |
| 10-Apr-2023 |
Masahiro Yamada <[email protected]> |
kbuild: give up untracked files for source package builds
When the source tree is dirty and contains untracked files, package builds may fail, for example, when a broken symlink exists, a file path
kbuild: give up untracked files for source package builds
When the source tree is dirty and contains untracked files, package builds may fail, for example, when a broken symlink exists, a file path contains whitespaces, etc.
Since commit 05e96e96a315 ("kbuild: use git-archive for source package creation"), the source tarball only contains committed files because it is created by 'git archive'. scripts/package/gen-diff-patch tries to address the diff from HEAD, but including untracked files by the hand-crafted script introduces more complexity. I wrote a patch [1] to make it work in most cases, but still wonder if this is what we should aim for.
To simplify the code, this patch just gives up untracked files. Going forward, it is your responsibility to do 'git add' for what you want in the source package. The script shows a warning just in case you forgot to do so. It should be checked only when building source packages.
[1]: https://lore.kernel.org/all/CAK7LNAShbZ56gSh9PrbLnBDYKnjtTkHMoCXeGrhcxMvqXGq9=g@mail.gmail.com/2-0001-kbuild-make-package-builds-more-robust.patch
Fixes: 05e96e96a315 ("kbuild: use git-archive for source package creation") Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc4, v6.3-rc3 |
|
| #
05e96e96 |
| 15-Mar-2023 |
Masahiro Yamada <[email protected]> |
kbuild: use git-archive for source package creation
Commit 5c3d1d0abb12 ("kbuild: add a tool to list files ignored by git") added a new tool, scripts/list-gitignored. My intention was to create sour
kbuild: use git-archive for source package creation
Commit 5c3d1d0abb12 ("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: 5c3d1d0abb12 ("kbuild: add a tool to list files ignored by git") Fixes: e0ca16749ac3 ("kbuild: make perf-tar*-src-pkg work without relying on git") Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|