- 16 3月, 2023 1 次提交
-
-
由 Masahiro Yamada 提交于
Commit 5c3d1d0a ("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: 5c3d1d0a ("kbuild: add a tool to list files ignored by git") Fixes: e0ca1674 ("kbuild: make perf-tar*-src-pkg work without relying on git") Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 15 3月, 2023 3 次提交
-
-
由 Masahiro Yamada 提交于
Use dh_listpackages to get a list of all binary packages. With this, debian/control lists which binary packages will be produced. Previously, ARCH=um listed linux-libc-dev in debian/control, but it was not generated because each of mkdebian and builddeb independently maintained the if-conditionals. Another motivation is to allow scripts/package/builddeb to get the package name (linux-image-*, etc.) dynamically from debian/control. This will also allow the BuildProfile to control the generation of the binary packages. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> -
由 Masahiro Yamada 提交于
KERNELRELEASE does not need to match the package version in changelog. Rather, it conventially matches what is called 'ABINAME', which is a part of the binary package names. Both are the same by default, but the former might be overridden by KDEB_PKGVERSION. In this case, the resulting package would not boot because /lib/modules/$(uname -r) does not point the module directory. Partially revert 3ab18a62 ("kbuild: deb-pkg: improve the usability of source package"). Reported-by: NPéter Ujfalusi <peter.ujfalusi@linux.intel.com> Fixes: 3ab18a62 ("kbuild: deb-pkg: improve the usability of source package") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Tested-by: NPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
-
由 Masahiro Yamada 提交于
Since commit c5bf2efb ("kbuild: deb-pkg: fix binary-arch and clean in debian/rules"), the source package generated by 'make deb-pkg' fails to build. I terribly missed the fact that the intdeb-pkg target may regenerate include/config/kernel.release due to the following in the top Makefile: %pkg: include/config/kernel.release FORCE Restore KERNELRELEASE= option to avoid the kernel.release disagreement between build-arch and binary-arch. Fixes: c5bf2efb ("kbuild: deb-pkg: fix binary-arch and clean in debian/rules") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 26 2月, 2023 5 次提交
-
-
由 Masahiro Yamada 提交于
Improve the source package support in case the dpkg-buildpackage is directly used to build binary packages. For cross-compiling, you can set CROSS_COMPILE via the environment variable, but it is better to set it automatically - set it to ${DEB_HOST_GNU_TYPE}- if we are cross-compiling but not from the top Makefile. The generated source package may be carried to a different build environment, which may have a different compiler installed. Run olddefconfig first to set new CONFIG options to their default values without prompting. Take KERNELRELEASE and KBUILD_BUILD_VERSION from the version field of debian/changelog in case it is updated afterwards. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> -
由 Masahiro Yamada 提交于
The clean target needs ARCH=${ARCH} to clean up the tree for the correct architecture. 'make (bin)deb-pkg' skips cleaning, but the preclean hook may be executed if dpkg-buildpackage is directly used. The binary-arch target does not need KERNELRELEASE because it is not updated during the installation. KBUILD_BUILD_VERSION is not needed either because binary-arch does not build vmlinux. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> -
由 Masahiro Yamada 提交于
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: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NNicolas Schier <nicolas@fjasle.eu>
-
由 Masahiro Yamada 提交于
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: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NNicolas Schier <nicolas@fjasle.eu>
-
由 Masahiro Yamada 提交于
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: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NNicolas Schier <nicolas@fjasle.eu>
-
- 26 1月, 2023 1 次提交
-
-
由 Bastian Germann 提交于
For each binary Debian package, a directory with the package name is created in the debian directory. Correct the generated file matches in the package's clean target, which were renamed without adjusting the target. Fixes: 1694e94e ("builddeb: match temporary directory name to the package name") Signed-off-by: NBastian Germann <bage@linutronix.de> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 21 11月, 2022 1 次提交
-
-
由 Masahiro Yamada 提交于
"| flex:native" was a workaround (suggested by Ben, see Link) because "MultiArch: foreign" was missing in the flex package on some old distros when commit e3a22850 ("deb-pkg: generate correct build dependencies") was applied. It seems fixing the flex package has been completed. Get rid of the workaround. Link: https://lore.kernel.org/linux-kbuild/ab49b0582ef12b14b1a68877263b81813e2492a2.camel@decadent.org.uk/ Link: https://wiki.debian.org/CrossBuildPackagingGuidelinesSigned-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NBen Hutchings <ben@decadent.org.uk>
-
- 17 11月, 2022 1 次提交
-
-
由 Marc Zyngier 提交于
Since 2df8220c ("kbuild: build init/built-in.a just once"), generating Debian packages using 'make bindeb-pkg' results in packages that are stuck to the same .version, leading to unexpected behaviours (multiple packages with the same version). That's because the mkdebian script samples the build version before building the kernel, and forces the use of that version number for the actual build. Restore the previous behaviour by calling init/build-version instead of reading the .version file. This is likely to result in too many .version bumps, but this is what was happening before (although the bump was affecting builds made after the current one). Fixes: 2df8220c ("kbuild: build init/built-in.a just once") Signed-off-by: NMarc Zyngier <maz@kernel.org> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 14 10月, 2020 2 次提交
-
-
由 Masahiro Yamada 提交于
Hard-code the names of linux-headers and debug packages in the control file. The kernel package is different for ARCH=um. Change the code for better readability. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> -
由 Masahiro Yamada 提交于
Since commit 269a535c ("modpost: generate vmlinux.symvers and reuse it for the second modpost"), with CONFIG_MODULES disabled, "make deb-pkg" (or "make bindeb-pkg") fails with: find: ‘Module.symvers’: No such file or directory If CONFIG_MODULES is disabled, it doesn't really make sense to build the linux-headers package. Fixes: 269a535c ("modpost: generate vmlinux.symvers and reuse it for the second modpost") Reported-by: NJosh Triplett <josh@joshtriplett.org> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 09 10月, 2020 2 次提交
-
-
由 Guillem Jover 提交于
These have been required by the Debian policy for a while, even though the tooling can detect and workaround their omission, but are a hard requirement when using rootless builds. [masahiro: The following Debian policy is particularly important for rootless builds: "Both binary-* targets should depend on the build target, or on the appropriate build-arch or build-indep target, so that the package is built if it has not been already." ] Signed-off-by: NGuillem Jover <guillem@hadrons.org> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Guillem Jover 提交于
This makes it possible to build the Debian packages without requiring (pseudo-)root privileges, when the build drivers support this mode of operation. See-Also: /usr/share/doc/dpkg/rootless-builds.txt.gz Signed-off-by: NGuillem Jover <guillem@hadrons.org> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 10 8月, 2020 1 次提交
-
-
由 Alexander A. Klimov 提交于
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: NAlexander A. Klimov <grandmaster@al2klimov.de> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 30 3月, 2020 1 次提交
-
-
由 Reinhard Karcher 提交于
Creating a Debian package without CONFIG_DEBUG_INFO produces a warning that no debug package was created. This patch excludes the debug package from the control file, if no debug package is created by this configuration. Signed-off-by: NReinhard Karcher <reinhard.karcher@gmx.net> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 03 1月, 2020 1 次提交
-
-
由 Ard Biesheuvel 提交于
Cross compiling the x86 kernel on a non-x86 build machine produces the following error when CONFIG_UNWINDER_ORC is enabled, regardless of whether libelf-dev is installed or not. dpkg-checkbuilddeps: error: Unmet build dependencies: libelf-dev dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: warning: (Use -d flag to override.) Since this is a build time dependency for a build tool, we need to depend on the native version of libelf-dev so add the appropriate annotation. Signed-off-by: NArd Biesheuvel <ardb@kernel.org> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 17 12月, 2019 1 次提交
-
-
We've missed the dependency to rsync, so build fails on minimal containers. Fixes: 59b2bd05 ("kbuild: add 'headers' target to build up uapi headers in usr/include") Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 17 7月, 2019 1 次提交
-
-
由 Cedric Hombourger 提交于
Debian-based distributions place libc header files in a machine specific directory (/usr/include/<libc-machine>) instead of /usr/include/asm to support installation of the linux-libc-dev package from multiple architectures. Move headers installed by "make headers_install" accordingly using Debian's tuple from dpkg-architecture (stored in debian/arch). Signed-off-by: NCedric Hombourger <Cedric_Hombourger@mentor.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 17 3月, 2019 1 次提交
-
-
由 Arseny Maslennikov 提交于
* The man page for dpkg-source(1) notes: > -b, --build directory [format-specific-parameters] > Build a source package (--build since dpkg 1.17.14). > <...> > > dpkg-source will build the source package with the first > format found in this ordered list: the format indicated > with the --format command line option, the format > indicated in debian/source/format, “1.0”. The fallback > to “1.0” is deprecated and will be removed at some point > in the future, you should always document the desired > source format in debian/source/format. See section > SOURCE PACKAGE FORMATS for an extensive description of > the various source package formats. Thus it would be more foolproof to explicitly use 1.0 (as we always did) than to rely on dpkg-source's defaults. * In a similar vein, debian/rules is not made executable by mkdebian, and dpkg-source warns about that but still silently fixes the file. Let's be explicit once again. Signed-off-by: NArseny Maslennikov <ar@cs.msu.ru> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 14 3月, 2019 3 次提交
-
-
由 Masahiro Yamada 提交于
This will be a little more efficient since unset CONFIG options are stripped away from auto.conf, and we can hard-code the path to auto.conf since it is never overridden. include/config/kernel.release is generated before %pkg is run. So, it is guaranteed auto.conf is up-to-date. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> -
由 Masahiro Yamada 提交于
This might be a kind of bike-shed, but I personally prefer grep'able code. I often do 'git grep CONFIG_FOO' instead of 'git grep FOO' when I want to know where that CONFIG option is used. This makes code longer, but I hope this is acceptable level. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> -
由 Riku Voipio 提交于
bison/flex is now needed always for building for kconfig. Some build dependencies depend on kernel configuration, enable them as needed: - libelf-dev when UNWINDER_ORC is set - libssl-dev for SYSTEM_TRUSTED_KEYRING Since the libssl-dev is needed for extract_cert binary, denote with :native to install the libssl-dev for the build machines architecture, rather than for the architecture of the kernel being built. Tested-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org> Reviewed-by: NBen Hutchings <ben@decadent.org.uk> Acked-by: Nmaximilian attems <maks@stro.at> [masahiro.yamada: change 'flex' to 'flex | flex:native' ] Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 20 2月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
'$(MAKE) KBUILD_SRC=' changes the working directory back and forth between objtree and srctree. It is better to recurse to the top-level Makefile directly. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 11 11月, 2018 1 次提交
-
-
由 Masahiro Yamada 提交于
Since commit b41d920a ("kbuild: deb-pkg: split generating packaging and build"), the build version of the kernel contained in a deb package is too low by 1. Prior to the bad commit, the kernel was built first, then the number in .version file was read out, and written into the debian control file. Now, the debian control file is created before the kernel is actually compiled, which is causing the version number mismatch. Let the mkdebian script pass KBUILD_BUILD_VERSION=${revision} to require the build system to use the specified version number. Fixes: b41d920a ("kbuild: deb-pkg: split generating packaging and build") Reported-by: NDoug Smythies <dsmythies@telus.net> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NDoug Smythies <dsmythies@telus.net>
-
- 28 7月, 2018 12 次提交
-
-
由 Ben Hutchings 提交于
Different generations of the SH architecture are not very compatible, so there are/were separate Debian ports for SH3 and SH4. Move the fallback out of the "case" statement, so that it will also be used in case we find some SH architecture version without a known mapping. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
Debian currently only defines "riscv64", but it seems safe to assume that any 32-bit port will now be called "riscv32", also matching $UTS_MACHINE. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
We currently label 64-bit kernel packages as sparc (32-bit), mostly because it was officially supported while sparc64 was not. Now neither is officially supported, so label these packages as sparc64. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
MIPS R6 is not fully backward-compatible, so Debian has separate architecture names for userland built for R6. Label kernel packages accordingly. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
We currently label 64-bit little-endian kernel packages as mipsel (32-bit little-endian), mostly it was officially supported while mips64el (64-bit little-endian) was not. Now both are officially supported, so label these packages as mips64el. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
We currently label 64-bit big-endian kernel packages as powerpc (32-bit), mostly because it was officially supported while ppc64 (64-bit big-endian) was not. Now neither is officially supported, so label these packages as ppc64. Debian also has a powerpcspe (32-bit with SPE) architecture. Label packages with a suitable configuration as powerpcspe. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
We now have many repetitive greps over the kernel config. Refactor them into functions. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
s390 now only supports 64-bit configurations. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
We currently use dpkg --print-architecture, which reports the architecture of the build machine. We can make a better guess than this by asking dpkg-architecture what the host architecture, i.e. the default architecture for building packages, is. This is sensitive to environment variables such as CC and DEB_HOST_ARCH, which should already be set in a cross-build environment. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Ben Hutchings 提交于
If KBUILD_DEBARCH is set then we will not use the result of architecture detection, and we may also warn unnecessarily. Move the check for KBUILD_DEBARCH further up to avoid this. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 17 5月, 2018 1 次提交
-
-
由 Riku Voipio 提交于
There is multiple issues with the genaration of maintainer string It uses DEBEMAIL and EMAIL enviroment variables, which may contain angle brackets, creating invalid maintainer strings. The documented KBUILD_BUILD_USER and KBUILD_BUILD_HOST variables are not used. Undocumented and uncommon NAME variable is used. Refactor the Maintainer string to: - use EMAIL or DEBEMAIL directly if they are in form "name <user@host>" - use KBUILD_BUILD_USER and KBUILD_BUILD_HOST if set before falling back to autodetection - no longer use NAME variable or the useless Anonymous string The logic is switched from multiline if/then/fi statements to compact shell variable substition commands. Reported-by: NMathieu Malaterre <malat@debian.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-