The previous commit spotted that "Tarball successfully created ..."
is displayed even if the "tar" command returns error code because
it is followed by "| ${compress}".
Let the build fail instead of printing the successful message since
if the "tar" command fails, the output may not be what users expect.
Avoid the use of the pipe. While we are here, refactor the script
removing the use of sub-shell, ${compress}, ${file_ext}.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
$tmpdir/lib is created by "make modules_install". It does not exist
if CONFIG_MODULES is disabled, then tar reports the following messages:
tar: lib: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Previously, .config was used in buildtar script regardless of the value of
KCONFIG_CONFIG.
Signed-off-by: Nicolas Porcel <nicolasporcel06@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
- Clean up builddeb script
- Use full path for KBUILD_IMAGE to fix rpm-pkg build
- Fix objdiff tool to ignore debug info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJZE6tOAAoJED2LAQed4NsG2o4P/ii2YuHMrxUh5J6KbC1ilLLC
aGcapg+CQ+pFqMeVIbofaEdJI/+vofajG8Eh5vVr8R4Hj3i7PA+2AFgg3cNe2hFE
OSHJbb3YTkYJJzG+s+BynF1dla03Yyo/sOHoV4yRst/hiEJHpLlOJgieIM9bv8pq
1DjBseHSrPGqUtvBuLoNwCbylhgyHiL5FycH//dpVbpNpoiy+HzSrcmXgT+rtbwJ
qPEdf5QqapM0T83uxaYDko6VRYBIHOu9kQnVMUKS9+Qsqxm0NzO7Q8fFMdZpA8QY
HCTFCQszeJid4VZO7VqKVCV40g3KGdAuCPPW7lZZO0H/AVEVqUv9PWOnuPCiyhJc
ZXX7fmehvToHC0lbpC4GCHEQ9VxKF3KiNJUusDkFm63oSmvoaiRR2GGzWidpQ0eq
l/lWB2/YygCQjs+kucDLhdIQjW89lkIBehXtZ28gkRYiLCbvQBpINHXrvZ/ai5uO
hJ8hVyWnCkghm7alQDCktohMgRmcgUMPTByYcfbQG03vYBVITS9FBzvfSJgmRksQ
DhPLakWq2Wlsx7DjjedELmO4JFn17oyi3av71lgiN5FjW9TBLxq3XmeHKu+avjEk
LHisT5lCzh0YjyEhfSSkBtz2iyDBZhNUJKmw1Tf89owbKUMPnlxGjZtbmvQkv/qk
5GdCH7YJG+XchdlDi70b
=vptn
-----END PGP SIGNATURE-----
Merge tag 'kbuild-misc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull misc Kbuild updates from Masahiro Yamada:
- clean up builddeb script
- use full path for KBUILD_IMAGE to fix rpm-pkg build
- fix objdiff tool to ignore debug info
* tag 'kbuild-misc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
builddeb: fix typo
builddeb: Update a few outdated and hardcoded strings
deb-pkg: Remove the KBUILD_IMAGE workaround
unicore32: Use full path in KBUILD_IMAGE definition
sh: Use full path in KBUILD_IMAGE definition
arc: Use full path in KBUILD_IMAGE definition
arm: Use full path in KBUILD_IMAGE definition
arm64: Use full path in KBUILD_IMAGE definition
scripts: objdiff: Ignore debug info when comparing
The builddeb script has some hardcoded references to Linux version 2.6
which is ancient. Drop Provides as the virtual packages provided are not
useful anymore. Leave the Provides for linux-kernel-headers, as someone
might still be referring to it.
While at it, updated copyright date and drop Standards-Version: since
the package isn't Debian Standards compliant anyways.
Cc: Timo Sigurdsson <public_timo.s@silentcreek.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
URLs to ftp.kernel.org are still exist though the service is closed [0].
This commit fixes the URLs to use www.kernel.org instead.
[0] https://www.kernel.org/shutting-down-ftp-services.html
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The arch Makefile are fixed to set KBUILD_IMAGE to the full patch, so
the workaround is no longer needed.
Signed-off-by: Michal Marek <mmarek@suse.com>
Reviewed-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Brace expansion might not work properly if _buildshell RPM macro
points to a shell other than bash. Particularly, with _bulidshell
defined to /bin/dash it leads to broken build and source symlinks.
Signed-off-by: Anton Tikhomirov <anton.tikhomirov@cdnetworks.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
"aarch64". Recognizing just the latter should be enough but let's
accept both in case something regresses again or an user sets
UTS_MACHINE=arm64.
Regressed in cfa88c7: arm64: Set UTS_MACHINE in the Makefile.
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Acked-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
When attempting to build a Debian kernel package, the "scripts/gcc-plugins"
directory does not exist in the output tree unless CONFIG_GCC_PLUGINS=y.
To avoid errors when not defined, this wraps the failing "find" in a config
test.
Reported-by: Frank Paulsen <frobnic+lkml@gmail.com>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Pull misc kbuild updates from Michal Marek:
- coccicheck script improvements by Luis Rodriguez and Deepa Dinamani
- new coccinelle patches by Yann Droneaud and Vaishali Thakkar
- debian packaging fixes by Wilfried Klaebe, Henning Schild and Marcin
Mielniczuk
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
Fix the Debian packaging script on systems with no codename
builddeb: fix file permissions before packaging
scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci
coccicheck: refer to Documentation/coccinelle.txt and wiki
coccicheck: add support for requring a coccinelle version
scripts: add Linux .cocciconfig for coccinelle
coccicheck: replace --very-quiet with --quiet when debugging
coccicheck: add support for DEBUG_FILE
coccicheck: enable parmap support
coccicheck: make SPFLAGS more useful
coccicheck: move spatch binary check up
builddeb: really include objtool binary in headers package
coccinelle: catch krealloc() on devm_*() allocated memory
coccinelle: recognize more devm_* memory allocation functions
coccinelle: also catch kzfree() issues
coccicheck: Allow for overriding spatch flags
Coccinelle: noderef: Add new rules and correct the old rule
When calling `make deb-pkg` on a system with no codename (for example
Arch Linux), lsb_release sometimes outputs `n/a` as the codename.
This breaks dpkg-parsechangelog, which can't process the changelog
correctly.
Signed-off-by: Marcin Mielniczuk <marmistrz.dev@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Builddep is not very explicit about file permissions. Actually the file
permissions in the package are largely influenced by the umask of the
user cloning the git and building the package. If that umask does not
set go+r the resulting linux-headers package will prevent non-root users
from building out-of-tree modules. And that is probably just one
unexpected effect.
Being a packaging/install tool builddep should make sure the file
permissions are set correctly and not just derived from a value that is
never checked.
This patch sets ugo read permissions for all packaged files and derives
the executable bit for directories and executables from the file-owner.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
On May 4th, Bjørn Mork provided patch 697bbc7b83 ("builddeb: include
objtool binary in headers package"). However, that one only works if
$srctree=$objtree, because the objtool binaries are not written to the
srctree, but to the objtree.
Signed-off-by: Wilfried Klaebe <linux-kernel@lebenslange-mailadresse.de>
Fixes: 697bbc7b83 ("builddeb: include objtool binary in headers package")
Signed-off-by: Michal Marek <mmarek@suse.com>
This patch allows to build the whole kernel with GCC plugins. It was ported from
grsecurity/PaX. The infrastructure supports building out-of-tree modules and
building in a separate directory. Cross-compilation is supported too.
Currently the x86, arm, arm64 and uml architectures enable plugins.
The directory of the gcc plugins is scripts/gcc-plugins. You can use a file or a directory
there. The plugins compile with these options:
* -fno-rtti: gcc is compiled with this option so the plugins must use it too
* -fno-exceptions: this is inherited from gcc too
* -fasynchronous-unwind-tables: this is inherited from gcc too
* -ggdb: it is useful for debugging a plugin (better backtrace on internal
errors)
* -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
* -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version
variable, plugin-version.h)
The infrastructure introduces a new Makefile target called gcc-plugins. It
supports all gcc versions from 4.5 to 6.0. The scripts/gcc-plugin.sh script
chooses the proper host compiler (gcc-4.7 can be built by either gcc or g++).
This script also checks the availability of the included headers in
scripts/gcc-plugins/gcc-common.h.
The gcc-common.h header contains frequently included headers for GCC plugins
and it has a compatibility layer for the supported gcc versions.
The gcc-generate-*-pass.h headers automatically generate the registration
structures for GIMPLE, SIMPLE_IPA, IPA and RTL passes.
Note that 'make clean' keeps the *.so files (only the distclean or mrproper
targets clean all) because they are needed for out-of-tree modules.
Based on work created by the PaX Team.
Signed-off-by: Emese Revfy <re.emese@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
After commit 21a59991ce ("scripts/package/Makefile: rpmbuild is needed
for rpm targets"), it is no longer possible to specify RPMOPTS.
For example, we can no longer able to control _topdir using the following
make command.
make RPMOPTS="--define '_topdir /home/xyz/workspace/'" binrpm-pkg
Fixes: 21a59991ce ("scripts/package/Makefile: rpmbuild is needed for rpm targets")
Cc: <stable@vger.kernel.org> # 4.3+
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
The kernel headers package (linux-headers) doesn't include
header files from other architectures required to build
out-of-tree modules.
For e.g. on ARM64, opcodes.h includes the same file from ARM
which causes the following error:
./arch/arm64/include/asm/opcodes.h:1:43: fatal error:
../../arm/include/asm/opcodes.h: No such file or directory
compilation terminated.
Signed-off-by: Azriel Samson <asamson@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
"objtool" is required for building external m dules if "Compile-time
stack metadata validation" is enabled. Otherwise all builds based
on the headers package fail with:
make[1]: Entering directory '/usr/src/linux-headers-4.6.0-rc6'
make[2]: *** No rule to make target 'tools/objtool/objtool', needed by 'foo.o'. Stop.
Makefile:1598: recipe for target 'foo.ko' failed
make[1]: *** [foo.ko] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.6.0-rc6'
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Michal Marek <mmarek@suse.com>
When uninstalling kernel RPM, we're unconditionally calling
"new-kernel-pkg --remove". This is useless on systems which are based on
'update-bootloader' script instead.
Support update-bootloader removal method as well in case the script is
present; contrary to new-kernel-pkg, this needs to be done in %postun,
otherwise update-bootloader will refuse to remove entry for kernel for
which the binary still exists.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Michal Marek <mmarek@suse.com>
This patch add a rpm preuninstall scriptlet to cleanup the
boot loader configuration on kernel package uninstall.
The initrd for the to-be-removed kernel is deleted, too.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
mkspec is copying built kernel to temporrary location
/boot/vmlinuz-$KERNELRELEASE-rpm
and runs installkernel on it. This however directly leads to grub2
menuentry for this suffixed binary being generated as well during the run
of installkernel script.
Later in the process the temporary -rpm suffixed files are removed, and
therefore we end up with spurious (and non-functional) grub2 menu entries
for each installed kernel RPM.
Fix that by using a different temporary name (prefixed by '.'), so that
the binary is not recognized as an actual kernel binary and no menuentry
is created for it.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Fixes: 3c9c7a14b6 ("rpm-pkg: add %post section to create initramfs and grub hooks")
Signed-off-by: Michal Marek <mmarek@suse.com>
building with $srctree != $objtree, perf-tar-* targets fail
to read the MANIFEST file and add the PERF-VERSION-FILE needed
by out-of-tree builds. The build errors and an incorrect tar is created:
$ make O=build-x86 perf-targz-src-pkg
TAR
cat: ../tools/perf/MANIFEST: No such file or directory
tar: perf-4.1.0-rc8/PERF-VERSION-FILE: Cannot stat: No such file or
dir..
tar: Exiting with failure status due to previous errors
Kbuild sets objtree to "." and srctree to ".." The command to output
MANIFEST becomes:
$(cd ..; echo $(cat ../tools/perf/MANIFEST))
Without MANIFEST, the entire kernel source tree is added to the perf
source tarball. The *correct* fix is to keep the cd and remove srctree
from cat command line since MANIFEST has wildcards that fail to expand
working directory isn't srctree.
Second, PERF-VERSION-FILE gets not added, because in-tree build path is
hardcoded to Makefile:
util/PERF-VERSION-GEN ../../$(perf-tar)/ 2>/dev/null)
The PERF-VERSION-GEN needs to be run from tools/perf directory,
and the output directory needs to be changed from relative to
to absolute. This can be achieved using the $(CURDIR) variable.
Also remove the error redirect to /dev/null which hid the error.
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Pull misc kbuild updates from Michal Marek:
"This is the non-critical part of kbuild:
- several coccinelle updates
- make deb-pkg creates an armhf package if CONFIG_VFP=y
- make tags understands some more powerpc macros"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
coccinelle: Improve checking for missing NULL terminators
coccinelle: ifnullfree: handle various destroy functions
coccinelle: ifnullfree: various cleanups
cocinelle: iterators: semantic patch to delete unneeded of_node_put
deb-pkg: Add automatic support for armhf architecture
scripts/coccinelle: fix typos
coccinelle: misc: remove "complex return code" warnings
Coccinelle: fix incorrect -include option transformation
coccinelle: tests: improve odd_ptr_err.cocci
coccinelle: misc: move constants to the right
scripts/tags.sh: Teach tags about some powerpc macros
The Debian armhf architecture uses the ARM EABI hard-float variant,
whereas armel uses the soft-float variant. Although the kernel
doesn't use FP itself, CONFIG_VFP must be enabled to support
hard-float userland and will probably be disabled when supporting a
soft-float userland. So set the architecture to armhf by default when
CONFIG_AEABI and CONFIG_VFP are both enabled.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Fathi Boudra <fathi.boudra@linaro.org>
Reviewed-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Commit 3716001bcb ("deb-pkg: add source package") added the ability to
create a debian changelog file. This exposed that previously the
builddeb script hasn't cleared debian/files between builds.
As debian/files keeps accumulating entries, the changes file will end up
growing indefinelty. With outdated entries in debian/files, builddeb
script will exit with failure. This regression impacts those who use
"make deb-pkg" target to build kernel into a .deb package and never use
"make mrproper" or other means to clean kernel tree from generated
directories.
To fix the regression, remove debian/files before starting build and in
the generated clean rule.
Fixes: 3716001bcb ("deb-pkg: add source package")
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reported-by: Doug Smythies <dsmythies@telus.net>
Tested-by: Doug Smythies <dsmythies@telus.net>
Tested-by: Kalle Valo <kvalo@codeaurora.org>
Acked-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Michal Marek <mmarek@suse.cz>
Cc: maximilian attems <maks@stro.at>
Cc: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Make deb-pkg build both source and binary package like make rpm-pkg does.
For people who only need binary kernel package, there is now bindeb-pkg
target, same target also used to build the .deb files if built from the
source package using dpkg-buildpackage.
Generated source package will build the same kernel .config than what
was available for make deb-pkg. The name of the source package can
be set with KDEB_SOURCENAME enviroment variable.
The source package is useful for GPL compliance, or for feeding to a
automated debian package builder.
Cc: Chris J Arges <chris.j.arges@canonical.com>
Reviewed-by: maximilian attems <maks@stro.at>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Split source tarball creation from rpm-pkg target
so it can be used from deb-pkg target as well. As
added bonus, we can now pretty print TAR the name of
tarball created in quiet mode
This patch prepares the groundwork for deb-pkg source
package adding bit.
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
This causes conflicts when using multiple kernels built
with this mechanism.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
I happened to build a kernel with "make deb-pkg" on a machine with no
network connectivity, but this failed with:
[...]
INSTALL debian/headertmp/usr/include/asm/ (65 files)
hostname: Name or service not known
../scripts/package/Makefile:90: recipe for target 'deb-pkg' failed
make[2]: *** [deb-pkg] Error 1
In scripts/package/builddeb it tries to construct an email address (that
can be queried in /proc/version later on) but with no network,
the "hostname -f" fails. The following patch falls back to just use the
shortname if we cannot determine our FQDN.
Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Every package needs /usr/share/doc/$package_name and
DEBIAN directory, so create them as part of create_package
function.
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Before rpm release 4.1, in 2002, either the rpm command or the
rpmbuild command could be used in the rpm-pkg or binrpm-pkg targets,
and the Makefile chose the rpm command if the rpmbuild command wasn't
found.
After release 4.1, however, the rpm command could no longer be used in
place of the rpmbuild command. As the rpmbuild command is not
installed by default, this can lead to failures with the rpm-pkg and
binrpm-pkg targets:
rpm --define "_builddir ." --target \
x86_64 -bb ./binkernel.spec
rpm --target: unknown option
scripts/package/Makefile:60: recipe for target 'binrpm-pkg' failed
Change the Makefile to use rpmbuild unconditionally to avoid this.
Signed-off-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When building a package with make deb-pkg (say, for arm), the dtb files are
not added to the package. Given that things are still evolving on arm, it
make sense to have them along with the kernel and modules.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
If CONFIG_MODULE_SIG_ALL is set, then user expects that all modules are
automatically signed in the result package, as it's for rpm-pkg, binrpm-pkg,
tar, tar-*. For deb-pkg this is correct only if CONFIG_DEBUG_INFO
is NOT set. In that case deb-package contains signed modules.
But if CONFIG_DEBUG_INFO is set, builddeb creates separate package with
debug information. To do that, debug information from all modules
is copied into separate files by objcopy. And loadable kernel modules are
stripped afterwards. Stripping removes previously (during modules_install)
added signatures from loadable kernel modules. Therefore final deb-package
contains unsigned modules despite of set option CONFIG_MODULE_SIG_ALL.
This patch resigns all stripped modules if CONFIG_MODULE_SIG_ALL is set
to solve this problem.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
create_package() function tries to resolve used architecture
for everry package. Split the setting the architecture to a
new function, set_debarch(), called once on startup.
This allows using debarch from other parts of script as
needed.
v2: Follow Michals suggestion on setting variables at
top scope and also setting the fallback $debarch in the
new function
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
No need for the intermediary vmlinux.orig - bzip2 can keep the original
files used for compression with --keep.
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
lsb_release command is a good choice to determine the distribution
name for the changelog file in the generated Debian packages [1].
Its installation is no precondition.
In Debian it is still not essential or build-essential.
Ben gave some helpful informations and detailed explanations in [2].
There he also suggested to have an option to explicitly set the
distribution name (see $KDEB_CHANGELOG_DIST variable).
Embedded the improvement as suggested by Thorsten (see [3]):
"This is suboptimal: if KDEB_CHANGELOG_DIST is defined,
lsb_release is not necessary. The following snippet
also omits using its output if it fails but still
produces any:"
Dealing with this issue I learned about "The Colon in the Shell." and
possible pitfalls in this area (see [4,5]). Furthermore, refreshed my
knowledge about redirecting outputs with the echo command (see [5]).
Special thanks to Thorsten, I enjoyed the IRC session with you.
Cooked together the snippets of Ben and Thorsten (see [2,3]).
Tested against Linux v3.19-rc2.
Thanks goes to Alexander, Ben, maximilian and Thorsten for the very
vital help.
[1] https://lkml.org/lkml/2012/4/23/516
[2] http://marc.info/?l=linux-kbuild&m=142022188322321&w=2
[3] http://marc.info/?l=linux-kbuild&m=142023476825460&w=2
[4] http://blog.brlink.eu/index.html#i70
[5] https://www.mirbsd.org/permalinks/wlog-10_e20141209-tg.htm
[6] http://stackoverflow.com/questions/23489934/echo-2-some-text-what-does-it-mean-in-shell-scripting
CC: Alexander Wirt <formorer@debian.org>
Suggested-by: Ben Hutchings <ben@decadent.org.uk>
Suggested-by: Thorsten Glaser <tg@mirbsd.org>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: maximilian attems <max@stro.at>
[ dileks: Reviewed his suggested diff in RFC v4 ]
Reviewed-by: Thorsten Glaser <tg@debian.org>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Happy new 2015!
I have combined two patches which I had already sent to linux-kbuild ML.
Today, I prefer "builddeb" as a label for such patches.
[1] http://marc.info/?l=linux-kbuild&m=133521955904706
[2] http://marc.info/?l=linux-kbuild&m=133521955004705
CC: Ben Hutchings <ben@decadent.org.uk>
CC: maximilian attems <max@stro.at>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When doing make binrpm-pkg we only want to build the binary and header
package as the documentation of binrpm-pkg target claims. Hence this
patch avoid building the source and devel package. This makes binrpm-pkg
target lot faster and way more usefull.
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
[mmarek: used subject line from v3]
Signed-off-by: Michal Marek <mmarek@suse.cz>
Pull misc kbuild updates from Michal Marek:
"This is the less critical kbuild stuff for v3.18-rc1:
- make deb-pkg debuginfo fix, ppc64el support and warning fix for
recent dpkg tools
- make TAGS fixes
- new coccinelle patch
- kbuild documentation improvements"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
deb-pkg: remove obsolete -isp option to dpkg-gencontrol
coccinelle: misc: semantic patch to delete overly complex return code processing
deb-pkg: Add support for powerpc little endian
builddeb: put the dbg files into the correct directory
scripts/tags.sh: fix DEFINE_HASHTABLE in emacs case
scripts/tags.sh: remove *PCGFLAGS regular expressions
scripts/tags.sh: Don't specify kind-spec for emacs' ctags/etags
Documentation: kbuild: Improve grammar
Documentation: kbuild: Remove obsolete dtc_cpp section
Documentation: kbuild: Improve if_changed documentation
Documentation: kbuild: Remove obsolete include/asm symlink step
The -isp option has been deprecated, after it became the default
behaviour back in 2006.
Since dpkg 1.17.11, dpkg-gencontrol emits a warning on -isp usage.
References: https://bugs.debian.org/215233
Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The Debian powerpc little endian architecture is called ppc64el. This
is the default architecture used by Ubuntu for powerpc.
The below checks the kernel config to see if we are compiling little
endian and sets the Debian arch appropriately.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Since the conversion of objtree to use relative pathnames (commit
7e1c04779e, "kbuild: Use relative path for $(objtree)"), the debug
info files have been ending up in /debian/dbgtmp/ in the regular
linux-image package instead of the debug files package. Fix up the
paths so that the debug files end up in the -dbg package.
This is based on a similar patch by Darrick.
Reported-and-tested-by: "Darrick J. Wong" <darrick.wong@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The Makefiles call the respective interpreter explicitly, but this makes
it easier to use the scripts manually.
Signed-off-by: Michal Marek <mmarek@suse.cz>
The kernel headers package (linux-headers) doesn't include several
header files required to build out-of-tree modules.
It makes the package unusable on e.g. ARM architecture:
/usr/src/linux-headers-3.14.0/arch/arm/include/asm/memory.h:24:25:
fatal error: mach/memory.h: No such file or directory
#include <mach/memory.h>
^
compilation terminated.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Commit 7e1c0477 (kbuild: Use relative path for $(objtree)) assumes that
the build process does not change its working directory. make tar-pkg
was a couterexample, fix this by changing directory only for the tar
command and not for the whole script, which at one point references the
now relative $(objtree).
Reported-and-tested-by: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When $srctree or $objtree are relative paths, we cannot change directory
and refer to them in the same subshell. Do the redirection outside of
the subshell to fix this.
Reported-and-tested-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Pull kbuild misc updates from Michal Marek:
"This is the non-critical part of kbuild for v3.16-rc1:
- make deb-pkg can do s390x and arm64
- new patterns in scripts/tags.sh
- scripts/tags.sh skips userspace tools' sources (which sometimes
have copies of kernel structures) and symlinks
- improvements to the objdiff tool
- two new coccinelle patches
- other minor fixes"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts: objdiff: support directories for the augument of record command
scripts: objdiff: fix a comment
scripts: objdiff: change the extension of disassembly from .o to .dis
scripts: objdiff: improve path flexibility for record command
scripts: objdiff: remove unnecessary code
scripts: objdiff: direct error messages to stderr
scripts: objdiff: get the path to .tmp_objdiff more simply
deb-pkg: Add automatic support for s390x architecture
coccicheck: Add unneeded return variable test
kbuild: Fix a typo in documentation
kbuild: trivial - use tabs for code indent where possible
kbuild: trivial - remove trailing empty lines
coccinelle: Check for missing NULL terminators in of_device_id tables
scripts/tags.sh: ignore symlink'ed source files
scripts/tags.sh: add regular expression replacement pattern for memcg
builddeb: add arm64 in the supported architectures
builddeb: use $OBJCOPY variable instead of objcopy
scripts/tags.sh: ignore code of user space tools
scripts/tags.sh: add pattern for DEFINE_HASHTABLE
.gitignore: ignore Module.symvers in all directories
The Debian s390x architecture has 64-bit userland whereas s390 has
32-bit userland. A 64-bit kernel can be used with either. Now that
Debian supports multiarch and officially supports s390x, it makes more
sense to assign a 64-bit kernel package to s390x.
Reported-by: Stephen Powell <zlinuxman@wowway.com>
References: https://bugs.debian.org/750925
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
In cross-build environment, we expect to use the cross-compiler objcopy
instead of the host objcopy.
It fixes following build failures:
objcopy --only-keep-debug lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko /srv/build/linux/debian/dbgtmp/usr/lib/debug/lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko
objcopy: Unable to recognise the format of the input file `lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko'
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Cc: stable <stable@vger.kernel.org> # 3.12+
Fixes: 810e843746 ('deb-pkg: split debug symbols in their own package')
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
These commands will mysteriously fail:
$ make ARCH=arm versatile_defconfig
[...]
$ make ARCH=arm deb-pkg
[...]
make[1]: *** [deb-pkg] Error 1
make: *** [deb-pkg] Error 2
The Debian architecture selection for these kernel architectures does
'grep FOO=y $KCONFIG_CONFIG && echo bar', and after 'set -e' this
aborts the script if grep does not find the given config symbol.
Fixes: 10f26fa642 ('build, deb-pkg: select userland architecture based on UTS_MACHINE')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
builddeb generates a control file that says the linux-headers package
can only be built for the build system primary architecture. This
breaks cross-building configurations. We should use $debarch for this
instead.
Since $debarch is not yet set when generating the control file, set
Architecture: any and use control file variables to fill in the
description.
Fixes: cd8d60a20a ('kbuild: create linux-headers package in deb-pkg')
Reported-and-tested-by: "Niew, Sh." <shniew@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The kernel postinst hook for initramfs-tools will build an initramfs
on installation unless $INITRD is set to 'No'. make-kpkg generates a
postinst script that sets this variable appropriately, but we don't.
Set it based on CONFIG_BLK_DEV_INITRD.
This should also work with dracut when <http://bugs.debian.org/729622>
is fixed.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When building perf out of tree:
$ make perf-tar-src-pkg
$ tar -xf perf-<ver>.tar -C /tmp
$ cd /tmp/perf<ver>
$ make -C tools/perf
you get this warning message:
make[1]: *** No rule to make target `kernelversion'. Stop.
Fix it by saving the perf version in the tar file and using that for the
out of tree builds.
v2: removed short form request and fixed up version string from usual output.
Signed-off-by: David Ahern <dsahern@gmail.com>
Suggested-by: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1383753335-25782-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Pull MIPS updates from Ralf Baechle:
"This has been sitting in -next for a while with no objections and all
MIPS defconfigs except one are building fine; that one platform got
broken by another patch in your tree and I'm going to submit a patch
separately.
- a handful of fixes that didn't make 3.11
- a few bits of Octeon 3 support with more to come for a later
release
- platform enhancements for Octeon, ath79, Lantiq, Netlogic and
Ralink SOCs
- a GPIO driver for the Octeon
- some dusting off of the DECstation code
- the usual dose of cleanups"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits)
MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code
MIPS: kexec: Fix random crashes while loading crashkernel
MIPS: kdump: Skip walking indirection page for crashkernels
MIPS: DECstation HRT calibration bug fixes
MIPS: Export copy_from_user_page() (needed by lustre)
MIPS: Add driver for the built-in PCI controller of the RT3883 SoC
MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000
MIPS: ralink: Add support for reset-controller API
MIPS: ralink: mt7620: Add cpu-feature-override header
MIPS: ralink: mt7620: Add spi clock definition
MIPS: ralink: mt7620: Add wdt clock definition
MIPS: ralink: mt7620: Improve clock frequency detection
MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts
MIPS: ralink: mt7620: Add verbose ram info
MIPS: ralink: Probe clocksources from OF
MIPS: ralink: Add support for systick timer found on newer ralink SoC
MIPS: ralink: Add support for periodic timer irq
MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards
MIPS: Netlogic: Add support for USB on XLP2xx
MIPS: Netlogic: XLP2xx update for I2C controller
...
A lot of 64-bit systems supported by Linux/MIPS have boot firmware or
bootloaders that only understand 32-bit ELF files, and as such, the vmlinux.32
target exists to support these systems. Therefore, it'd be nice if the tar-pkg
target recognised this, and included the right version when packaging up a
binary of the kernel.
This updates buildtar to support MIPS targets. MIPS may use 'vmlinux'
or 'vmlinux.32' depending on the target system. This uses 'vmlinux.32'
in preference to 'vmlinux' where present (although I should check which
is newer), including either file as /boot/vmlinux-${version}.
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1673/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
scripts/package/builddeb is used to create Debian packages.
Currently the firmware package always gets the same version number
irrespective of the Kernel version.
The paths inside the firmware package depend on the Kernel
version.
With the patch supplied the Kernel version becomes part of the
Debian firmware package number.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ben Hutchings <ben@decadent.org.uk>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
We now provide the installed image path to the kernel hooks.
This should allow the package to better integrate with debian hooks, and
should not be too disruptive of hooks supporting only one parameter.
Signed-off-by: Anisse Astier <anisse@astier.eu>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This can reduce almost 3 times the size of the linux-image package,
while keeping the debug symbols available for this particular build, in
their own package.
This mimics the way kernels are built in debian, ubuntu, or with
make-kpkg, and comes at the price of a small slowdown in the building of
packages.
Signed-off-by: Anisse Astier <anisse@astier.eu>
Cc: Ben Hutchings <ben@decadent.org.uk>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Change the spec file to generate a kernel-devel module
allowing for compilation of external kernel modules.
This patch requires a new minimum RPM level of 4.0.3.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Prior to this patch, firmware files were being installed
in /lib/firmware with a potential conflict with already
installed kernels.
firmware files are now installed in /lib/firmware/<release>
and packaged with the rest of the modules.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
/sbin/installkernel is used to insure grub hooks are
inserted and the initramfs is created on the
target system.
The invokation installkernel will work with any
kernel as long as:
- /sbin/installkernel exists
- the kernel and sysem map files are readable
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Pull kbuild updates from Michal Marek:
- fix for make headers_install argv explosion with too long path
- scripts/setlocalversion does not call git update-index needlessly
- fix for the src.rpm produced by make rpm-pkg. The new make
image_name can be useful also for other packaging tools.
- scripts/mod/devicetable-offsets.o is not rebuilt during each make run
- make modules_install dependency fix
- scripts/sortextable portability fix
- fix for kbuild to generate the output directory for all object files
in subdirs.
- a couple of minor fixes
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: create directory for dir/file.o
tools/include: use stdint types for user-space byteshift headers
Makefile: Fix install error with make -j option
Fix a build warning in scripts/mod/file2alias.c
improve modalias building
scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/
kbuild: fix error when building from src rpm
scripts/setlocalversion on write-protected source tree
Makefile.lib: align DTB quiet_cmd
kbuild: fix make headers_install when path is too long
The following issue can be reproduced with Linus' tree on
an x86_64 server.
>+ cp /home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2.x86_64/boot/vmlinuz-3.9.2
>cp: missing destination file operand after
>/home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2-1.x86_64/boot/vmlinuz-3.9.2'
>Try `cp --help' for more information.
>error: Bad exit status from /var/tmp/rpm-tmp.R4o0iI (%install)
Here are the commands to reproduce:
make defconfig
make rpm-pkg
Use the resulting src rpm to build as follows:
mkdir ~/rpmbuild-test
cd ~/rpmbuild-test
rpmbuild --rebuild --define "_topdir `pwd`" -vv ~/rpmbuild/SRPMS/kernel-3.10.0_rc1+-1.src.rpm
The issue is because the %install script uses $KBUILD_IMAGE and it hasn't
been set since it is only available in the kbuild system and not in the
%install script.
This patch adds a Makefile target to emit the image_name that can be used
and modifies the mkspec to use the dynamic name in %install.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Commit 6501320311 dropped the rpm spec as a
prerequisite for the binrpm-pkg target but forgot to update $< usage,
which causes the rule to break.
This commit fixes that by replacing $< with the spec name.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The *pkg targets are always run, so it makes no sense to cache the
generated specfile. This also fixes build errors when the specfile
becomes out of date, without the Makefile noticing it:
$ make rpm
works
$ echo yadadada >localversion-test
$ make rpm
fails, because kernel.spec assumes the old kernel release string
Signed-off-by: Michal Marek <mmarek@suse.cz>
Now that we only package explicitly listed files to the tarball, there
is no need to abuse the parent directory.
Signed-off-by: Michal Marek <mmarek@suse.cz>
The source tree can contain lots of uninteresting data like tag or
cscope files, packaging which slows down make rpm needlessly. It can
also break the build, if the tree contains an unrelated file named
*.spec. The downside of this change is that new subdirectories have to
be added to the KBUILD_ALLDIRS variable in the top-level Makefile. The
upside is that the behavior is more predictable.
Signed-off-by: Michal Marek <mmarek@suse.cz>
When dealing with multiple sub-arches (like 32- and 64-bit on x86, for
example) generating a bunch of kernel tar archives with the same name
but for different sub-arches could get confusing and error-prone. Also,
the build process could overwrite otherwise unrelated builds and you
probably don't want that. So, add the architecture to the archive name
for more clarity and less shoot-yourself-in-the-foot practices.
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
KBUILD_OUTPUT is always empty here, so it is useless to test it. But
while use O=.., objtree and srctree will be different. I compare them
instead.
Signed-off-by: Bin Wang <wbin00@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
'make rpm-pkg' and 'make binrpm-pkg' fail when the kernel source is
read-only. Specifically, when the RPM spec generated by
scripts/package/mkspec is run, KBUILD_SRC happens to be set to the
source location and thus the invocation of 'make headers_install'
fails when an internal call to 'filechk' tries to write a file into
the source tree.
The fix is to clear KBUILD_SRC for the 'make headers_install'
invocation in the spec file, as is already done for the 'make
modules_install' invocation.
Signed-off-by: David R. Bild <drbild@umich.edu>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Pull kbuild changes from Michal Marek:
"The main part of kbuild for v3.7 contains:
- Fix for scripts/Makefile.modpost to not choke on a '.ko' substring
in the build directory path
- Two warning fixes (modpost and main Makefile)
- __compiletime_error works also with gcc 4.3
- make tar{gz,bz2,xz}-pkg uses default compression settings instead
of saving as many bytes as possible (this should actually be in the
misc branch, I don't know why I applied it here)."
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
compiler-gcc4.h: correct verion check for __compiletime_error
modpost: Permit .GCC.command.line sections
Kbuild: use normal compression settings for tar*-pkg
scripts/Makefile.modpost: error in finding modules from .mod files.
kbuild: Remove useless warning while appending KCFLAGS
For large kernel configurations (like a distribution kernel)
targz-pkg takes a quite long time to just do the compression.
I clocked it at 15+mins for a SUSE kernel like config on a fast
system. And tarxz and bzip2 are even slower.
The main reason is that the script that is doing the taring sets
the highest compression level (-9). When I change it to just
use the defaults the gzip time for the same kernel goes down
to ~3 mins. I haven't tested xz and bzip, but I expect those
to be much faster too.
I'm not willing to wait that long for a small compression
gain. So just change the script to use the defaults.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
There were reports of users destroying their Fedora installs by a kernel
tarball that replaces the /lib -> /usr/lib symlink. Let's remove the
toplevel directories from the tarball to prevent this from happening.
Reported-by: Andi Kleen <andi@firstfloor.org>
Suggested-by: Ben Hutchings <ben@decadent.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
I discovered that make deb-pkg does not add Makefile_32.cpu from
arch/x86 directory when doing i386 kernel build and package build.
Fix it by greedily adding all Makefiles.
Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
That way they don't file conflict with official firmware package:
trying to overwrite '/lib/firmware/qlogic/1040.bin', which is
also in package firmware-qlogic 0.35
..
Reported-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
After 303395ac3b, some headers are
autogenerated. Include these autogenerated headers (mainly
unistd_32_ia32.h) in out-of-tree builds to allow DKMS modules to be
built succesfully.
Signed-off-by: Peter Lekensteyn <lekensteyn@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The out-of-tree build is broken in 'make deb-pkg'. The
header checks and the header install works on the source and
not on the object tree.
While fixing this also replace the direct 'make' invocations
with the $MAKE variable to be consistent within the script.
Cc: maximilian attems <max@stro.at>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: debian-kernel@lists.debian.org
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
For user-mode Linux the other packages are not required. So
only build the package with the linux-image in it.
Cc: maximilian attems <max@stro.at>
Cc: debian-kernel@lists.debian.org
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Tested-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The Link to the kernel header files in the debian packages
point to the original build directory. This is a bad choice
if the packages were installed on a different machine. Fix
this in by manually re-creating the link in the builddeb
script.
Cc: maximilian attems <max@stro.at>
Cc: debian-kernel@lists.debian.org
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The current use of /tmp for file lists is insecure. Put them under
$objtree/debian instead.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org # 2.6.39+
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Specify --git-dir when building perf targets to allow out-of-tree
builds using O=<build-dir>.
The shell command in `git archive' had to be modified to allow proper
file name expansion of the files listed in MANIFEST.
Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kbuild: Create a kernel-headers RPM
rpm-pkg: Fix when current directory is a symlink
Replace '-' in kernel version with '_'
To compile binaries which depend on new kernel interfaces, we need a
kernel-headers RPM
Signed-off-by: Arun Sharma <asharma@fb.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The better fix would be to stop using the parent directory (principle of
least surprise), but as long as we use it, use it consistently.
Signed-off-by: Michal Marek <mmarek@suse.cz>
Removing the '-' results in hard to read filenames such as:
kernel-2.6.35.2000042g76e4caf-28.x86_64.rpm
kernel-2.6.35.2_000042_g76e4caf-28.x86_64.rpm is easier to
read.
Signed-off-by: Arun Sharma <asharma@fb.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When building linux-headers package using deb-pkg, builddeb erroneously assume
current directory is the source tree. This is not true if building in another
directory, using make O=... deb-pkg.
This patch fix this problem.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Tested-by: Nikolai Kondrashov <spbnick@gmail.com>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Fix x86 centric path to allow building kernel-header packages for
other architecture.
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>