| #
f6d82835 |
| 07-Apr-2023 |
Masahiro Yamada <[email protected]> |
kbuild: merge cmd_archive_linux and cmd_archive_perf
The two commands, cmd_archive_linux and cmd_archive_perf, are similar. Merge them to make it easier to add more changes to the git-archive comman
kbuild: merge cmd_archive_linux and cmd_archive_perf
The two commands, cmd_archive_linux and cmd_archive_perf, are similar. Merge them to make it easier to add more changes to the git-archive command.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
show more ...
|
| #
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-rc5, 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 ...
|
| #
81f59a26 |
| 15-Mar-2023 |
Masahiro Yamada <[email protected]> |
kbuild: rpm-pkg: move source components to rpmbuild/SOURCES
Prepare to add more files to the source RPM.
Also, fix the build error when KCONFIG_CONFIG is set: error: Bad file: ./.config: No such
kbuild: rpm-pkg: move source components to rpmbuild/SOURCES
Prepare to add more files to the source RPM.
Also, fix the build error when KCONFIG_CONFIG is set: error: Bad file: ./.config: No such file or directory
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc2, v6.3-rc1, v6.2 |
|
| #
1fc90958 |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: tar-pkg: use tar rules in scripts/Makefile.package
Use %.tar, %.tar.gz, %.tar.bz2, %.tar.xz, %.tar.zst rules in scripts/Makefile.package.
Signed-off-by: Masahiro Yamada <[email protected]
kbuild: tar-pkg: use tar rules in scripts/Makefile.package
Use %.tar, %.tar.gz, %.tar.bz2, %.tar.xz, %.tar.zst rules in scripts/Makefile.package.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
e0ca1674 |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: make perf-tar*-src-pkg work without relying on git
Currently, perf-tar*-src-pkg only uses 'git archive', but it is better to make it work without relying on git.
The file, HEAD, which saves
kbuild: make perf-tar*-src-pkg work without relying on git
Currently, perf-tar*-src-pkg only uses 'git archive', but it is better to make it work without relying on git.
The file, HEAD, which saves the commit hash, will be included in the tarball only when the source tree is managed by git. The git tree is more precisely checked; it has been copied from scripts/setlocalversion.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
e7853995 |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: switch over to source format 3.0 (quilt)
Change the source format from "1.0" to "3.0 (quilt)" because it works more cleanly.
All files except .config and debian/ go into the orig t
kbuild: deb-pkg: switch over to source format 3.0 (quilt)
Change the source format from "1.0" to "3.0 (quilt)" because it works more cleanly.
All files except .config and debian/ go into the orig tarball. Add a single patch, debian/patches/config, and delete the ugly extend-diff-ignore patterns.
The debian tarball will be compressed into *.debian.tar.xz by default. If you like to use a different compression mode, you can pass the command line option, DPKG_FLAGS=-Zgzip, for example.
The orig tarball only supports gzip for now. The combination of gzip and xz is somewhat clumsy, but it is not a practical problem.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
b44aa8c9 |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: make .orig tarball a hard link if possible
If '..' belongs to the same filesystem, create a hard link instead of a copy. In most cases, you can save disk space.
I do not want to us
kbuild: deb-pkg: make .orig tarball a hard link if possible
If '..' belongs to the same filesystem, create a hard link instead of a copy. In most cases, you can save disk space.
I do not want to use 'mv' because keeping linux.tar.gz is useful to avoid unneeded rebuilding of the tarball.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
6eabebb1 |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: hide KDEB_SOURCENAME from Makefile
scripts/Makefile.package does not need to know the value of KDEB_SOURCENAME because the source name can be taken from debian/changelog by using dp
kbuild: deb-pkg: hide KDEB_SOURCENAME from Makefile
scripts/Makefile.package does not need to know the value of KDEB_SOURCENAME because the source name can be taken from debian/changelog by using dpkg-parsechangelog.
Move the default of KDEB_SOURCENAME (i.e. linux-upstream) to scripts/package/mkdebian.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
| #
6fc91752 |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: srcrpm-pkg: create source package without cleaning
If you run 'make (src)rpm-pkg', all objects are lost due to 'make clean', which makes the incremental builds impossible.
Instead of cleani
kbuild: srcrpm-pkg: create source package without cleaning
If you run 'make (src)rpm-pkg', all objects are lost due to 'make clean', which makes the incremental builds impossible.
Instead of cleaning, pass the exclude list to tar's --exclude-from option.
Previously, the .config was contained in the source tarball.
With this commit, the source rpm consists of separate linux.tar.gz and .config.
Remove stale comments. Now, 'make (src)rpm-pkg' works with O= option.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
1ec9bb70 |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: rpm-pkg: build binary packages from source rpm
The build rules of rpm-pkg and srcrpm-pkg are almost the same. Remove the code duplication.
Change rpm-pkg to build binary packages from the s
kbuild: rpm-pkg: build binary packages from source rpm
The build rules of rpm-pkg and srcrpm-pkg are almost the same. Remove the code duplication.
Change rpm-pkg to build binary packages from the source package generated by srcrpm-pkg.
This changes the output directory of the srpm generated by 'make rpm-pkg' because srcrpm-pkg overrides _srcrpmdir.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
7bf4582d |
| 15-Feb-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: create source package without cleaning
If you run 'make deb-pkg', all objects are lost due to 'make clean', which makes the incremental builds impossible.
Instead of cleaning, pass
kbuild: deb-pkg: create source package without cleaning
If you run 'make deb-pkg', all objects are lost due to 'make clean', which makes the incremental builds impossible.
Instead of cleaning, pass the exclude list to tar's --exclude-from option.
Previously, *.diff.gz contained some check-in files such as .clang-format, .cocciconfig.
With this commit, *.diff.gz will only contain the .config and debian/. The other source files will go into the .orig tarball.
linux.tar.gz is rebuilt only when the source files that would go into the tarball are changed.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.2-rc8, v6.2-rc7, v6.2-rc6 |
|
| #
58e0e5c8 |
| 24-Jan-2023 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: add --source-option=-sP
If the source package fails to build, ../linux.orig is left over. In the next run of 'make deb-pkg', you will get the following error:
dpkg-source: error:
kbuild: deb-pkg: add --source-option=-sP
If the source package fails to build, ../linux.orig is left over. In the next run of 'make deb-pkg', you will get the following error:
dpkg-source: error: orig directory 'linux.orig' already exists, not overwriting, giving up; use -sA, -sK or -sP to override
You can manually remove ../linux.orig, but it is annoying.
Pass -sP down to dpkg-source.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
f6e09b07 |
| 22-Jan-2023 |
Masahiro Yamada <[email protected]> |
kbuild: do not put .scmversion into the source tarball
.scmversion is used by (src)rpm-pkg and deb-pkg to carry KERNELRELEASE.
In fact, deb-pkg does not rely on it any more because the generated de
kbuild: do not put .scmversion into the source tarball
.scmversion is used by (src)rpm-pkg and deb-pkg to carry KERNELRELEASE.
In fact, deb-pkg does not rely on it any more because the generated debian/rules specifies KERNELRELEASE from the command line.
Do likwise for (src)rpm-pkg, and remove this feature. For the same reason, you do not need to save LOCALVERSION in the spec file.
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2 |
|
| #
9c9b55a5 |
| 27-Dec-2022 |
Jun ASAKA <[email protected]> |
kbuild: add a missing line for help message
The help message line for building the source RPM package was missing. Added it.
Signed-off-by: Jun ASAKA <[email protected]> Reviewed-by: Nathan Ch
kbuild: add a missing line for help message
The help message line for building the source RPM package was missing. Added it.
Signed-off-by: Jun ASAKA <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7 |
|
| #
df1f1ea9 |
| 23-Nov-2022 |
Paran Lee <[email protected]> |
scripts: add rust in scripts/Makefile.package
Add rust argument at TAR_CONTENT in scripts/Makefile.package script with alphabetical order.
Signed-off-by: Paran Lee <[email protected]> Signed-off-b
scripts: add rust in scripts/Makefile.package
Add rust argument at TAR_CONTENT in scripts/Makefile.package script with alphabetical order.
Signed-off-by: Paran Lee <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
8818039f |
| 21-Nov-2022 |
Ivan Vecera <[email protected]> |
kbuild: add ability to make source rpm buildable using koji
Changes: - added new target 'srcrpm-pkg' to generate source rpm - added required build tools to spec file - removed locally compiled host
kbuild: add ability to make source rpm buildable using koji
Changes: - added new target 'srcrpm-pkg' to generate source rpm - added required build tools to spec file - removed locally compiled host tools to force their re-compile
Signed-off-by: Ivan Vecera <[email protected]> Signed-off-by: Jonathan Toppins <[email protected]> Acked-by: Íñigo Huguet <[email protected]> Tested-by: Ivan Vecera <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7 |
|
| #
a3c4d4ab |
| 24-Sep-2022 |
Masahiro Yamada <[email protected]> |
kbuild: hard-code KBUILD_ALLDIRS in scripts/Makefile.package
My future plan is to list subdirectories in ./Kbuild. When it occurs, $(vmlinux-alldirs) will not contain all subdirectories.
Let's hard
kbuild: hard-code KBUILD_ALLDIRS in scripts/Makefile.package
My future plan is to list subdirectories in ./Kbuild. When it occurs, $(vmlinux-alldirs) will not contain all subdirectories.
Let's hard-code the directory list until I get around to implementing a more sophisticated way for generating a source tarball.
Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Nick Desaulniers <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7 |
|
| #
6105e4f6 |
| 14-Jul-2022 |
Masahiro Yamada <[email protected]> |
kbuild: rpm-pkg: pass 'linux' to --target option of rpmbuild
Presumably, _target_os is defined even if the --target flag does not specify it, but it is better to make it explicit.
Signed-off-by: Ma
kbuild: rpm-pkg: pass 'linux' to --target option of rpmbuild
Presumably, _target_os is defined even if the --target flag does not specify it, but it is better to make it explicit.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5 |
|
| #
88f5e1e6 |
| 08-Oct-2021 |
Paweł Jasiak <[email protected]> |
kbuild: Add make tarzst-pkg build option
Add tarzst-pkg and perf-tarzst-src-pkg targets to build zstd compressed tarballs.
Signed-off-by: Paweł Jasiak <[email protected]> Signed-off-by: Masahiro Yam
kbuild: Add make tarzst-pkg build option
Add tarzst-pkg and perf-tarzst-src-pkg targets to build zstd compressed tarballs.
Signed-off-by: Paweł Jasiak <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12 |
|
| #
82526ef4 |
| 19-Apr-2021 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: change the source package name to linux-upstream
Change the source package name from 'linux-$(KERNELRELEASE)' to 'linux-upstream'.
Initially, I tried to use 'linux' to be aligned w
kbuild: deb-pkg: change the source package name to linux-upstream
Change the source package name from 'linux-$(KERNELRELEASE)' to 'linux-upstream'.
Initially, I tried to use 'linux' to be aligned with the Debian kernel package, but Ben suggested 'linux-upstream' so that it is clearly distinguished from distribution packages. [1]
The filenames will be changed as follows:
[Before] linux-5.12.0-rc3+_5.12.0-rc3+-1.dsc linux-5.12.0-rc3+_5.12.0-rc3+.orig.tar.gz linux-5.12.0-rc3+_5.12.0-rc3+-1.diff.gz
[After] linux-upstream_5.12.0-rc3+-1.dsc linux-upstream_5.12.0-rc3+.orig.tar.gz linux-upstream_5.12.0-rc3+-1.diff.gz
Commit 3716001bcb7f ("deb-pkg: add source package") introduced KDEB_SOURCENAME. If you are unhappy with the default name, you can override it via KDEB_SOURCENAME.
[1]: https://lore.kernel.org/linux-kbuild/[email protected]/T/#m2c4afa0eca5ced5e57795b002f2dbcb05d7a4a44
Suggested-by: Ben Hutchings <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1, v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5, v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1 |
|
| #
e4a42c82 |
| 08-Jun-2020 |
Denis Efremov <[email protected]> |
kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables
Redefine GZIP, BZIP2, LZOP variables as KGZIP, KBZIP2, KLZOP resp. GZIP, BZIP2, LZOP env variables are reserved by the tools. The origi
kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables
Redefine GZIP, BZIP2, LZOP variables as KGZIP, KBZIP2, KLZOP resp. GZIP, BZIP2, LZOP env variables are reserved by the tools. The original attempt to redefine them internally doesn't work in makefiles/scripts intercall scenarios, e.g., "make GZIP=gzip bindeb-pkg" and results in broken builds. There can be other broken build commands because of this, so the universal solution is to use non-reserved env variables for the compression tools.
Fixes: 8dfb61dcbace ("kbuild: add variables for compression tools") Signed-off-by: Denis Efremov <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
8dfb61dc |
| 05-Jun-2020 |
Denis Efremov <[email protected]> |
kbuild: add variables for compression tools
Allow user to use alternative implementations of compression tools, such as pigz, pbzip2, pxz. For example, multi-threaded tools to speed up the build: $
kbuild: add variables for compression tools
Allow user to use alternative implementations of compression tools, such as pigz, pbzip2, pxz. For example, multi-threaded tools to speed up the build: $ make GZIP=pigz BZIP2=pbzip2
Variables _GZIP, _BZIP2, _LZOP are used internally because original env vars are reserved by the tools. The use of GZIP in gzip tool is obsolete since 2015. However, alternative implementations (e.g., pigz) still rely on it. BZIP2, BZIP, LZOP vars are not obsolescent.
The credit goes to @grsecurity.
As a sidenote, for multi-threaded lzma, xz compression one can use: $ export XZ_OPT="--threads=0"
Signed-off-by: Denis Efremov <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.7, v5.7-rc7, v5.7-rc6, v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7, v5.6-rc6, v5.6-rc5, v5.6-rc4, v5.6-rc3, v5.6-rc2, v5.6-rc1, v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1, v5.4, v5.4-rc8, v5.4-rc7 |
|
| #
af7db99a |
| 04-Nov-2019 |
Matteo Croce <[email protected]> |
kbuild: Add make dir-pkg build option
Add a 'dir-pkg' target which just creates the same directory structures as in tar-pkg, but doesn't package anything. Useful when the user wants to copy the kern
kbuild: Add make dir-pkg build option
Add a 'dir-pkg' target which just creates the same directory structures as in tar-pkg, but doesn't package anything. Useful when the user wants to copy the kernel tree on a machine using ssh, rsync or whatever.
Signed-off-by: Matteo Croce <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.4-rc6, v5.4-rc5 |
|
| #
a64c0440 |
| 25-Oct-2019 |
Geert Uytterhoeven <[email protected]> |
kbuild: Wrap long "make help" text lines
Some "make help" text lines extend beyond 80 characters. Wrap them before an opening parenthesis, or before 80 characters.
Signed-off-by: Geert Uytterhoeven
kbuild: Wrap long "make help" text lines
Some "make help" text lines extend beyond 80 characters. Wrap them before an opening parenthesis, or before 80 characters.
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|