| #
f8e05c10 |
| 28-Nov-2025 |
Nicolas Schier <nsc@kernel.org> |
kbuild: Add top-level target for building gen_init_cpio
Add a top-level target for building gen_init_cpio to prevent re-entering kbuild for 'modules-cpio-pkg'.
The recently introduced target 'modul
kbuild: Add top-level target for building gen_init_cpio
Add a top-level target for building gen_init_cpio to prevent re-entering kbuild for 'modules-cpio-pkg'.
The recently introduced target 'modules-cpio-pkg' depends on gen_init_cpio but there is no simple way to add this dependency as a prerequisite that can be built in parallel to other recipes.
Introducing the top-level target, enables fixing this and also prepares a possible move of gen_init_cpio from usr/ to scripts/.
Signed-off-by: Nicolas Schier <nsc@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20251128-kbuild-add-top-level-target-for-building-gen_init_cpio-v1-1-84c63a8fc8d4@kernel.org Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| #
2a9c8c0b |
| 25-Nov-2025 |
Sascha Hauer <s.hauer@pengutronix.de> |
kbuild: add target to build a cpio containing modules
Add a new package target to build a cpio archive containing the kernel modules. This is particularly useful to supplement an existing initramfs
kbuild: add target to build a cpio containing modules
Add a new package target to build a cpio archive containing the kernel modules. This is particularly useful to supplement an existing initramfs with the kernel modules so that the root filesystem can be started with all needed kernel modules without modifying it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Co-developed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nicolas Schier <nsc@kernel.org> Link: https://patch.msgid.link/20251125-cpio-modules-pkg-v2-2-aa8277d89682@pengutronix.de Signed-off-by: Nicolas Schier <nsc@kernel.org>
show more ...
|
| #
cb08a026 |
| 22-Oct-2024 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: disable kernel-devel package when cross-compiling
Since commit f1d87664b82a ("kbuild: cross-compile linux-headers package when possible"), 'make binrpm-pkg' may attempt to cross-com
kbuild: rpm-pkg: disable kernel-devel package when cross-compiling
Since commit f1d87664b82a ("kbuild: cross-compile linux-headers package when possible"), 'make binrpm-pkg' may attempt to cross-compile the kernel-devel package, but it fails under certain circumstances.
For example, when CONFIG_MODULE_SIG_FORMAT is enabled on openSUSE Tumbleweed, the following command fails:
$ make ARCH=arm64 CROSS_COMPILE=aarch64-suse-linux- binrpm-pkg [ snip ] Rebuilding host programs with aarch64-suse-linux-gcc... HOSTCC /home/masahiro/ref/linux/rpmbuild/BUILDROOT/kernel-6.12.0_rc4-1.aarch64/usr/src/kernels/6.12.0-rc4/scripts/kallsyms HOSTCC /home/masahiro/ref/linux/rpmbuild/BUILDROOT/kernel-6.12.0_rc4-1.aarch64/usr/src/kernels/6.12.0-rc4/scripts/sorttable HOSTCC /home/masahiro/ref/linux/rpmbuild/BUILDROOT/kernel-6.12.0_rc4-1.aarch64/usr/src/kernels/6.12.0-rc4/scripts/asn1_compiler HOSTCC /home/masahiro/ref/linux/rpmbuild/BUILDROOT/kernel-6.12.0_rc4-1.aarch64/usr/src/kernels/6.12.0-rc4/scripts/sign-file /home/masahiro/ref/linux/rpmbuild/BUILDROOT/kernel-6.12.0_rc4-1.aarch64/usr/src/kernels/6.12.0-rc4/scripts/sign-file.c:25:10: fatal error: openssl/opensslv.h: No such file or directory 25 | #include <openssl/opensslv.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated.
I believe this issue is less common on Fedora because the disto's cross- compilier cannot link user-space programs. Hence, CONFIG_CC_CAN_LINK is unset.
On Fedora 40, the package information explains this limitation clearly:
$ dnf info gcc-aarch64-linux-gnu [ snip ] Description : Cross-build GNU C compiler. : : Only building kernels is currently supported. Support for cross-building : user space programs is not currently provided as that would massively multiply : the number of packages.
Anyway, cross-compiling RPM packages is somewhat challenging.
This commit disables the kernel-devel package when cross-compiling because I did not come up with a better solution.
Fixes: f1d87664b82a ("kbuild: cross-compile linux-headers package when possible") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| #
5b000f3c |
| 16-Aug-2024 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: pacman-pkg: do not override objtree
objtree is defined and exported by the top-level Makefile. I prefer not to override it.
There is no need to pass the absolute path of objtree. PKGBUILD c
kbuild: pacman-pkg: do not override objtree
objtree is defined and exported by the top-level Makefile. I prefer not to override it.
There is no need to pass the absolute path of objtree. PKGBUILD can detect it by itself.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Christian Heusel <christian@heusel.eu>
show more ...
|
| #
c8578539 |
| 20-Jul-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
kbuild: add script and target to generate pacman package
pacman is the package manager used by Arch Linux and its derivates. Creating native packages from the kernel tree has multiple advantages:
*
kbuild: add script and target to generate pacman package
pacman is the package manager used by Arch Linux and its derivates. Creating native packages from the kernel tree has multiple advantages:
* The package triggers the correct hooks for initramfs generation and bootloader configuration * Uninstallation is complete and also invokes the relevant hooks * New UAPI headers can be installed without any manual bookkeeping
The PKGBUILD file is a modified version of the one used for the downstream Arch Linux "linux" package. Extra steps that should not be necessary for a development kernel have been removed and an UAPI header package has been added.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
c6156653 |
| 16-Jun-2024 |
Thayne Harbaugh <thayne@mastodonlabs.com> |
kbuild: Fix build target deb-pkg: ln: failed to create hard link
The make deb-pkg target calls debian-orig which attempts to either hard link the source .tar to the build-output location or copy the
kbuild: Fix build target deb-pkg: ln: failed to create hard link
The make deb-pkg target calls debian-orig which attempts to either hard link the source .tar to the build-output location or copy the source .tar to the build-output location. The test to determine whether to ln or cp is incorrectly expanded by Make and consequently always attempts to ln the source .tar. This fix corrects the escaping of '$' so that the test is expanded by the shell rather than by Make and appropriately selects between ln and cp.
Fixes: b44aa8c96e9e ("kbuild: deb-pkg: make .orig tarball a hard link if possible") Signed-off-by: Thayne Harbaugh <thayne@mastodonlabs.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
e2bad142 |
| 06-Mar-2024 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: unexport abs_srctree and abs_objtree
Commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory") exported abs_srctree and abs_objtree to avoid recomputation after the sub-make.
kbuild: unexport abs_srctree and abs_objtree
Commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory") exported abs_srctree and abs_objtree to avoid recomputation after the sub-make. However, this approach turned out to be fragile.
Commit 5fa94ceb793e ("kbuild: set correct abs_srctree and abs_objtree for package builds") moved them above "ifneq ($(sub_make_done),1)", eliminating the need for exporting them.
These are only needed in the top Makefile. If an absolute path is required in sub-directories, you can use $(abspath ) or $(realpath ) as needed.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|
| #
53243e09 |
| 29-Nov-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: deb-pkg: remove the fakeroot builds support
In 2017, the dpkg suite introduced the rootless builds support with the following commits:
- 2436807c87b0 ("dpkg-deb: Add support for rootless
kbuild: deb-pkg: remove the fakeroot builds support
In 2017, the dpkg suite introduced the rootless builds support with the following commits:
- 2436807c87b0 ("dpkg-deb: Add support for rootless builds") - fca1bfe84068 ("dpkg-buildpackage: Add support for rootless builds")
This feature is available in the default dpkg on Debian 10 and Ubuntu 20.04.
Remove the old method.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
ef6609ad |
| 23-Nov-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: remove the last use of old cmd_src_tar rule in packaging
The rpm-pkg and deb-pkg targets have transitioned to using 'git archive' for tarball creation.
Although the old cmd_src_tar is still
kbuild: remove the last use of old cmd_src_tar rule in packaging
The rpm-pkg and deb-pkg targets have transitioned to using 'git archive' for tarball creation.
Although the old cmd_src_tar is still used by snap-pkg, there is no need to pack and unpack a tarball solely for passing the source to snapcraft.
Instead, you can use 'source-type: local' to tell the source location to snapcraft.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
259b8bd1 |
| 05-Nov-2023 |
Dmitrii Bundin <dmitrii.bundin.a@gmail.com> |
kbuild: deb-pkg: apply short -R and -j options
The long version --rules-file and --jobs are available since 1.18.8 while their short analogues -R and -j have been added since 1.14.7.
The option --r
kbuild: deb-pkg: apply short -R and -j options
The long version --rules-file and --jobs are available since 1.18.8 while their short analogues -R and -j have been added since 1.14.7.
The option --rules-file the way it works currently was introduced in the commit 5cd52673aabdf5eaa58181972119a41041fc85f2 of dpkg dated 23.07.18 with the following changelog entry:
* Fix dpkg-buildpackage option --rules-file parsing. It was trying to parse it as --rules-target, which due to the ordering was a no-op.
The current behavior of the long version --rules-file is guaranteed to be in use starting 1.19.1 and might cause build failures for some versions newer than 1.18.8 even in spite of being documented that way.
Signed-off-by: Dmitrii Bundin <dmitrii.bundin.a@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
a55d4aee |
| 01-Oct-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: make binrpm-pkg always produce kernel-devel package
The generation of the kernel-devel package is disabled for binrpm-pkg presumably because it was quite big (>= 200MB) and took a long time
kbuild: make binrpm-pkg always produce kernel-devel package
The generation of the kernel-devel package is disabled for binrpm-pkg presumably because it was quite big (>= 200MB) and took a long time to package.
Commit fe66b5d2ae72 ("kbuild: refactor kernel-devel RPM package and linux-headers Deb package") reduced the package size to 12MB, and now it is quick to build. It won't hurt to have binrpm-pkg generate it by default.
If you want to skip the kernel-devel package generation, you can pass RPMOPTS='--without devel':
$ make binrpm-pkg RPMOPTS='--without devel'
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| #
ffa46bbc |
| 30-Sep-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/
kernel.spec is the last piece that resides outside the rpmbuild/ directory. Move all the RPM-related files to rpmbuild/ consistently.
Signed
kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/
kernel.spec is the last piece that resides outside the rpmbuild/ directory. Move all the RPM-related files to rpmbuild/ consistently.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| #
ed79c34d |
| 21-Aug-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: deb-pkg: support DEB_BUILD_OPTIONS=parallel=N in debian/rules
'make srcdeb-pkg' generates a source package, which you can build later by using dpkg-buildpackage.
In older dpkg versions, 'dp
kbuild: deb-pkg: support DEB_BUILD_OPTIONS=parallel=N in debian/rules
'make srcdeb-pkg' generates a source package, which you can build later by using dpkg-buildpackage.
In older dpkg versions, 'dpkg-buildpackage --jobs=N' sets not only DEB_BUILD_OPTIONS but also MAKEFLAGS. Hence, passing -j or --jobs to dpkg-buildpackage was enough for kicking the parallel execution.
The behavior was changed by commit 1d0ea9b2ba3f ("dpkg-buildpackage: Change -j, --jobs semantics to non-force mode") of dpkg project. [1]
Since then, 'dpkg-buildpackage --jobs=N' sets only DEB_BUILD_OPTIONS, which is not parsed by the current debian/rules. To build the package in parallel, you need to pass the alternative --jobs-force option or set the MAKEFLAGS environment variable.
Debian policy [2] suggests the following code snippet for debian/rules.
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(NUMJOBS) endif
I tweaked the code to filter out parallel=1 and passed --jobs=1 to dpkg-buildpackage from scripts/Makefile.package. It is needed to force 'make deb-pkg' without the -j option to run in serial. Please note that dpkg-buildpackage sets parallel=<nproc> in DEB_BUILD_OPTIONS by default (that is, --jobs=auto is the default) and --jobs=1 is needed to restore the serial execution. When dpkg-buildpackage is invoked from Kbuild, the number of jobs is inherited from the top level Makefile. Passing --jobs=1 to dpkg-buildpackage allows debian/rules to skip parsing DEB_BUILD_OPTIONS.
[1] https://salsa.debian.org/dpkg-team/dpkg/-/commit/1d0ea9b2ba3f6a2de5b1a6ff55f3df7b71f73db6 [2] https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
Reported-by: Bastian Germann <bage@linutronix.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
4b970e43 |
| 01-Aug-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
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 <masahiroy@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|
| #
783c55ae |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: skip build dependency check on non-rpm systems
Commit 8818039f959b ("kbuild: add ability to make source rpm buildable using koji") added the BuildRequires: field.
Checking the buil
kbuild: rpm-pkg: skip build dependency check on non-rpm systems
Commit 8818039f959b ("kbuild: add ability to make source rpm buildable using koji") added the BuildRequires: field.
Checking the build dependency is fine, but one annoyance is that 'make (bin)rpm-pkg' fails on non-rpm systems [1]. For example, Debian provides rpmbuild via 'apt install rpm', but of course cannot meet the requirement listed in the BuildRequires: field.
It is possible to pass RPMOPTS=--nodeps to work around it, but it is reasonable to do it automatically.
If 'rpm -q rpm' fails, it is not an RPM-managed system. (The command 'rpm' is not installed at all, or was installed by other means.)
In that case, pass --nodeps to skip the build dependency check.
[1]: https://lore.kernel.org/linux-kbuild/Y6mkdYQYmjUz7bqV@li-4a3a4a4c-28e5-11b2-a85c-a8d192c6f089.ibm.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
37477496 |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: refactor *rpm-pkg targets
Merge the similar build targets.
Also, make the output location consistent.
Previously, source packages were created in the build directory, while binary
kbuild: rpm-pkg: refactor *rpm-pkg targets
Merge the similar build targets.
Also, make the output location consistent.
Previously, source packages were created in the build directory, while binary packages under ~/rpmbuild/RPMS/.
Now, Kbuild creates the rpmbuild/ directory in the build directory, and saves all packages under it.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
6db9ced4 |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: build the kernel in-place for rpm-pkg
Currently, 'make rpm-pkg' always builds the kernel from the pristine source tree in the ~/rpmbuild/BUILD/ directory.
Build the kernel incremen
kbuild: rpm-pkg: build the kernel in-place for rpm-pkg
Currently, 'make rpm-pkg' always builds the kernel from the pristine source tree in the ~/rpmbuild/BUILD/ directory.
Build the kernel incrementally just like 'make binrpm-pkg'.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
975667d0 |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: rename binkernel.spec to kernel.spec
Now kernel.spec and binkernel.spec have the exactly same contents.
Use kernel.spec for binrpm-pkg as well.
Signed-off-by: Masahiro Yamada <mas
kbuild: rpm-pkg: rename binkernel.spec to kernel.spec
Now kernel.spec and binkernel.spec have the exactly same contents.
Use kernel.spec for binrpm-pkg as well.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
2a291fc3 |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: introduce %{with_devel} switch to select devel package
scripts/package/mkspec preprocesses the spec file by sed, but it is unreadable. This commit removes the last portion of the se
kbuild: rpm-pkg: introduce %{with_devel} switch to select devel package
scripts/package/mkspec preprocesses the spec file by sed, but it is unreadable. This commit removes the last portion of the sed scripting.
Remove the $S$M prefixes from the conditionally generated lines. Instead, surround the code with %if %{with_devel} ... %endif.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
1789fc91 |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg
To reduce the preprocess of the spec file, invoke the kernel build from rpmbuild.
Run init/build-version to increment the relea
kbuild: rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg
To reduce the preprocess of the spec file, invoke the kernel build from rpmbuild.
Run init/build-version to increment the release number not only for binrpm-pkg but also for srcrpm-pkg and rpm-pkg.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
76a48b8f |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
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 <masahiroy@kernel.org>
show more ...
|
| #
19286825 |
| 22-Jul-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rpm-pkg: do not hard-code $MAKE in spec file
Currently, $MAKE will expand to the GNU Make program that created the source RPM. This is problematic if you carry it to a different build host t
kbuild: rpm-pkg: do not hard-code $MAKE in spec file
Currently, $MAKE will expand to the GNU Make program that created the source RPM. This is problematic if you carry it to a different build host to run 'rpmbuild' there.
Consider this command:
$ /path/to/my/custom/make srcrpm-pkg
The spec file in the SRPM will record '/path/to/my/custom/make', which exists only on that build environment.
To create a portable SRPM, the spec file should avoid hard-coding $MAKE.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
| #
d55571c0 |
| 30-Apr-2023 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
- Refactor scripts/kallsyms to make it faster and easier t
Merge tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
- Refactor scripts/kallsyms to make it faster and easier to maintain
- Clean up menuconfig
- Provide Clang with hard-coded target triple instead of CROSS_COMPILE
- Use -z pack-relative-relocs flags instead of --use-android-relr-tags for arm64 CONFIG_RELR
- Add srcdeb-pkg target to build only a Debian source package
- Add KDEB_SOURCE_COMPRESS option to specify the compression for a Debian source package
- Misc cleanups and fixes
* tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: deb-pkg: specify targets in debian/rules as .PHONY sparc: unify sparc32/sparc64 archhelp kbuild: rpm-pkg: remove kernel-drm PROVIDES kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify source compression kbuild: add srcdeb-pkg target Makefile: use -z pack-relative-relocs kbuild: clang: do not use CROSS_COMPILE for target triple kconfig: menuconfig: reorder functions to remove forward declarations kconfig: menuconfig: remove unused M_EVENT macro kconfig: menuconfig: remove OLD_NCURSES macro kbuild: builddeb: Eliminate debian/arch use scripts/kallsyms: update the usage in the comment block scripts/kallsyms: decrease expand_symbol() / cleanup_symbol_name() calls scripts/kallsyms: change the output order scripts/kallsyms: move compiler-generated symbol patterns to mksysmap scripts/kallsyms: exclude symbols generated by itself dynamically scripts/mksysmap: use sed with in-line comments scripts/mksysmap: remove comments described in nm(1) scripts/kallsyms: remove redundant code for omitting U and N kallsyms: expand symbol name into comment for debugging
show more ...
|
| #
1d29b4c2 |
| 17-Apr-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify source compression
Add KDEB_SOURCE_COMPRESS to specify the compression for the orig and debian tarballs. (cf. the existing KDEB_COMPRESS is used
kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify source compression
Add KDEB_SOURCE_COMPRESS to specify the compression for the orig and debian tarballs. (cf. the existing KDEB_COMPRESS is used to specify the compression for binary packages.)
Supported algorithms are gzip, bzip2, lzma, and xz, all of which are supported by dpkg-source.
The current default is gzip. You can change it via the environment variable, for example, 'KDEB_SOURCE_COMPRESS=xz make deb-pkg'.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|
| #
31f735c6 |
| 17-Apr-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: add srcdeb-pkg target
This new target builds only the debian source package.
Unify the build rules of deb-pkg, srcdeb-pkg, bindeb-pkg to avoid code duplication.
--no-check-builddeps is add
kbuild: add srcdeb-pkg target
This new target builds only the debian source package.
Unify the build rules of deb-pkg, srcdeb-pkg, bindeb-pkg to avoid code duplication.
--no-check-builddeps is added to srcdeb-pkg so that build dependencies will not be checked.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|