History log of /openbmc/linux/scripts/package/mkspec (Results 1 – 25 of 111)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40
# 37477496 21-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 ...


# 49c803cd 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: split out the body of spec file

Most of the lines in the spec file are independent of any build
condition.

Split the body of the spec file into scripts/package/kernel.spec.
scripts

kbuild: rpm-pkg: split out the body of spec file

Most of the lines in the spec file are independent of any build
condition.

Split the body of the spec file into scripts/package/kernel.spec.
scripts/package/mkspec will prepend some env-dependent variables.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# 2a291fc3 21-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 ...


# b537925f 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: run modules_install for non-modular kernel

For the same reason as commit 4243afdb9326 ("kbuild: builddeb: always
make modules_install, to install modules.builtin*"), run modules_ins

kbuild: rpm-pkg: run modules_install for non-modular kernel

For the same reason as commit 4243afdb9326 ("kbuild: builddeb: always
make modules_install, to install modules.builtin*"), run modules_install
even when CONFIG_MODULES=n to install modules.builtin*.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# 1789fc91 21-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 ...


# d4f65127 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: use a dummy string for _arch when undefined

If this affects only %{buildroot}, it should be enough to use a fixed
string for _arch when it is undefined.

Signed-off-by: Masahiro Yam

kbuild: rpm-pkg: use a dummy string for _arch when undefined

If this affects only %{buildroot}, it should be enough to use a fixed
string for _arch when it is undefined.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# d5d2d4cc 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: derive the Version from %{KERNELRELEASE}

Avoid hard-coding the Version field in the generated spec file.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# fe66b5d2 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: refactor kernel-devel RPM package and linux-headers Deb package

The kernel-devel RPM package and the linux-headers Debian package
provide headers and scripts needed for building external mod

kbuild: refactor kernel-devel RPM package and linux-headers Deb package

The kernel-devel RPM package and the linux-headers Debian package
provide headers and scripts needed for building external modules.

They copy the necessary files in slightly different ways - the RPM
copies almost everything except some exclude patterns, while the Debian
copies less number of files. There is no need to maintain different code
to do the same thing.

Split the Debian code out to scripts/package/install-extmod-build, which
is called from both of the packages.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# 93ed5605 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: replace $KERNELRELEASE in spec file with %{KERNELRELEASE}

Avoid hard-coding the value of KERNELRELEASE in the generated spec file.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.

kbuild: rpm-pkg: replace $KERNELRELEASE in spec file with %{KERNELRELEASE}

Avoid hard-coding the value of KERNELRELEASE in the generated spec file.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# 5d8e41b5 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: replace $__KERNELRELEASE in spec file with %{version}

${version} will be replaced with the value of the Version field.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# a06d9ef8 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: record ARCH option in spec file

Currently, we rely on the top Makefile defining ARCH option when we
run 'make rpm-pkg' or 'make binrpm-pkg'.

It does not apply when we run 'make src

kbuild: rpm-pkg: record ARCH option in spec file

Currently, we rely on the top Makefile defining ARCH option when we
run 'make rpm-pkg' or 'make binrpm-pkg'.

It does not apply when we run 'make srcrpm-pkg', and separately run
'rpmbuild' for the generated SRPM. This is a problem for cross-build.

Just like the Debian package, save the value of ARCH in the spec file.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# fe809b82 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: use %{makeflags} to pass common Make options

This is useful to pass more common Make options.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 19286825 21-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 ...


# 61eca933 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: remove unneeded '-f $srctree/Makefile' in spec file

This is unneeded because the Makefile in the output directory wraps
the top-level Makefile in the srctree.

Just run $MAKE irresp

kbuild: rpm-pkg: remove unneeded '-f $srctree/Makefile' in spec file

This is unneeded because the Makefile in the output directory wraps
the top-level Makefile in the srctree.

Just run $MAKE irrespective of the build location.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# 233046a2 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: define _arch conditionally

Commit 3089b2be0cce ("kbuild: rpm-pkg: fix build error when _arch is
undefined") does not work as intended; _arch is always defined as
$UTS_MACHINE.

The

kbuild: rpm-pkg: define _arch conditionally

Commit 3089b2be0cce ("kbuild: rpm-pkg: fix build error when _arch is
undefined") does not work as intended; _arch is always defined as
$UTS_MACHINE.

The intention was to define _arch to $UTS_MACHINE only when it is not
defined.

Fixes: 3089b2be0cce ("kbuild: rpm-pkg: fix build error when _arch is undefined")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


Revision tags: v6.1.39, v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25
# c90b3bbf 17-Apr-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: remove kernel-drm PROVIDES

This code was added more than 20 years ago. [1]

I checked the kernel spec files in Fedora and OpenSUSE, but did not
see 'kernel-drm'. I do not know if th

kbuild: rpm-pkg: remove kernel-drm PROVIDES

This code was added more than 20 years ago. [1]

I checked the kernel spec files in Fedora and OpenSUSE, but did not
see 'kernel-drm'. I do not know if there exists a distro that uses it
in RPM dependency.

Remove this, and let's see if somebody complains about it.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=6d956df7d6b716b28c910c4f5b360c4d44d96c4d

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>

show more ...


Revision tags: v6.1.24
# aa7d233f 10-Apr-2023 Masahiro Yamada <masahiroy@kernel.org>

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 <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

show more ...


Revision tags: v6.1.23, v6.1.22, v6.1.21, v6.1.20
# 05e96e96 15-Mar-2023 Masahiro Yamada <masahiroy@kernel.org>

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 <torvalds@linux-foundation.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


# 81f59a26 15-Mar-2023 Masahiro Yamada <masahiroy@kernel.org>

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 <masahiroy@kernel.org>

show more ...


Revision tags: v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14
# 7adf14d8 22-Feb-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: remove unneeded KERNELRELEASE from modules/headers_install

This is a temporary workaround added by commit f6e09b07cc12 ("kbuild:
do not put .scmversion into the source tarball").

S

kbuild: rpm-pkg: remove unneeded KERNELRELEASE from modules/headers_install

This is a temporary workaround added by commit f6e09b07cc12 ("kbuild:
do not put .scmversion into the source tarball").

Since commit 1cb86b6c3136 ("kbuild: save overridden KERNELRELEASE in
include/config/kernel.release"), the user-supplied KERNELRELEASE is
saved in include/config/kernel.release.

Remove it again.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>

show more ...


Revision tags: v6.1.13, v6.2
# 6fc91752 14-Feb-2023 Masahiro Yamada <masahiroy@kernel.org>

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 <masahiroy@kernel.org>

show more ...


Revision tags: v6.1.12, v6.1.11, v6.1.10, v6.1.9, v6.1.8
# f6e09b07 22-Jan-2023 Masahiro Yamada <masahiroy@kernel.org>

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 <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

show more ...


Revision tags: v6.1.7, v6.1.6, v6.1.5, v6.0.19
# 169dd780 11-Jan-2023 Arend van Spriel <arend.vanspriel@broadcom.com>

scripts: rpm: make clear that mkspec script contains 4.13 feature

A fix was made in the mkspec script that uses a feature, ie. the
OR expression, which requires RPM 4.13. However, the script indicat

scripts: rpm: make clear that mkspec script contains 4.13 feature

A fix was made in the mkspec script that uses a feature, ie. the
OR expression, which requires RPM 4.13. However, the script indicates
another minimum version. Lower versions may have success by using
the --no-deps option as suggested, but feels like bumping the version
to 4.13 is reasonable as it put me on the wrong track at first with
RPM 4.11 on my Centos7 machine.

Fixes: 02a893bc9975 ("kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires")
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


Revision tags: v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16
# 02a893bc 28-Dec-2022 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires

Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due
to "BuildRequires: elfutils-libelf-devel" added by commit 881

kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires

Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due
to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b
("kbuild: add ability to make source rpm buildable using koji").
The relevant package name in openSUSE is libelf-devel.

Add it as an alternative package.

BTW, if it is impossible to solve the build requirement, the final
resort would be:

$ make RPMOPTS=--nodeps rpm-pkg

This passes --nodeps to the rpmbuild command so it will not verify
build dependencies. This is useful to test rpm builds on non-rpm
system. On Debian/Ubuntu, for example, you can install rpmbuild by
'apt-get install rpm'.

NOTE1:
Likewise, it is possible to bypass the build dependency check for
debian package builds:

$ make DPKG_FLAGS=-d deb-pkg

NOTE2:
The 'or' operator is supported since RPM 4.13. So, old distros such
as CentOS 7 will break. I suggest installing newer rpmbuild in such
cases.

Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u
Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji")
Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: Jonathan Toppins <jtoppins@redhat.com>

show more ...


Revision tags: v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80
# 8818039f 21-Nov-2022 Ivan Vecera <ivecera@redhat.com>

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 <ivecera@redhat.com>
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
Acked-by: Íñigo Huguet <ihuguet@redhat.com>
Tested-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

show more ...


12345