forked from pool/kernel-source-longterm
commit c2ab50c5267e169ed8fd925a85a73c81da717c2e
OBS-URL: https://build.opensuse.org/package/show/Kernel:slowroll/kernel-source-longterm?expand=0&rev=184
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
6
README.KSYMS
Normal file
6
README.KSYMS
Normal file
@@ -0,0 +1,6 @@
|
||||
This file is a place holder for the kernel-syms{,-rt} package. It is used
|
||||
to group build dependencies for all kernel flavors.
|
||||
|
||||
The KMP build process will build KMPs against all installed kernel flavors
|
||||
automatically. If you don't need to build against other flavors than the
|
||||
ones you've already installed - it is safe to uninstall this package.
|
||||
316
README.PATCH-POLICY.SUSE
Normal file
316
README.PATCH-POLICY.SUSE
Normal file
@@ -0,0 +1,316 @@
|
||||
SUSE Linux Enterprise Patch Policy
|
||||
==================================
|
||||
|
||||
|
||||
Summary
|
||||
-------
|
||||
|
||||
The SUSE Linux Enterprise (SLE) patch policy mirrors the mainline Linux
|
||||
community's policy for accepting changes. Each commit must contain a small and
|
||||
"obvious" change that can be reviewed individually and, once applied, be able to
|
||||
be used as a bisection point. The kernel should be able to build and boot
|
||||
between each applied patch. Since the SLE kernel is based on an official
|
||||
upstream kernel release and is followed by a hardening process, we expect that
|
||||
nearly all of the patches applied to the base release will be from subsequent
|
||||
official upstream releases intended to address specific issues or to allow for
|
||||
hardware/feature enablement.
|
||||
|
||||
|
||||
Background
|
||||
----------
|
||||
|
||||
Before covering the policy itself, we'll discuss a bit of background on how the
|
||||
source code tree is organized. If you've used the SLE kernel source tree
|
||||
at <https://github.com/SUSE/kernel-source> before, you've probably noticed that,
|
||||
unlike the mainline Linux kernel, we don't use a source-level Git repository as
|
||||
our "base". Instead, we use an official kernel.org Linux tar archive as the base
|
||||
and add a series of patches on top of it. This carries with it several benefits.
|
||||
The biggest is that we add metadata "tags" to our patches that allow us to
|
||||
easily associate patches with particular feature requests, bug reports, and/or
|
||||
the pedigree of the patch. Due to the nature of some of our feature requests, we
|
||||
must also occasionally carry patches that, for one reason or another, haven't
|
||||
been accepted into the mainline kernel repository yet. With a full Git
|
||||
repository, it would be difficult to associate the initial commit for a
|
||||
particular feature with any subsequent changes to it. Another benefit is more
|
||||
superficial: with the use of separate patches, we and our users are able to
|
||||
tell, at a glance, which patches are in any given kernel release simply by
|
||||
looking at the source package.
|
||||
|
||||
This approach works well but has limited options for typical debugging
|
||||
techniques such as bisection. The application of the patch series results in our
|
||||
fully operational SLE kernel but stopping the patch series midway can result in
|
||||
an unbuildable source tree. To help this and similar scenarios, we publish also
|
||||
a fully expanded Git repository at <https://github.com/SUSE/kernel> which
|
||||
exactly represents the code as if it were originally used as a standard source
|
||||
code tree repository. This allows us to work with the individual patches *and*
|
||||
have the ability to bisect the tree as the changes are applied. It also makes it
|
||||
easier for partners unfamiliar with how our source tree works to make the
|
||||
transition.
|
||||
|
||||
|
||||
Format
|
||||
------
|
||||
|
||||
The SLE patch format follows very closely what you would see on any mailing list
|
||||
associated with Linux kernel development. A SLE patch is formatted like an
|
||||
RFC822 mbox-style mail message, with a few extensions. If the patch is coming
|
||||
from the mainline Linux repository or a subsystem maintainer repository, SUSE
|
||||
has tools that can make adding these tags nearly painless.
|
||||
|
||||
Each patch should contain the "From" and "Subject" headers found in any email
|
||||
message. The From should contain the name and email address of the patch author.
|
||||
The Subject should contain a short description of the patch, prefixed with the
|
||||
subsystem affected.
|
||||
|
||||
For instance:
|
||||
|
||||
From: Jeff Mahoney <jeffm@suse.com>
|
||||
Subject: init: print hello world at boot time
|
||||
|
||||
Beyond that, we require several more headers, the full description of the patch,
|
||||
the certification tags used in the mainline kernel, and the patch contents.
|
||||
|
||||
The required headers are as follows:
|
||||
|
||||
* Git-commit: [a-f0-9]{40}
|
||||
|
||||
Contains the SHA-1 Git commit ID of the patch in either the mainline kernel
|
||||
repository or an official maintainer repository.
|
||||
|
||||
* Git-repo: URL-to-git-repo (starting with `git://`)
|
||||
|
||||
The URL to the Git repository containing the commit. This tag can be omitted
|
||||
if the commit is from the mainline kernel repository.
|
||||
|
||||
* Patch-mainline: vMajor.Minor.Patch{-optional-rc}
|
||||
|
||||
The official kernel release that contains this patch. In the case of a patch
|
||||
accepted into a maintainer branch, "Queued in subsystem maintainer repo" can
|
||||
be used. If the patch has been submitted to a subsystem mailing list for
|
||||
review and is nearly certain to be accepted,
|
||||
"Submitted <date> <list@site.org>" can be used. Otherwise, if the patch will
|
||||
never be in the upstream kernel, e.g. in the case of vendor-specific version
|
||||
numbers, etc., then "No" followed by the reason why it will not be accepted
|
||||
(or submitted). Please note that the reason must be compelling for it to be
|
||||
allowed into our kernel repository.
|
||||
|
||||
* References: list of references
|
||||
|
||||
A specific reason must exist for each patch to be included into the kernel
|
||||
repository. It can be a fix in response to a bug report or a patch submitted
|
||||
as part of the feature development cycle for a release. We use a shorthand to
|
||||
indicate why a particular patch will be included and it's possible to use more
|
||||
than one.
|
||||
|
||||
For feature requests, the feature will have to have gone through our feature
|
||||
tracking tool, a Jira instance at <https://jira.suse.com/>. Each feature
|
||||
request will have an ID associated with it and it can be added to the
|
||||
References tag using jsc#id, e.g. jsc#PED-12345.
|
||||
|
||||
For fixes to bug reports or patches for feature requests submitted via
|
||||
Bugzilla at <https://bugzilla.suse.com/>, the shorthand is bsc#number. Other
|
||||
shorthands referring to different Bugzilla instances are possible too, such as
|
||||
bko, for <https://bugzilla.kernel.org/>.
|
||||
|
||||
Next is the full description of the patch, which should explain why the patch is
|
||||
needed and an overview of what it does.
|
||||
|
||||
The last "header" portion of the patch contains the certification tags, which
|
||||
consist of "Signed-off-by" and "Acked-by". We and the upstream Linux community
|
||||
depend on patch submitters to "own" their submission and certify they have the
|
||||
right to submit code to the kernel repository. For patches coming from the
|
||||
mainline Linux kernel repository, the certification tags are already in place
|
||||
and only the submitter's tag needs to be added, unless one is also already part
|
||||
of the original patch. Likewise, the SUSE engineer who includes the submission
|
||||
in our kernel tree will add their own "Acked-by" tag.
|
||||
|
||||
The remaining part of the patch is the actual diff with changes. The patch
|
||||
content should be in the "-ab" format where the patch header itself only
|
||||
contains the filename without any timestamps. An optional `diffstat -p1` output
|
||||
may also be included.
|
||||
|
||||
Here's an example of a complete patch:
|
||||
|
||||
```
|
||||
From: Upstream Committer <coder@somesite.com>
|
||||
Subject: init: print hello world on boot
|
||||
Patch-mainline: v3.8-rc1
|
||||
Git-commit: deadbeefc0ffeeb1a4b1a4b1a4b1a4b1a4b1a4b1a4
|
||||
References: jsc#PED-12134 bsc#23123
|
||||
|
||||
The kernel started off like every other project. Let's add the hello
|
||||
world message in honor of its roots.
|
||||
|
||||
Signed-off-by: Upstream Committer <coder@somesite.com>
|
||||
Tested-by: Bill User <bill.user@example.com>
|
||||
Acked-by: Jeff Mahoney <jeffm@suse.com>
|
||||
---
|
||||
init/main.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/init/main.c
|
||||
+++ b/init/main.c
|
||||
@@ -807,6 +807,7 @@ static noinline int init_post(void)
|
||||
system_state = SYSTEM_RUNNING;
|
||||
numa_default_policy();
|
||||
|
||||
+ printk("Hello world!\n");
|
||||
|
||||
current->signal->flags |= SIGNAL_UNKILLABLE;
|
||||
|
||||
```
|
||||
|
||||
|
||||
Patch inclusion rules
|
||||
---------------------
|
||||
|
||||
As mentioned in the summary, we expect that most patches to the SLE kernel will
|
||||
come from subsequent official upstream kernel releases, or from subsystem
|
||||
maintainer repositories where the patch is on its way to become a part of an
|
||||
official upstream Linux release. The SLE kernel contains hardware enablement
|
||||
driver enhancement/backports for a wide range of devices offered by many
|
||||
vendors. In many cases, the drivers are self-contained but many others have
|
||||
shared dependencies on common infrastructure.
|
||||
|
||||
The shared dependencies on common infrastructure combined with the need to be
|
||||
able to bisect the resulting kernel means that we must require all partners to
|
||||
submit patch series consisting of individual patches that match upstream
|
||||
commits. In the case where a commit affects multiple drivers, it is acceptable
|
||||
to only include the portions that affect a particular driver as long as it is
|
||||
annotated by appending "(partial)" to the Git-commit line and documenting what
|
||||
is included or dropped. An example using the patch tools is included below.
|
||||
|
||||
|
||||
Tools
|
||||
-----
|
||||
|
||||
We understand that there are a bunch of rules to follow and that implementing
|
||||
them all can be tedious. SUSE has a set of tools to make working with the
|
||||
patches a lot easier. They are called patchtools and published at
|
||||
<https://download.opensuse.org/repositories/Kernel:/tools/>.
|
||||
|
||||
Two important tools are included: fixpatch and exportpatch. Fixpatch adds
|
||||
missing headers and formatting to existing patches, assuming there's at least a
|
||||
Git-commit tag present. Exportpatch, given a list of commit IDs on the command
|
||||
line, searches for each commit in the configured repositories and exports the
|
||||
patches.
|
||||
|
||||
Exportpatch has a number of options, the following list shows the most useful
|
||||
ones:
|
||||
|
||||
* `-w` | `--write`
|
||||
|
||||
Write out each commit into a separate file. The filenames are based on the
|
||||
subject of the header and they get output on stdout for use directly in a
|
||||
series file.
|
||||
|
||||
* `-d DIR` | `--dir=DIR`
|
||||
|
||||
Write out each commit into a designated directory. The default is to write
|
||||
into the current directory.
|
||||
|
||||
* `-F REF` | `--reference=REFERENCE`
|
||||
|
||||
Add a References tag to the patch output using the specified reference, can be
|
||||
repeated multiple times.
|
||||
|
||||
* `-x EXTRACT` | `--extract=EXTRACT`
|
||||
|
||||
It it sometimes desirable to split out chunks of patches that affect only a
|
||||
particular section of the code. This option accepts pathnames to extract.
|
||||
Anything not specified will be skipped. Paths ending with `/` designate
|
||||
everything under that hierarchy. This also adds the "(partial)" notation to
|
||||
the Git-commit tag and adds a Patch-filtered tag indicating which paths were
|
||||
used to extract.
|
||||
|
||||
Refer to the exportpatch(1) manual page for more details and a complete list of
|
||||
all options.
|
||||
|
||||
One useful feature of exportpatch is that 3-way merge diffs are handled
|
||||
automatically such that a new, exact 2-way diff is generated. Note that both the
|
||||
`-x` option and the automatic handling of merge commits can generate empty
|
||||
patches. Such patches are skipped entirely and no files are generated.
|
||||
|
||||
As a quick example, the following invocation would generate patches necessary
|
||||
for a backport of the ixgbe driver from v3.2 against the v3.0 kernel:
|
||||
|
||||
$ exportpatch -w -d ixgbe \
|
||||
-x drivers/net/ixgbe/ -x drivers/net/ethernet/intel/ixgbe/ \
|
||||
-F "jsc#PED-12345" -F "bsc#12354" \
|
||||
$(git log v3.0..v3.2 --pretty=oneline -- \
|
||||
drivers/net/ixgbe drivers/net/ethernet/intel/ixgbe | \
|
||||
cut -b 1-40) \
|
||||
> ixgbe/series
|
||||
|
||||
The tool automatically adds an Acked-by tag to the created patches unless you
|
||||
were involved in the original upstream commit process. Be aware that the
|
||||
produced result (obviously) doesn't include any infrastructure changes that
|
||||
might be needed for the patches to build.
|
||||
|
||||
The first patch in the series looks like this:
|
||||
|
||||
```
|
||||
From 6403eab143205a45a5493166ff8bf7e3646f4a77 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Perches <joe@perches.com>
|
||||
Date: Fri, 3 Jun 2011 11:51:20 +0000
|
||||
Subject: drivers/net: Remove unnecessary semicolons
|
||||
Git-commit: 6403eab143205a45a5493166ff8bf7e3646f4a77 (partial)
|
||||
Patch-mainline: v3.1-rc1
|
||||
References: jsc#PED-12345 bsc#12354
|
||||
Patch-filtered: drivers/net/ixgbe/ drivers/net/ethernet/intel/ixgbe/
|
||||
|
||||
Semicolons are not necessary after switch/while/for/if braces
|
||||
so remove them.
|
||||
|
||||
Signed-off-by: Joe Perches <joe@perches.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Acked-by: Jeff Mahoney <jeffm@suse.com>
|
||||
---
|
||||
|
||||
drivers/net/ixgbe/ixgbe_82599.c | 4 ++--
|
||||
drivers/net/ixgbe/ixgbe_common.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/ixgbe/ixgbe_82599.c
|
||||
+++ b/drivers/net/ixgbe/ixgbe_82599.c
|
||||
@@ -1157,7 +1157,7 @@ s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc)
|
||||
default:
|
||||
/* bad value */
|
||||
return IXGBE_ERR_CONFIG;
|
||||
- };
|
||||
+ }
|
||||
|
||||
/* Move the flexible bytes to use the ethertype - shift 6 words */
|
||||
fdirctrl |= (0x6 << IXGBE_FDIRCTRL_FLEX_SHIFT);
|
||||
@@ -1245,7 +1245,7 @@ s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc)
|
||||
default:
|
||||
/* bad value */
|
||||
return IXGBE_ERR_CONFIG;
|
||||
- };
|
||||
+ }
|
||||
|
||||
/* Turn perfect match filtering on */
|
||||
fdirctrl |= IXGBE_FDIRCTRL_PERFECT_MATCH;
|
||||
|
||||
--- a/drivers/net/ixgbe/ixgbe_common.c
|
||||
+++ b/drivers/net/ixgbe/ixgbe_common.c
|
||||
@@ -1292,7 +1292,7 @@ static s32 ixgbe_ready_eeprom(struct ixgbe_hw *hw)
|
||||
|
||||
udelay(5);
|
||||
ixgbe_standby_eeprom(hw);
|
||||
- };
|
||||
+ }
|
||||
|
||||
/*
|
||||
* On some parts, SPI write time could vary from 0-20mSec on 3.3V
|
||||
@@ -1374,7 +1374,7 @@ static void ixgbe_shift_out_eeprom_bits(struct ixgbe_hw *hw, u16 data,
|
||||
* EEPROM
|
||||
*/
|
||||
mask = mask >> 1;
|
||||
- };
|
||||
+ }
|
||||
|
||||
/* We leave the "DI" bit set to "0" when we leave this routine. */
|
||||
eec &= ~IXGBE_EEC_DI;
|
||||
|
||||
```
|
||||
433
README.SUSE
Normal file
433
README.SUSE
Normal file
@@ -0,0 +1,433 @@
|
||||
Working with the SUSE Kernel Sources
|
||||
====================================
|
||||
|
||||
This document gives an overview of how SUSE Linux kernels are created, and
|
||||
describes tasks like building individual kernels and creating external kernel
|
||||
modules.
|
||||
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The SUSE kernels are generated from the upstream Linux kernel sources found at
|
||||
<https://kernel.org/>, on top of which a number of patches are applied. The
|
||||
expanded kernel source tree is configured and built, resulting in a binary
|
||||
kernel.
|
||||
|
||||
The add-on patches and configuration files are maintained in a Git repository at
|
||||
<https://github.com/SUSE/kernel-source>, with an alternative mirror at
|
||||
<https://github.com/openSUSE/kernel-source>.
|
||||
|
||||
A script named `scripts/tar-up.sh` packs up the files in the repository in a
|
||||
form suitable for rpmbuild. When building the RPM packages, the following
|
||||
binary packages get created:
|
||||
|
||||
* kernel-source
|
||||
|
||||
The kernel source tree, generated by unpacking the vanilla kernel sources and
|
||||
applying the patches. The kernel sources are used by a number of other
|
||||
packages. They can also be used for compiling additional kernel modules.
|
||||
|
||||
* kernel-devel
|
||||
|
||||
A complement of the kernel-source package that is needed to build external
|
||||
modules.
|
||||
|
||||
* kernel-`$FLAVOR`
|
||||
|
||||
A number of binary kernels, for example, kernel-default for standard use,
|
||||
kernel-debug with extra debugging features, etc. These packages are all
|
||||
generated from the same kernel sources, and differ in the kernel
|
||||
configurations used.
|
||||
|
||||
* kernel-`$FLAVOR`-base
|
||||
|
||||
A subset of kernel-`$FLAVOR`, for use in virtualized guests that only require
|
||||
a few device and filesystem drivers.
|
||||
|
||||
* kernel-`$FLAVOR`-devel
|
||||
|
||||
The files used for generating kernel module packages for use with
|
||||
kernel-`$FLAVOR`.
|
||||
|
||||
* kernel-syms
|
||||
|
||||
A meta package that pulls in the relevant kernel-`$FLAVOR`-devel packages for
|
||||
a given architecture.
|
||||
|
||||
The repository contains configuration files (`.config`) for all SUSE kernel
|
||||
flavors. All configuration files are included in the dependencies of the
|
||||
kernel-syms package, see [Where to find configuration
|
||||
files](#where-to-find-configuration-files) below.
|
||||
|
||||
In the installed system, the kernel-source package installs files in the
|
||||
following directories:
|
||||
|
||||
* `/usr/src/linux-$VERSION-$RELEASE/`
|
||||
|
||||
The kernel sources.
|
||||
|
||||
* `/usr/src/linux`
|
||||
|
||||
A symbolic link to `/usr/src/linux-$VERSION-$RELEASE/`.
|
||||
|
||||
* `/usr/share/doc/packages/kernel-source-$VERSION-$RELEASE/`
|
||||
|
||||
This document.
|
||||
|
||||
The kernel-`$FLAVOR`-devel packages install the following files:
|
||||
|
||||
* `/usr/src/linux-$VERSION-$RELEASE-obj/$ARCH/$FLAVOR/`
|
||||
|
||||
Kernel build object files for one kernel flavor. These files are used for
|
||||
compiling additional kernel modules.
|
||||
|
||||
* `/usr/src/linux-obj/$ARCH/$FLAVOR`
|
||||
|
||||
A symbolic link to `/usr/src/linux-$VERSION-$RELEASE-obj/$ARCH/$FLAVOR/`.
|
||||
|
||||
|
||||
Compiling your own kernel
|
||||
-------------------------
|
||||
|
||||
The kernel sources are found in the kernel-source package. A binary kernel can
|
||||
be built from these sources as follows:
|
||||
|
||||
1. Install the kernel-source package.
|
||||
|
||||
2. Create a build directory for use in configuring and building the kernel.
|
||||
Using `/usr/src/linux/` directly requires root privileges and will cause
|
||||
problems if you need to build kernel modules for other installed kernels.
|
||||
|
||||
3. Configure the kernel, see [How to configure the kernel
|
||||
sources](#how-to-configure-the-kernel-sources). For example,
|
||||
`make -C /usr/src/linux O=$PWD oldconfig`.
|
||||
|
||||
4. Build the kernel and all its modules by invoking `make`.
|
||||
|
||||
5. Make sure that `/etc/modprobe.d/10-unsupported-modules.conf` contains
|
||||
|
||||
allow_unsupported_modules 1
|
||||
|
||||
otherwise modprobe will refuse to load any modules.
|
||||
|
||||
6. Install the modules and kernel: `make modules_install`, followed by
|
||||
`make install`. This automatically creates an initrd for the new kernel and
|
||||
adds an entry to the GRUB boot menu.
|
||||
|
||||
Instead of building binary kernels by hand, you can also build one of the
|
||||
kernel-`$FLAVOR` packages using RPM.
|
||||
|
||||
|
||||
Building additional (external) modules
|
||||
--------------------------------------
|
||||
|
||||
A single binary kernel module generally only works for a specific version of the
|
||||
kernel source tree, for a specific architecture and configuration. This means
|
||||
that for each binary kernel that SUSE ships, a custom module must be built. This
|
||||
requirement is to some extent relaxed by the modversion mechanism: modversions
|
||||
attach a checksum to each symbol (function or variable) exported to modules by
|
||||
the kernel. This allows to use kernel modules that have been built for a kernel
|
||||
with a different version or release number in many cases, as long as none of the
|
||||
symbols the module uses have changed between the two kernel versions.
|
||||
|
||||
When releasing maintenance or security update kernels for a specific product, we
|
||||
carefully try to keep the kernel ABI stable. Despite this, we sometimes have no
|
||||
choice but to break binary compatibility. In this case, those kernel modules
|
||||
must be rebuilt.
|
||||
|
||||
Additional kernel modules for one of the SUSE kernel flavors can be built in the
|
||||
following ways:
|
||||
|
||||
1. by doing an ad-hoc module build, using one of the standard configurations in
|
||||
`/usr/src/linux-obj/$ARCH/$FLAVOR`, or
|
||||
|
||||
2. by creating a Kernel Module Package (KMP) as described in the Kernel Module
|
||||
Packages Manual,
|
||||
<https://documentation.suse.com/sbp/all/html/SBP-KMP-Manual-SLE12SP2/index.html>.
|
||||
|
||||
The first method involves the following steps:
|
||||
|
||||
1. Install the kernel-devel package.
|
||||
|
||||
2. Install the kernel-`$FLAVOR`-devel package. This is necessary for symbol
|
||||
version information (`CONFIG_MODVERSIONS`).
|
||||
|
||||
3. Compile the module(s) by changing into the module source directory and typing
|
||||
`make -C /usr/src/linux-obj/$ARCH/$FLAVOR M=$PWD`. Substitute `$ARCH` and
|
||||
`$FLAVOR` with the architecture and flavor for which to build the module(s).
|
||||
|
||||
If the installed kernel sources match the running kernel, you can build
|
||||
modules for the running kernel by using the path
|
||||
`/lib/modules/$(uname -r)/build` as the `-C` option in the above command.
|
||||
(`build` is a symlink to `/usr/src/linux-obj/$ARCH/$FLAVOR`.)
|
||||
|
||||
4. Install the module(s) with
|
||||
`make -C /usr/src/linux-obj/$ARCH/$FLAVOR M=$PWD modules_install`.
|
||||
|
||||
Whenever building modules, please use the kernel build infrastructure as much as
|
||||
possible, and do not try to circumvent it. The `Documentation/kbuild` directory
|
||||
in the kernel sources documents kbuild makefiles.
|
||||
|
||||
|
||||
Supported vs. unsupported modules
|
||||
---------------------------------
|
||||
|
||||
As an extension to the mainline kernel, modules can be tagged as supported
|
||||
(directly by SUSE, or indirectly by a third party) or unsupported. Modules which
|
||||
are known to be flakey or for which SUSE does not have the necessary expertise
|
||||
are marked as unsupported. Modules for which SUSE has third-party support
|
||||
agreements are marked as externally supported. Modules for which SUSE provides
|
||||
direct support are marked as supported.
|
||||
|
||||
The support status of a module can be queried with the modinfo tool. Modinfo
|
||||
will report one of the following:
|
||||
|
||||
* direct support by SUSE: "supported: yes",
|
||||
* third-party support: "supported: external",
|
||||
* unsupported modules: no supported tag.
|
||||
|
||||
At runtime, the support status of a module can be obtained by reading
|
||||
`/sys/module/$MODULE/supported`.
|
||||
|
||||
Note that this information is available only if the module was not built
|
||||
directly into the kernel. Builtin modules are implicitly supported.
|
||||
|
||||
The aggregated support status for the entire kernel can be inspected by reading
|
||||
`/sys/kernel/supported`. The value is also included in Oopses.
|
||||
|
||||
The setting of the "unsupported" kernel command line parameter and
|
||||
`/proc/sys/kernel/unsupported` controls whether unsupported modules can be
|
||||
loaded or not, and whether or not loading an unsupported module causes a warning
|
||||
in the system log:
|
||||
|
||||
* 0 = only allow supported modules,
|
||||
* 1 = warn when loading unsupported modules,
|
||||
* 2 = don't warn.
|
||||
|
||||
Irrespective of this setting, loading an unsupported module sets a kernel taint
|
||||
flag. The taint status of the kernel can be inspected in
|
||||
`/proc/sys/kernel/tainted`. The taint flags are also included in Oopses.
|
||||
Relevant bits have the following meaning:
|
||||
|
||||
| Bit | Log | Number | Reason that got the kernel tainted |
|
||||
|----:|----:|-----------:|----------------------------------------------------|
|
||||
| 0 | G/P | 1 | proprietary module was loaded |
|
||||
| 12 | ␣/O | 4096 | externally-built ("out-of-tree") module was loaded |
|
||||
| 13 | ␣/E | 8192 | unsigned module was loaded |
|
||||
| 16 | ␣/X | 65536 | module with third-party support was loaded |
|
||||
| 31 | ␣/N | 2147483648 | unsupported module was loaded |
|
||||
|
||||
Bits 16 and 31 are specific to the SUSE kernels. Since SLE15-SP6, loading an
|
||||
externally supported module does not taint the kernel, but bit 16 (X) is still
|
||||
tracked per module and can be read in `/sys/module/$MODULE/taint`.
|
||||
|
||||
Out-of-tree modules do not have the supported flag set by default; that
|
||||
is, they are marked as unsupported. For building externally supported
|
||||
modules, please get in touch with the Solid Driver Program team, led by
|
||||
Scott Bahling, at <mailto:soliddriver@suse.com>.
|
||||
|
||||
|
||||
Patch selection mechanism
|
||||
-------------------------
|
||||
|
||||
The SUSE kernels consist of the upstream kernel sources on top of which a number
|
||||
of patches is applied. The file `series.conf` determines which patches are
|
||||
applied and which are excluded. A script named `guards` converts `series.conf`
|
||||
into a plain list of patch files to be applied. Guards decides which patches to
|
||||
include and exclude based on a list of symbols. From the kernel-source.src.rpm
|
||||
package, a fully patched kernel source tree can be generated from vanilla
|
||||
sources + patches like this:
|
||||
|
||||
1. Install the package:
|
||||
|
||||
# rpm -i kernel-source-$RPMVERSION-$RPMRELEASE.src.rpm
|
||||
|
||||
2. Unpack the patches and the kernel sources:
|
||||
|
||||
# cd /usr/src/packages/SOURCES/
|
||||
# for f in patches.*.tar.bz2; do \
|
||||
tar -xjf "$f" || break; \
|
||||
done
|
||||
# tar -xJf linux-$SRCVERSION.tar.xz
|
||||
|
||||
3. Apply the patches
|
||||
|
||||
# for p in $(./guards < series.conf); do \
|
||||
patch -d linux-$SRCVERSION -p1 < $p || break; \
|
||||
done
|
||||
|
||||
The configuration script `config.conf` which is similar to `series.conf` is
|
||||
used for configuration file selection, see the section [Where to find
|
||||
configuration files](#where-to-find-configuration-files).
|
||||
|
||||
The file format of `series.conf` and `config.conf` should be apparent from the
|
||||
comments in `series.conf` and from the guards(1) manual page. You can generate
|
||||
this page by running `pod2man` on the `guards` script.
|
||||
|
||||
|
||||
Where to find configuration files
|
||||
---------------------------------
|
||||
|
||||
Kernel configuration files are stored in the kernel Git repository. When packing
|
||||
up the repository, they end up in `config.tar.bz2`.
|
||||
|
||||
The kernel-`$FLAVOR` packages are based on `config/$ARCH/$FLAVOR`, for instance,
|
||||
kernel-default is based on `config/$ARCH/default`. The kernel-`$FLAVOR` packages
|
||||
install their configuration files as `/boot/config-$VERSION-$RELEASE-$FLAVOR`.
|
||||
The config is also packaged in the kernel-`$FLAVOR`-devel package as
|
||||
`/usr/src/linux-obj/$ARCH/$FLAVOR/.config`.
|
||||
|
||||
In addition, the running kernel exposes a gzip compressed version of its
|
||||
configuration file as `/proc/config.gz`.
|
||||
|
||||
|
||||
How to configure the kernel sources
|
||||
-----------------------------------
|
||||
|
||||
Before a binary kernel is built or an additional loadable module for an existing
|
||||
kernel is created, the kernel must be configured.
|
||||
|
||||
In order for a loadable module to work with an existing kernel, it must be
|
||||
created with a configuration that is identical to the kernel's configuration, or
|
||||
at least very close to that. Each configuration is contained in a single file.
|
||||
The kernel-syms package installs configurations for all standard SUSE kernel
|
||||
variants, so for building only external kernel modules it is not necessary to
|
||||
configure the kernel sources.
|
||||
|
||||
Configuring the kernel sources for a specific configuration is straightforward:
|
||||
|
||||
* Locate the configuration file you want to use, see [Where to find
|
||||
configuration files](#where-to-find-configuration-files) above.
|
||||
|
||||
* Copy the configuration to the file `.config` in your build directory.
|
||||
|
||||
* Run the following commands in sequence to apply the configuration, generate
|
||||
version information files, etc.:
|
||||
|
||||
$ make -C /usr/src/linux O=$PWD clean
|
||||
$ make -C /usr/src/linux O=$PWD oldconfig
|
||||
|
||||
If the kernel sources do not match the configuration file exactly,
|
||||
`make oldconfig` will prompt for settings that are undefined. When no
|
||||
`.config` file is initially copied to the target build directory, the command
|
||||
automatically uses `/boot/config-$(uname -r)` as the starting configuration.
|
||||
Alternatively to `make oldconfig`, you can also use `make menuconfig` for
|
||||
a text menu oriented user interface.
|
||||
|
||||
Once this step is completed, a `Makefile` will have been created that
|
||||
eliminates the need to specify the locations of the kernel source and the
|
||||
build directory.
|
||||
|
||||
* Update the configuration appropriately for the target use.
|
||||
|
||||
Configuration files for SUSE kernels include settings to integrate with
|
||||
signing support provided by the Open Build Service. When using such a
|
||||
configuration file directly, the build might fail due to missing files needed
|
||||
for signing kernel modules.
|
||||
|
||||
The minimal steps to enable module signing and have the kernel build
|
||||
automatically generate a new key pair are as follows:
|
||||
|
||||
$ ./source/scripts/config --enable CONFIG_MODULE_SIG \
|
||||
--enable CONFIG_MODULE_SIG_ALL --undefine CONFIG_MODULE_SIG_KEY
|
||||
$ make olddefconfig
|
||||
|
||||
Please refer to the upstream documentation located at
|
||||
`/usr/src/linux/Documentation/admin-guide/module-signing.rst` for complete
|
||||
information on how to configure module signing.
|
||||
|
||||
|
||||
How to add custom patches
|
||||
-------------------------
|
||||
|
||||
Patches are typically added to the `patches.suse/` directory and an appropriate
|
||||
place in `series.conf`. When the kernel-source package is exported from the Git
|
||||
repository, the patch will be automatically added to the matching patch tarball.
|
||||
|
||||
If your goal is to create a kernel with only a few additional patches and you
|
||||
don't want to be bothered with using the Git repository, there is an easier way.
|
||||
|
||||
The kernel-source SRPM ships with two empty archives that can be filled and
|
||||
automatically expanded when building the kernel. You can use these to add your
|
||||
own patches and config options without disturbing the rest of the kernel
|
||||
package. This is useful if you are using the openSUSE Build Service and link to
|
||||
the main kernel-source project instead of creating your own branch. The
|
||||
advantage to this is that your project will automatically receive all the
|
||||
changes that go into the main project without any further effort.
|
||||
|
||||
To add a patch using this mechanism, just add it to the `patches.addon.tar.bz2`
|
||||
archive and add an entry to a `series` file inside the archive. The archive will
|
||||
be expanded automatically after the other kernel patches when the source tree is
|
||||
constructed.
|
||||
|
||||
Some patches may add new Kconfig options. The `config.addon.tar.bz2` archive
|
||||
contains the same hierarchy as `config.tar.bz2`, but is under `config.addon/`.
|
||||
You can add your new config options to files named after their `config/`
|
||||
counterparts.
|
||||
|
||||
For example, the file used to configure the x86_64 default kernel is named
|
||||
`config/x86_64/default`. To add config options to that kernel, you would create
|
||||
a new file called `config.addon/x86_64/default` with the options as formatted in
|
||||
a normal Linux kernel `.config` file. This is important because the kernel build
|
||||
is non-interactive and will fail if it encounters new config options without
|
||||
entries in the config file.
|
||||
|
||||
|
||||
Module load paths
|
||||
-----------------
|
||||
|
||||
Modules that belong to a specific kernel release are installed in
|
||||
`/lib/modules/$VERSION-$RELEASE-$FLAVOR/`. Modules from KMPs must be installed
|
||||
below `/lib/modules/$VERSION-$RELEASE-$FLAVOR/updates/` and similar: modules
|
||||
below `updates/` have priority over other modules.
|
||||
|
||||
When KMPs contain modules that are compatible between multiple installed
|
||||
kernels, symlinks are used to make those modules available to those compatible
|
||||
kernels like this:
|
||||
|
||||
`/lib/modules/$VERSION-$OTHER_RELEASE-$FLAVOR/weak-updates/foo.ko` →
|
||||
`/lib/modules/$VERSION-$RELEASE-$FLAVOR/updates/foo.ko`
|
||||
|
||||
Modules in the `weak-updates/` directory have lower priority than modules in
|
||||
`/lib/modules/$VERSION-$OTHER_RELEASE-$FLAVOR/updates/`, and higher priority
|
||||
than other modules in `/lib/modules/$VERSION-$OTHER_RELEASE-$FLAVOR/`.
|
||||
|
||||
|
||||
Driver update disks
|
||||
-------------------
|
||||
|
||||
A Driver Update Disk (DUD) is an update archive which makes it possible to use
|
||||
new device drivers to run installation of an (open)SUSE distribution. It allows
|
||||
to install the distribution on devices that were not supported at the time the
|
||||
distribution was created and be able to boot the installed system afterwards
|
||||
without having to manually install the new device drivers after the
|
||||
installation.
|
||||
|
||||
For information how to create such an update, refer to the mkdud and mksusecd
|
||||
tools, and their documentation:
|
||||
|
||||
* <https://github.com/openSUSE/mkdud>,
|
||||
* <https://github.com/openSUSE/mksusecd>.
|
||||
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
General:
|
||||
|
||||
* Documentation in the kernel source tree,
|
||||
* LWN.net (Linux Weekly News), <https://lwn.net/>,
|
||||
* Kernel newbies, <https://kernelnewbies.org/>.
|
||||
|
||||
Loadable kernel modules:
|
||||
|
||||
* The Linux Kernel Module Programming Guide,
|
||||
<https://sysprog21.github.io/lkmpg/>.
|
||||
|
||||
Kernel module packages:
|
||||
|
||||
* Kernel Module Packages Manual, SUSE Linux Enterprise 12 SP2 or later and SUSE
|
||||
Linux Enterprise 15,
|
||||
<https://documentation.suse.com/sbp/all/html/SBP-KMP-Manual-SLE12SP2/index.html>,
|
||||
* SUSE SolidDriver Program, <https://drivers.suse.com/doc/SolidDriver/>.
|
||||
192
_constraints
Normal file
192
_constraints
Normal file
@@ -0,0 +1,192 @@
|
||||
<constraints>
|
||||
<!-- Default 35GB for binary packages -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">35</size>
|
||||
</disk>
|
||||
<memory>
|
||||
<size unit="G">4</size>
|
||||
</memory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 8GB RAM for kernel-syzkaller -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<package>kernel-syzkaller</package>
|
||||
<package>kernel-source-longterm:kernel-syzkaller</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<physicalmemory>
|
||||
<size unit="G">8</size>
|
||||
</physicalmemory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 8GB for kernel-source-longterm -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<package>kernel-source-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">8</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
<hostlabel exclude="true">SLOW_DISK</hostlabel>
|
||||
</overwrite>
|
||||
|
||||
<!-- 4GB for kernel-docs-longterm -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<package>kernel-docs-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-docs-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<physicalmemory>
|
||||
<size unit="G">4</size>
|
||||
</physicalmemory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 24GB for binary packages on armv6/7 -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>armv7l</arch>
|
||||
<arch>armv6l</arch>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">24</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 16GB of disk and 2GB of memory for binary package on s390x -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>s390x</arch>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">16</size>
|
||||
</disk>
|
||||
<memory>
|
||||
<size unit="G">2</size>
|
||||
</memory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 8 CPUs for binary packages on x86 -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>i586</arch>
|
||||
<arch>x86_64</arch>
|
||||
<arch>riscv64</arch>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<jobs>8</jobs>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 4 CPUs for binary packages on POWER -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>ppc</arch>
|
||||
<arch>ppc64</arch>
|
||||
<arch>ppc64le</arch>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<jobs>4</jobs>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 2 CPUs for binary packages on ARM -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>aarch64</arch>
|
||||
<arch>armv6l</arch>
|
||||
<arch>armv7l</arch>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<jobs>2</jobs>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- Build on recent ARMv8.1 to avoid slow builders -->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>aarch64</arch>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<cpu>
|
||||
<flag>asimdrdm</flag>
|
||||
</cpu>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 45GB for binary packages on aarch64 and x86-->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>aarch64</arch>
|
||||
<arch>x86_64</arch>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">45</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<!-- 52GB for binary packages on riscv64-->
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>riscv64</arch>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-source-longterm:kernel-longterm</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">52</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>i586</arch>
|
||||
<arch>x86_64</arch>
|
||||
<package>kernel-obs-qa</package>
|
||||
<package>kernel-source-longterm:kernel-obs-qa</package>
|
||||
</conditions>
|
||||
<sandbox>kvm</sandbox>
|
||||
</overwrite>
|
||||
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>i586</arch>
|
||||
<arch>x86_64</arch>
|
||||
<package>kernel-obs-qa-xen</package>
|
||||
<package>kernel-source-longterm:kernel-obs-qa-xen</package>
|
||||
</conditions>
|
||||
<sandbox>xen</sandbox>
|
||||
</overwrite>
|
||||
</constraints>
|
||||
|
||||
4
_multibuild
Normal file
4
_multibuild
Normal file
@@ -0,0 +1,4 @@
|
||||
<multibuild>
|
||||
<package>kernel-longterm</package>
|
||||
<package>kernel-syms-longterm</package>
|
||||
</multibuild>
|
||||
47
apply-patches
Normal file
47
apply-patches
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Given a series.conf file and a directory with patches, applies them to the
|
||||
# current directory.
|
||||
# Used by kernel-source.spec.in and kernel-binary.spec.in
|
||||
|
||||
USAGE="$0 [--vanilla] <series.conf> <patchdir> [symbol ...]"
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
vanilla=false
|
||||
if test "$1" == "--vanilla"; then
|
||||
vanilla=true
|
||||
shift
|
||||
fi
|
||||
if test $# -lt 2; then
|
||||
echo "$USAGE" >&2
|
||||
exit 1
|
||||
fi
|
||||
DIR="${0%/*}"
|
||||
SERIES_CONF=$1
|
||||
PATCH_DIR=$2
|
||||
shift 2
|
||||
|
||||
trap 'rm -f "$series"' EXIT
|
||||
series=$(mktemp)
|
||||
# support for patches in patches.addon/series
|
||||
cp "$SERIES_CONF" "$series"
|
||||
if ! $vanilla && test -e "$PATCH_DIR/patches.addon/series"; then
|
||||
# make it user-friendly and automatically prepend "patches.addon/"
|
||||
# if there is no "/"
|
||||
sed -r 's|^([[:space:]]*)([^#[:space:]][^/]*)$|\1patches.addon/\2|' \
|
||||
"$PATCH_DIR/patches.addon/series" >>"$series"
|
||||
fi
|
||||
|
||||
(
|
||||
echo "trap 'echo \"*** patch \$_ failed ***\"' ERR"
|
||||
echo "set -ex"
|
||||
"$DIR"/guards "$@" <"$series" | \
|
||||
if $vanilla; then
|
||||
sed -rn '/^patches\.(kernel\.org|rpmify)\//p'
|
||||
else
|
||||
cat
|
||||
fi |\
|
||||
sed "s|^|patch -s -F0 -E -p1 --no-backup-if-mismatch -i $PATCH_DIR/|"
|
||||
) | sh
|
||||
|
||||
47
arch-symbols
Normal file
47
arch-symbols
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
#############################################################################
|
||||
# Copyright (c) 2003-2005,2009 Novell, Inc.
|
||||
# Copyright (c) 2010-2022 SUSE LLC
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of version 2 of the GNU General Public License as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, contact https://www.suse.com/source-code/
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
|
||||
# With --list, list all known architectures, otherwise print the generic
|
||||
# name for this architecture (or the one specified on command line).
|
||||
|
||||
if [ "$1" = "--list" ]; then
|
||||
# List all known architectures
|
||||
echo i386 mips{,64} sparc{,64} ppc{,64,64le} s390{,x} ia64 x86_64 alpha parisc armv6hl armv7hl arm64 riscv64
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
ARCH="$1"
|
||||
else
|
||||
ARCH="$(arch)"
|
||||
fi
|
||||
case "$ARCH" in
|
||||
# from rpm --eval '%ix86'
|
||||
i?86 | pentium3 | pentium4 | athlon | geode)
|
||||
echo i386
|
||||
;;
|
||||
aarch64)
|
||||
echo arm64
|
||||
;;
|
||||
*)
|
||||
echo "$ARCH"
|
||||
;;
|
||||
esac
|
||||
73
check-for-config-changes
Normal file
73
check-for-config-changes
Normal file
@@ -0,0 +1,73 @@
|
||||
#! /bin/bash
|
||||
|
||||
# This is a list of toolchain-dependent configs. That is: only those which
|
||||
# change .config when gcc, ld, or similar changes.
|
||||
#
|
||||
# please keep them sorted alphabetically
|
||||
declare -a IGNORED_CONFIGS_RE=(
|
||||
'ARCH_USING_PATCHABLE_FUNCTION_ENTRY'
|
||||
'AS_IS_\(GNU\|LLVM\)'
|
||||
'AS_HAS_[A-Z0-9_]*'
|
||||
'AS_VERSION'
|
||||
'AS_WRUSS' # x86_32
|
||||
'BUILTIN_RETURN_ADDRESS_STRIPS_PAC'
|
||||
'CC_ASM_FLAG_OUTPUT_BROKEN'
|
||||
'CC_CAN_[A-Z_]*'
|
||||
'CC_IMPLICIT_FALLTHROUGH'
|
||||
'CC_IS_\(CLANG\|GCC\)'
|
||||
'CC_HAS_[A-Z_]*'
|
||||
'CC_HAVE_[A-Z_]*'
|
||||
'CC_VERSION_TEXT'
|
||||
'CLANG_VERSION'
|
||||
'DRM_MSM_VALIDATE_XML'
|
||||
'DYNAMIC_SIGFRAME'
|
||||
'FTRACE_MCOUNT_USE_[A-Z_]*'
|
||||
'GCC_ASM_FLAG_OUTPUT_BROKEN'
|
||||
'GCC_ASM_GOTO_OUTPUT_BROKEN'
|
||||
'GCC_ASM_GOTO_OUTPUT_WORKAROUND'
|
||||
'GCC_VERSION'
|
||||
'G*CC[0-9]*_NO_[A-Z_]*'
|
||||
'HAS_LTO_CLANG'
|
||||
'HAVE_[A-Z]*_COMPILER'
|
||||
'HAVE_RUST'
|
||||
'HAVE_SHADOW_CALL_STACK'
|
||||
'LD_CAN_[A-Z_]*'
|
||||
'LD_IS_\(BFD\|LLD\)'
|
||||
'LD_VERSION'
|
||||
'LLD_VERSION'
|
||||
'OBJTOOL'
|
||||
'PAHOLE_HAS_[A-Z0-9_]*'
|
||||
'PAHOLE_VERSION'
|
||||
'RISCV_ISA_[A-Z_]*'
|
||||
'RUSTC_SUPPORTS_[A-Z0-9_]*'
|
||||
'TOOLCHAIN_HAS_[A-Z_]*'
|
||||
'TOOLCHAIN_NEEDS_[A-Z_]*'
|
||||
'TOOLS_SUPPORT_[A-Z_]*'
|
||||
'USE_X86_SEG_SUPPORT'
|
||||
)
|
||||
|
||||
declare -a SED_ARGS=()
|
||||
|
||||
for CONFIG in "${IGNORED_CONFIGS_RE[@]}"; do
|
||||
SED_ARGS+=(-e "/\\<CONFIG_$CONFIG\\>/ d")
|
||||
done
|
||||
|
||||
SED_ARGS+=(
|
||||
-e '/^# .* is not set$/p'
|
||||
-e '/^$\|^#/d'
|
||||
)
|
||||
|
||||
differences="$(
|
||||
diff -bU0 <(sed "${SED_ARGS[@]}" "$1" | sort) \
|
||||
<(sed "${SED_ARGS[@]}" "$2" | sort) \
|
||||
| grep '^[-+][^-+]'
|
||||
)" || true
|
||||
if [ -n "$differences" ]; then
|
||||
echo
|
||||
echo "Changes after running \`make oldconfig':"
|
||||
echo "$differences"
|
||||
echo
|
||||
if echo "$differences" | grep -q '^+' ; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
13
check-module-license
Normal file
13
check-module-license
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
rc=0
|
||||
for file in $(find "$@" -name '*.ko' -o -name '*.ko.xz' \
|
||||
-o -name '*.ko.gz' -o -name '*.ko.zst'); do
|
||||
l=$(/sbin/modinfo -F license "$file")
|
||||
if [ -z "$l" ]; then
|
||||
echo "ERROR: No license is included for module ${file##*/lib/modules/}"
|
||||
rc=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $rc
|
||||
BIN
config.addon.tar.bz2
(Stored with Git LFS)
Normal file
BIN
config.addon.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
24
config.conf
Normal file
24
config.conf
Normal file
@@ -0,0 +1,24 @@
|
||||
# Kernel configuration file selection.
|
||||
# See the arch-symbols script for a list of symbols defined.
|
||||
# -syms excludes a flavor from the kernel-syms package (vanilla is excluded
|
||||
# automatically).
|
||||
|
||||
#
|
||||
# IMPORTANT: the subdirectory names map to cpuarch
|
||||
# kernel-binary and kernel-source rely on this
|
||||
#
|
||||
|
||||
- x86_64/default
|
||||
- -syms x86_64/debug
|
||||
- x86_64/syzkaller
|
||||
- x86_64/vanilla
|
||||
- -syms x86_64/kvmsmall
|
||||
+x86_64 x86_64/longterm
|
||||
|
||||
# ARM architectures
|
||||
- arm64/default
|
||||
- -syms arm64/debug
|
||||
- arm64/64kb
|
||||
- arm64/vanilla
|
||||
- -syms arm64/kvmsmall
|
||||
+arm64 arm64/longterm
|
||||
25
config.sh
Normal file
25
config.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# The version of the main tarball to use
|
||||
SRCVERSION=6.12
|
||||
# variant of the kernel-source package, either empty or "-rt"
|
||||
VARIANT=-longterm
|
||||
# enable kernel module compression
|
||||
COMPRESS_MODULES="zstd"
|
||||
COMPRESS_VMLINUX="xz"
|
||||
# Compile binary devicetrees on master and stable branches.
|
||||
BUILD_DTBS="Yes"
|
||||
# Generate a _multibuild file
|
||||
MULTIBUILD="Yes"
|
||||
# Use new style livepatch package names
|
||||
LIVEPATCH=livepatch
|
||||
# buildservice projects to build the kernel against
|
||||
OBS_PROJECT=openSUSE:Factory
|
||||
OBS_PROJECT_ARM=openSUSE:Factory:ARM
|
||||
# Bugzilla info
|
||||
BUGZILLA_SERVER="apibugzilla.suse.com"
|
||||
BUGZILLA_PRODUCT="openSUSE Tumbleweed"
|
||||
# build documentation in HTML format
|
||||
BUILD_HTML=Yes
|
||||
# build documentation in PDF format
|
||||
BUILD_PDF=No
|
||||
# Generate compile_commands.json
|
||||
GENERATE_COMPILE_COMMANDS=Yes
|
||||
3
config.tar.bz2
Normal file
3
config.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0cdbb05d1b012869e37f3b79c13a11a2dfa7fa6ae2161b9b02cc65fa6708d4d9
|
||||
size 106989
|
||||
113
group-source-files.pl
Normal file
113
group-source-files.pl
Normal file
@@ -0,0 +1,113 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use File::Spec;
|
||||
use Getopt::Long qw(:config no_ignore_case);
|
||||
use strict;
|
||||
|
||||
&main();
|
||||
sub main
|
||||
{
|
||||
my($dev_output, $ndev_output, $loc) = ("-", "-", ".");
|
||||
&Getopt::Long::Configure(qw(bundling));
|
||||
&GetOptions(
|
||||
"D=s" => \$dev_output,
|
||||
"N=s" => \$ndev_output,
|
||||
"L=s" => \$loc,
|
||||
);
|
||||
|
||||
my($dev, $ndev) = &scan($loc);
|
||||
&output($dev, $ndev, $dev_output, $ndev_output);
|
||||
}
|
||||
|
||||
sub rpm_quote_filename
|
||||
{
|
||||
# technically should also quote % -> %% " -> \" \ -> \\
|
||||
return map { "\"$_\"" } @_;
|
||||
}
|
||||
|
||||
sub scan
|
||||
{
|
||||
# Normalize file path, mainly to strip away the ending forward slash,
|
||||
# or any double forward slashes.
|
||||
my $loc = File::Spec->canonpath(shift @_);
|
||||
# We cannot use an absolute path (e.g. /usr/src/linux-5.14.21-150500.41)
|
||||
# during find because it's under build root, but rpm wants one later.
|
||||
my $abs_loc = rpm_path($loc);
|
||||
my(@dev, @ndev);
|
||||
|
||||
foreach $_ (`find "$loc"`)
|
||||
{
|
||||
chomp $_;
|
||||
if (-d $_ && !-l $_) {
|
||||
# Generate directory list later.
|
||||
next;
|
||||
}
|
||||
my $is_devel =
|
||||
m{^\Q$loc\E.*/Kconfig} ||
|
||||
m{^\Q$loc\E.*/Kbuild} ||
|
||||
m{^\Q$loc\E.*/Makefile} ||
|
||||
m{^\Q$loc\E/arch/[^/]+/boot/dts/include/dt-bindings\b} ||
|
||||
m{^\Q$loc\E/arch/[^/]+/include\b} ||
|
||||
m{^\Q$loc\E/arch/.*/module\.lds\b} ||
|
||||
m{^\Q$loc\E/arch/arm/[^/]+/include/mach\b} ||
|
||||
m{^\Q$loc\E/arch/arm/[^/]+/include/plat\b} ||
|
||||
m{^\Q$loc\E/arch/[^/]+/scripts\b} ||
|
||||
m{^\Q$loc\E/arch/[^/]+/tools\b} ||
|
||||
m{^\Q$loc\E/include/[^/]+\b} ||
|
||||
m{^\Q$loc\E/scripts\b};
|
||||
my $abs_path = rpm_path($_);
|
||||
$is_devel ? push(@dev, $abs_path) : push(@ndev, $abs_path);
|
||||
}
|
||||
|
||||
my @dev_dirs = calc_dirs($abs_loc, \@dev);
|
||||
my @ndev_dirs = calc_dirs($abs_loc, \@ndev);
|
||||
@dev = rpm_quote_filename(@dev);
|
||||
@ndev = rpm_quote_filename(@ndev);
|
||||
@dev_dirs = map { "\%dir $_" } rpm_quote_filename(@dev_dirs);
|
||||
@ndev_dirs = map { "\%dir $_" } rpm_quote_filename(@ndev_dirs);
|
||||
push(@dev, @dev_dirs);
|
||||
push(@ndev, @ndev_dirs);
|
||||
return (\@dev, \@ndev);
|
||||
}
|
||||
|
||||
sub calc_dirs
|
||||
{
|
||||
my($base, $files) = @_;
|
||||
my %dirs;
|
||||
|
||||
foreach my $file (@$files) {
|
||||
my ($volume,$path,$basename) = File::Spec->splitpath($file);
|
||||
my @dirs = File::Spec->splitdir($path);
|
||||
do {
|
||||
# Always create $path from catdir() to avoid ending forward slash
|
||||
$path = File::Spec->catdir(@dirs);
|
||||
$dirs{$path} = 1;
|
||||
pop @dirs;
|
||||
} while ($path ne $base);
|
||||
# This loop also makes sure that $base itself is included.
|
||||
}
|
||||
|
||||
return keys %dirs;
|
||||
}
|
||||
|
||||
sub output
|
||||
{
|
||||
my($dev, $ndev, $dev_out, $ndev_out) = @_;
|
||||
local *FH;
|
||||
|
||||
open(FH, "> $dev_out") || warn "Error writing to $dev_out: $!";
|
||||
print FH join("\n", @$dev), "\n";
|
||||
close FH;
|
||||
|
||||
open(FH, "> $ndev_out") || warn "Error writing to $ndev_out: $!";
|
||||
print FH join("\n", @$ndev), "\n";
|
||||
close FH;
|
||||
}
|
||||
|
||||
sub rpm_path
|
||||
{
|
||||
my $path = shift @_;
|
||||
# Always prepend forward slash and let canonpath take care of
|
||||
# duplicate forward slashes.
|
||||
return File::Spec->canonpath("/$path");
|
||||
}
|
||||
311
guards
Normal file
311
guards
Normal file
@@ -0,0 +1,311 @@
|
||||
#!/usr/bin/perl -w
|
||||
##############################################################################
|
||||
# Copyright (c) 2003-2007,2009 Novell, Inc.
|
||||
# Copyright (c) 2010-2022 SUSE LLC
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of version 2 of the GNU General Public License as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, contact https://www.suse.com/source-code/
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Guards:
|
||||
#
|
||||
# +xxx include if xxx is defined
|
||||
# -xxx exclude if xxx is defined
|
||||
# +!xxx include if xxx is not defined
|
||||
# -!xxx exclude if xxx is not defined
|
||||
#
|
||||
|
||||
use FileHandle;
|
||||
use Getopt::Long qw(:config no_ignore_case);
|
||||
use strict;
|
||||
|
||||
# Prototypes
|
||||
sub files_in($$);
|
||||
sub parse($$);
|
||||
sub help();
|
||||
|
||||
sub slashme($) {
|
||||
my ($dir) = @_;
|
||||
$dir =~ s#([^/])$#$&/#; # append a slash if necessary
|
||||
if ($dir eq './') {
|
||||
return '';
|
||||
} else {
|
||||
return $dir;
|
||||
}
|
||||
}
|
||||
|
||||
# Generate a list of files in a directory
|
||||
#
|
||||
sub files_in($$) {
|
||||
my ($dir, $path) = @_;
|
||||
my $dh = new FileHandle;
|
||||
my (@files, $file);
|
||||
|
||||
# @<file> syntax
|
||||
if ($path =~ s/^@//) {
|
||||
my $fh;
|
||||
open($fh, '<', $path) or die "$path: $!\n";
|
||||
@files = <$fh>;
|
||||
close($fh);
|
||||
chomp(@files);
|
||||
s:^$dir:: for @files;
|
||||
return @files;
|
||||
}
|
||||
|
||||
$path = slashme($path);
|
||||
opendir $dh, length("$dir$path") ? "$dir$path" : '.'
|
||||
or die "$dir$path: $!\n";
|
||||
while ($file = readdir($dh)) {
|
||||
next if $file =~ /^(\.|\.\.|\.#.*|CVS|.*~)$/;
|
||||
if (-d "$dir$path$file") {
|
||||
@files = (@files, files_in($dir, "$path$file/"));
|
||||
} else {
|
||||
#print "[$path$file]\n";
|
||||
push @files, "$path$file";
|
||||
}
|
||||
}
|
||||
closedir $dh;
|
||||
return @files;
|
||||
}
|
||||
|
||||
# Parse a configuration file
|
||||
# Callback called with ($patch, @guards) arguments
|
||||
#
|
||||
sub parse($$) {
|
||||
my ($fh, $callback) = @_;
|
||||
|
||||
my $line = "";
|
||||
|
||||
while (<$fh>) {
|
||||
chomp;
|
||||
s/(^|\s+)#.*//;
|
||||
if (s/\\$/ /) {
|
||||
$line .= $_;
|
||||
next;
|
||||
}
|
||||
$line .= $_;
|
||||
my @guards = ();
|
||||
foreach my $token (split /[\s\t\n]+/, $line) {
|
||||
next if $token eq "";
|
||||
if ($token =~ /^[-+]/) {
|
||||
push @guards, $token;
|
||||
} else {
|
||||
#print "[" . join(",", @guards) . "] $token\n";
|
||||
&$callback($token, @guards);
|
||||
}
|
||||
}
|
||||
$line = "";
|
||||
}
|
||||
}
|
||||
|
||||
# Command line options
|
||||
#
|
||||
my ($dir, $config, $default, $check, $list, $invert_match, $with_guards) =
|
||||
( '', '-', 1, 0, 0, 0, 0);
|
||||
my @path;
|
||||
|
||||
# Help text
|
||||
#
|
||||
sub help() {
|
||||
print "$0 - select from a list of files guarded by conditions\n";
|
||||
print "SYNOPSIS: $0 [--prefix=dir] [--path=dir1:dir2:...]\n" .
|
||||
" [--default=0|1] [--check|--list] [--invert-match]\n" .
|
||||
" [--with-guards] [--config=file] symbol ...\n\n" .
|
||||
" Defaults: --default=$default\n" .
|
||||
" Use --path=\@<file> to read the list of entries from <file>\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# Parse command line options
|
||||
#
|
||||
Getopt::Long::Configure ("bundling");
|
||||
eval {
|
||||
unless (GetOptions (
|
||||
'd|prefix=s' => \$dir,
|
||||
'c|config=s' => \$config,
|
||||
'C|check' => \$check,
|
||||
'l|list' => \$list,
|
||||
'w|with-guards' => \$with_guards,
|
||||
'p|path=s' => \@path,
|
||||
'D|default=i' => \$default,
|
||||
'v|invert-match' => \$invert_match,
|
||||
'h|help' => sub { help(); exit 0; })) {
|
||||
help();
|
||||
exit 1;
|
||||
}
|
||||
};
|
||||
if ($@) {
|
||||
print "$@";
|
||||
help();
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@path = ('.')
|
||||
unless (@path);
|
||||
@path = split(/:/, join(':', @path));
|
||||
|
||||
my $fh = ($config eq '-') ? \*STDIN : new FileHandle($config)
|
||||
or die "$config: $!\n";
|
||||
|
||||
$dir = slashme($dir);
|
||||
|
||||
if ($check) {
|
||||
# Check for duplicate files, or for files that are not referenced by
|
||||
# the specification.
|
||||
|
||||
my $problems = 0;
|
||||
my @files;
|
||||
|
||||
foreach (@path) {
|
||||
@files = (@files, files_in($dir, $_));
|
||||
}
|
||||
my %files = map { $_ => 0 } @files;
|
||||
|
||||
parse($fh, sub {
|
||||
my ($patch, @guards) = @_;
|
||||
if (exists $files{$patch}) {
|
||||
$files{$patch}++;
|
||||
} else {
|
||||
if ($config eq '-') {
|
||||
print "Not found: $dir$patch\n";
|
||||
} else {
|
||||
print "In $config but not found: $dir$patch\n";
|
||||
}
|
||||
$problems++;
|
||||
}});
|
||||
|
||||
$fh->close();
|
||||
|
||||
my ($file, $ref);
|
||||
while (($file, $ref) = each %files) {
|
||||
next if $ref == 1;
|
||||
|
||||
if ($ref == 0) {
|
||||
if ($config eq '-') {
|
||||
print "Unused: $file\n";
|
||||
} else {
|
||||
print "Not in $config: $file\n";
|
||||
}
|
||||
$problems++;
|
||||
}
|
||||
if ($ref > 1) {
|
||||
print "Warning: multiple uses";
|
||||
print " in $config" if $config ne '-';
|
||||
print ": $file\n";
|
||||
# This is not an error if the entries are mutually exclusive...
|
||||
}
|
||||
}
|
||||
exit ($problems ? 1 : 0);
|
||||
|
||||
} elsif ($list) {
|
||||
parse($fh, sub {
|
||||
my ($patch, @guards) = @_;
|
||||
print join(' ', @guards), ' '
|
||||
if (@guards && $with_guards);
|
||||
print "$dir$patch\n";
|
||||
});
|
||||
} else {
|
||||
# Generate a list of patches to apply.
|
||||
|
||||
my %symbols = map { $_ => 1 } @ARGV;
|
||||
|
||||
parse($fh, sub {
|
||||
my ($patch, @guards) = @_;
|
||||
|
||||
my $selected;
|
||||
if (@guards) {
|
||||
# If the first guard is -xxx, the patch is included by default;
|
||||
# if it is +xxx, the patch is excluded by default.
|
||||
$selected = ($guards[0] =~ /^-/);
|
||||
|
||||
foreach (@guards) {
|
||||
/^([-+])(!?)(.*)?/
|
||||
or die "Bad guard '$_'\n";
|
||||
|
||||
# Check if the guard matches
|
||||
if (($2 eq '!' && !exists $symbols{$3}) ||
|
||||
($2 eq '' && ( $3 eq '' || exists $symbols{$3}))) {
|
||||
# Include or exclude
|
||||
$selected = ($1 eq '+');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# If there are no guards, use the specified default result.
|
||||
$selected = $default;
|
||||
}
|
||||
|
||||
print "$dir$patch\n"
|
||||
if $selected ^ $invert_match;
|
||||
});
|
||||
|
||||
$fh->close();
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
guards - select from a list of files guarded by conditions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
F<guards> [--prefix=F<dir>] [--path=F<dir1:dir2:...>] [--default=<0|1>]
|
||||
[--check|--list] [--invert-match] [--with-guards] [--config=<file>]
|
||||
I<symbol> ...
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The script reads a configuration file that may contain so-called guards, file
|
||||
names, and comments, and writes those file names that satisfy all guards to
|
||||
standard output. The script takes a list of symbols as its arguments. Each line
|
||||
in the configuration file is processed separately. Lines may start with a
|
||||
number of guards. The following guards are defined:
|
||||
|
||||
=over
|
||||
|
||||
+I<xxx> Include the file(s) on this line if the symbol I<xxx> is defined.
|
||||
|
||||
-I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is defined.
|
||||
|
||||
+!I<xxx> Include the file(s) on this line if the symbol I<xxx> is not defined.
|
||||
|
||||
-!I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is not defined.
|
||||
|
||||
- Exclude this file. Used to avoid spurious I<--check> messages.
|
||||
|
||||
=back
|
||||
|
||||
The guards are processed left to right. The last guard that matches determines
|
||||
if the file is included. If no guard is specified, the I<--default>
|
||||
setting determines if the file is included.
|
||||
|
||||
If no configuration file is specified, the script reads from standard input.
|
||||
|
||||
The I<--check> option is used to compare the specification file against the
|
||||
file system. If files are referenced in the specification that do not exist, or
|
||||
if files are not enlisted in the specification file warnings are printed. The
|
||||
I<--path> option can be used to specify which directory or directories to scan.
|
||||
Multiple directories are separated by a colon (C<:>) character. The
|
||||
I<--prefix> option specifies the location of the files. Alternatively, the
|
||||
I<--path=@E<lt>fileE<gt>> syntax can be used to specify a file from which the
|
||||
file names will be read.
|
||||
|
||||
Use I<--list> to list all files independent of any rules. Use I<--invert-match>
|
||||
to list only the excluded patches. Use I<--with-guards> to also include all
|
||||
inclusion and exclusion rules.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Andreas Gruenbacher <agruen@suse.de>, SUSE Labs
|
||||
204
kabi.pl
Normal file
204
kabi.pl
Normal file
@@ -0,0 +1,204 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long qw(:config no_ignore_case);
|
||||
use Data::Dumper;
|
||||
|
||||
# ( { sym => regexp, mod => regexp, fail => 0/1 }, ... )
|
||||
my @rules;
|
||||
my ($opt_verbose, $opt_rules);
|
||||
|
||||
# if Module.symvers also lists namespaces (>=5.4)
|
||||
my $use_namespaces;
|
||||
|
||||
sub load_rules {
|
||||
my $file = shift;
|
||||
my $errors = 0;
|
||||
|
||||
xopen(my $fh, '<', $file);
|
||||
while (<$fh>) {
|
||||
chomp;
|
||||
s/#.*//;
|
||||
next if /^\s*$/;
|
||||
my ($pattern, $verdict) = split(/\s+/);
|
||||
my $new = {};
|
||||
if (uc($verdict) eq "PASS") {
|
||||
$new->{fail} = 0;
|
||||
} elsif (uc($verdict) eq "FAIL") {
|
||||
$new->{fail} = 1;
|
||||
} else {
|
||||
print STDERR "$file:$.: invalid verdict \"$verdict\", must be either PASS or FAIL.\n";
|
||||
$errors++;
|
||||
next;
|
||||
}
|
||||
# simple glob -> regexp conversion
|
||||
$pattern =~ s/\*/.*/g;
|
||||
$pattern =~ s/\?/./g;
|
||||
$pattern =~ s/.*/^$&\$/;
|
||||
|
||||
# If it matches a module path or vmlinux
|
||||
if ($pattern =~ /\/|^vmlinux$/) {
|
||||
$new->{mod} = $pattern;
|
||||
# If it's not a path and the string is all uppercase, assume it's a namespace
|
||||
} elsif ($use_namespaces &&
|
||||
$pattern !~ /\// && $pattern eq uc($pattern)) {
|
||||
$new->{namespace} = $pattern;
|
||||
} else {
|
||||
$new->{sym} = $pattern;
|
||||
}
|
||||
push(@rules, $new);
|
||||
}
|
||||
if ($errors && !@rules) {
|
||||
print STDERR "error: only garbage found in $file.\n";
|
||||
exit 1;
|
||||
}
|
||||
close($fh);
|
||||
}
|
||||
|
||||
# Return 1 if using new (>=5.4) Module.symvers format with namespaces
|
||||
sub symvers_uses_namespaces {
|
||||
my $file = shift;
|
||||
xopen(my $fh, '<', $file);
|
||||
my $line = <$fh>;
|
||||
chomp $line;
|
||||
|
||||
# The new (>=5.4) Module.symvers format has 4 tabs (5 fields):
|
||||
#
|
||||
# crc\tsymbol\tmodule\texport_type\tnamespace
|
||||
#
|
||||
# The older Module.symvers format only has 3 tabs (4 fields):
|
||||
#
|
||||
# crc\tsymbol\tmodule\texport_type
|
||||
|
||||
my $num_tabs = $line =~ tr/\t//;
|
||||
if ($num_tabs > 3) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
sub load_symvers {
|
||||
my $file = shift;
|
||||
my %res;
|
||||
my $errors = 0;
|
||||
my $new;
|
||||
|
||||
xopen(my $fh, '<', $file);
|
||||
while (<$fh>) {
|
||||
chomp;
|
||||
my @l = split(/\t/, $_, -1);
|
||||
if (@l < 4) {
|
||||
print STDERR "$file:$.: unknown line\n";
|
||||
$errors++;
|
||||
next;
|
||||
}
|
||||
if ($use_namespaces) {
|
||||
$new = { crc => $l[0], mod => $l[2], type => $l[3], namespace => $l[4] };
|
||||
} else {
|
||||
$new = { crc => $l[0], mod => $l[2], type => $l[3] };
|
||||
}
|
||||
$res{$l[1]} = $new;
|
||||
}
|
||||
if (!%res) {
|
||||
print STDERR "error: no symvers found in $file.\n";
|
||||
exit 1;
|
||||
}
|
||||
close($fh);
|
||||
return %res;
|
||||
}
|
||||
|
||||
# Each bit represents a restriction of the export and adding a restriction
|
||||
# fails the check
|
||||
my $type_GPL = 0x1;
|
||||
my $type_NOW = 0x2;
|
||||
my $type_UNUSED = 0x4;
|
||||
my %types = (
|
||||
EXPORT_SYMBOL => 0x0,
|
||||
EXPORT_SYMBOL_GPL => $type_GPL | $type_NOW,
|
||||
EXPORT_SYMBOL_GPL_FUTURE => $type_GPL,
|
||||
EXPORT_UNUSED_SYMBOL => $type_UNUSED,
|
||||
EXPORT_UNUSED_SYMBOL_GPL => $type_UNUSED | $type_GPL | $type_NOW
|
||||
);
|
||||
|
||||
sub type_compatible {
|
||||
my ($old, $new) = @_;
|
||||
|
||||
for my $type ($old, $new) {
|
||||
if (!exists($types{$type})) {
|
||||
print STDERR "error: unrecognized export type $type.\n";
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
# if $new has a bit set that $old does not -> fail
|
||||
return !(~$types{$old} & $types{$new});
|
||||
}
|
||||
|
||||
my $kabi_errors = 0;
|
||||
sub kabi_change {
|
||||
my ($sym, $symvers, $message) = @_;
|
||||
my $fail = 1;
|
||||
|
||||
for my $rule (@rules) {
|
||||
if ($rule->{mod} && $symvers->{mod} =~ $rule->{mod} ||
|
||||
$rule->{sym} && $sym =~ $rule->{sym} ||
|
||||
($use_namespaces && $rule->{namespace} &&
|
||||
$symvers->{namespace} =~ $rule->{namespace})) {
|
||||
$fail = $rule->{fail};
|
||||
last;
|
||||
}
|
||||
}
|
||||
return unless $fail or $opt_verbose;
|
||||
|
||||
print STDERR "KABI: symbol $sym(mod:$symvers->{mod}";
|
||||
if ($use_namespaces && $symvers->{namespace}) {
|
||||
print STDERR " ns:$symvers->{namespace}";
|
||||
}
|
||||
print STDERR ") $message";
|
||||
if ($fail) {
|
||||
$kabi_errors++;
|
||||
print STDERR "\n";
|
||||
} else {
|
||||
print STDERR " (tolerated)\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub xopen {
|
||||
open($_[0], $_[1], @_[2..$#_]) or die "$_[2]: $!\n";
|
||||
}
|
||||
|
||||
my $res = GetOptions(
|
||||
'verbose|v' => \$opt_verbose,
|
||||
'rules|r=s' => \$opt_rules,
|
||||
);
|
||||
if (!$res || @ARGV != 2) {
|
||||
print STDERR "Usage: $0 [--rules <rules file>] Module.symvers.old Module.symvers\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Determine symvers format
|
||||
$use_namespaces = symvers_uses_namespaces($ARGV[0]);
|
||||
|
||||
if (defined($opt_rules)) {
|
||||
load_rules($opt_rules);
|
||||
}
|
||||
my %old = load_symvers($ARGV[0]);
|
||||
my %new = load_symvers($ARGV[1]);
|
||||
|
||||
for my $sym (sort keys(%old)) {
|
||||
if (!$new{$sym}) {
|
||||
kabi_change($sym, $old{$sym}, "lost");
|
||||
} elsif ($old{$sym}->{crc} ne $new{$sym}->{crc}) {
|
||||
kabi_change($sym, $old{$sym}, "changed crc from " .
|
||||
"$old{$sym}->{crc} to $new{$sym}->{crc}");
|
||||
} elsif (!type_compatible($old{$sym}->{type}, $new{$sym}->{type})) {
|
||||
kabi_change($sym, $old{$sym}, "changed type from " .
|
||||
"$old{$sym}->{type} to $new{$sym}->{type}");
|
||||
}
|
||||
}
|
||||
if ($kabi_errors) {
|
||||
print STDERR "KABI: aborting due to kabi changes.\n";
|
||||
exit 1;
|
||||
}
|
||||
exit 0;
|
||||
BIN
kabi.tar.bz2
(Stored with Git LFS)
Normal file
BIN
kabi.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
18
kernel-binary-conflicts
Normal file
18
kernel-binary-conflicts
Normal file
@@ -0,0 +1,18 @@
|
||||
# List of old packages not compatible with this kernel
|
||||
# The kernel cannot be installed without overriding the dependency
|
||||
# Listing the packages here means that OBS cannot see them and will start the
|
||||
# build and only fail at install check. On the other hand the message from
|
||||
# install check is much more intelligible than 'package has conflict' reported
|
||||
# by OBS.
|
||||
#
|
||||
# <package> <accepatable version>
|
||||
|
||||
# dead network if installed on SLES10, otherwise it will work (mostly)
|
||||
sysfsutils 2.0
|
||||
apparmor-profiles 2.1.0
|
||||
apparmor-parser 2.3
|
||||
# root-lvm only works with newer udevs
|
||||
udev 118
|
||||
lvm2 2.02.33
|
||||
# Interface to hv_kvp_daemon changed
|
||||
hyper-v 4
|
||||
40
kernel-cert-subpackage
Normal file
40
kernel-cert-subpackage
Normal file
@@ -0,0 +1,40 @@
|
||||
%package -n %{-n*}-ueficert
|
||||
Summary: UEFI Secure Boot Certificate For Package %{-n*}-kmp
|
||||
Group: System/Kernel
|
||||
Requires(pre): suse-kernel-rpm-scriptlets
|
||||
Requires(post): suse-kernel-rpm-scriptlets
|
||||
Requires: suse-kernel-rpm-scriptlets
|
||||
Requires(preun): suse-kernel-rpm-scriptlets
|
||||
Requires(postun): suse-kernel-rpm-scriptlets
|
||||
%description -n %{-n*}-ueficert
|
||||
This package contains the UEFI Secure Boot certificate used to sign
|
||||
modules in the %{-n*}-kmp packages.
|
||||
|
||||
%define run_if_exists run_if_exists() { \
|
||||
if [ -x "$1" ] ; then \
|
||||
"$@" \
|
||||
else \
|
||||
echo Cannot execute "$1" >&2 \
|
||||
fi \
|
||||
} \
|
||||
run_if_exists
|
||||
|
||||
%pre -n %{-n*}-ueficert
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-pre --certs "@CERTS@" "$@"
|
||||
|
||||
%post -n %{-n*}-ueficert
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-post --certs "@CERTS@" "$@"
|
||||
|
||||
%preun -n %{-n*}-ueficert
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-preun --certs "@CERTS@" "$@"
|
||||
|
||||
%postun -n %{-n*}-ueficert
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-postun --certs "@CERTS@" "$@"
|
||||
|
||||
%posttrans -n %{-n*}-ueficert
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-posttrans --certs "@CERTS@" "$@"
|
||||
|
||||
%files -n %{-n*}-ueficert
|
||||
%defattr(-, root, root)
|
||||
%dir /etc/uefi
|
||||
/etc/uefi/certs
|
||||
112
kernel-default-base.spec.txt
Normal file
112
kernel-default-base.spec.txt
Normal file
@@ -0,0 +1,112 @@
|
||||
#
|
||||
# Sample spec file using the subpackage infrastructure.
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
# needssslcertforbuild
|
||||
|
||||
# To be defined by user
|
||||
%define build_flavor default
|
||||
# variant includes dash: %%define variant -azure
|
||||
%define variant %{nil}
|
||||
%define subpackage base
|
||||
%define extrasummary base modules
|
||||
%define extradescription This package contains only the base modules, required in all installs.
|
||||
|
||||
%define misc_modules button edd iscsi_ibft i6300esb
|
||||
|
||||
%define virtio_modules virtio_blk virtio-rng virtio_console virtio-gpu \
|
||||
virtio_net virtio_scsi virtio virtio_balloon virtio_input virtio_mmio \
|
||||
virtio_pci virtio_ring
|
||||
|
||||
%define xen_modules xen-blkfront xen-kbdfront xen-netfront xen-fbfront xenblk xennet
|
||||
|
||||
%define vmware_modules vmw_balloon vmw_vmci vmxnet3 vmw_pvscsi vmw_vsock_vmci_transport
|
||||
|
||||
%define hyperv_modules hid-hyperv hv_balloon hv_utils \
|
||||
hv_vmbus hyperv-keyboard hv_netvsc hv_storvsc scsi_transport_fc hyperv_fb
|
||||
|
||||
%define net_drivers 8390 ne2k-pci tulip e100 e1000 e1000e 8139cp 8139too
|
||||
|
||||
%define scsi_modules scsi_transport_iscsi sd_mod sg sr_mod st scsi_mod
|
||||
|
||||
%define block_drivers loop dm-mod ahci ata_piix mptsas mptspi BusLogic sym53c8xx aam53c974
|
||||
|
||||
%define usb_modules usb-common usbcore ehci-hcd ehci-pci ohci-hcd ohci-pci uhci-hcd \
|
||||
xhci-hcd xhci-pci typec_ucsi ucsi_acpi typec ums-alauda ums-cypress ums-datafab \
|
||||
ums-eneub6250 ums-freecom ums-isd200 ums-jumpshot ums-karma ums-onetouch \
|
||||
ums-realtek ums-sddr09 ums-sddr55 ums-usbat usb-storage
|
||||
|
||||
%define filesystems autofs4 btrfs ext4 vfat isofs jbd2 mbcache nfsv2 nfsv3 nfsv4 overlay xfs \
|
||||
nls_cp437 nls_iso8859-1
|
||||
|
||||
%define networking tun veth bridge arp_tables arpt_mangle arptable_filter \
|
||||
ip_tables ipt_ECN ipt_MASQUERADE ipt_REJECT ipt_SYNPROXY ipt_ah ipt_rpfilter \
|
||||
iptable_filter iptable_mangle iptable_nat iptable_raw iptable_security \
|
||||
nf_conntrack_ipv4 nf_defrag_ipv4 nf_dup_ipv4 nf_log_arp nf_log_ipv4 nf_nat_h323 \
|
||||
nf_nat_ipv4 nf_nat_masquerade_ipv4 nf_nat_pptp nf_nat_proto_gre \
|
||||
nf_nat_snmp_basic ip6_tables ip6t_MASQUERADE ip6t_NPT ip6t_REJECT ip6t_SYNPROXY \
|
||||
ip6t_ah ip6t_eui64 ip6t_frag ip6t_hbh ip6t_ipv6header ip6t_mh ip6t_rpfilter \
|
||||
ip6t_rt ip6table_filter ip6table_mangle ip6table_nat ip6table_raw \
|
||||
ip6table_security nf_conntrack_ipv6 nf_defrag_ipv6 nf_dup_ipv6 nf_log_ipv6 \
|
||||
nf_nat_ipv6 nf_nat_masquerade_ipv6 ip_set ip_set_bitmap_ip ip_set_bitmap_ipmac \
|
||||
ip_set_bitmap_port ip_set_hash_ip ip_set_hash_ipmark ip_set_hash_ipport \
|
||||
ip_set_hash_ipportip ip_set_hash_ipportnet ip_set_hash_mac ip_set_hash_net \
|
||||
ip_set_hash_netiface ip_set_hash_netnet ip_set_hash_netport \
|
||||
ip_set_hash_netportnet ip_set_list_set nf_conntrack nf_conntrack_amanda \
|
||||
nf_conntrack_broadcast nf_conntrack_ftp nf_conntrack_h323 nf_conntrack_irc \
|
||||
nf_conntrack_netbios_ns nf_conntrack_netlink nf_conntrack_pptp \
|
||||
nf_conntrack_proto_gre nf_conntrack_sane nf_conntrack_sip nf_conntrack_slp \
|
||||
nf_conntrack_snmp nf_conntrack_tftp nf_log_common nf_nat nf_nat_amanda \
|
||||
nf_nat_ftp nf_nat_irc nf_nat_redirect nf_nat_sip nf_nat_tftp nf_synproxy_core \
|
||||
nfnetlink nfnetlink_acct nfnetlink_cthelper nfnetlink_cttimeout nfnetlink_log \
|
||||
nfnetlink_queue x_tables xt_AUDIT xt_CHECKSUM xt_CLASSIFY xt_CONNSECMARK xt_CT \
|
||||
xt_DSCP xt_HL xt_HMARK xt_IDLETIMER xt_LED xt_LOG xt_NETMAP xt_NFLOG xt_NFQUEUE \
|
||||
xt_RATEEST xt_REDIRECT xt_SECMARK xt_TCPMSS xt_TCPOPTSTRIP xt_TEE xt_TPROXY \
|
||||
xt_TRACE xt_addrtype xt_bpf xt_cgroup xt_cluster xt_comment xt_connbytes \
|
||||
xt_connlabel xt_connlimit xt_connmark xt_conntrack xt_cpu xt_dccp xt_devgroup \
|
||||
xt_dscp xt_ecn xt_esp xt_hashlimit xt_helper xt_hl xt_ipcomp xt_iprange xt_l2tp \
|
||||
xt_length xt_limit xt_mac xt_mark xt_multiport xt_nat xt_nfacct xt_osf xt_owner \
|
||||
xt_physdev xt_pkttype xt_policy xt_quota xt_rateest xt_realm xt_recent xt_sctp \
|
||||
xt_set xt_socket xt_state xt_statistic xt_string xt_tcpmss xt_tcpudp xt_time \
|
||||
xt_u32 af_packet
|
||||
|
||||
%define modules %usb_modules %net_drivers %scsi_modules %block_drivers \
|
||||
%hyperv_modules %virtio_modules %vmware_modules %xen_modules \
|
||||
%networking %filesystems %misc_modules
|
||||
|
||||
# Reasonable defaults that might be overriden if needed
|
||||
%define kernel_package_name kernel-%build_flavor
|
||||
%define package_name %kernel_package_name-%subpackage
|
||||
%define url %(rpm -q --qf '%%{URL}' %kernel_package_name)
|
||||
%define group %(rpm -q --qf '%%{GROUP}' %kernel_package_name)
|
||||
%define summary %(rpm -q --qf '%%{SUMMARY}' %kernel_package_name) - %extrasummary
|
||||
|
||||
Name: %package_name
|
||||
BuildRequires: %kernel_package_name
|
||||
BuildRequires: %kernel_package_name-devel
|
||||
BuildRequires: kernel-subpackage-macros
|
||||
Summary: %summary
|
||||
URL: %url
|
||||
Group: %group
|
||||
License: GPL-2.0-only
|
||||
|
||||
# Internal stuff begins
|
||||
%define rpm_kver %(rpm -q --qf '%%{VERSION}' %kernel_package_name)
|
||||
%define rpm_krel %(rpm -q --qf '%%{RELEASE}' %kernel_package_name)
|
||||
Version: %rpm_kver
|
||||
Release: %rpm_krel.<RELEASE>
|
||||
|
||||
%define scriptdir /usr/lib/rpm/kernel
|
||||
%include %scriptdir/kernel-subpackage-spec
|
||||
210867
kernel-longterm.changes
Normal file
210867
kernel-longterm.changes
Normal file
File diff suppressed because it is too large
Load Diff
2012
kernel-longterm.spec
Normal file
2012
kernel-longterm.spec
Normal file
File diff suppressed because it is too large
Load Diff
100
kernel-module-subpackage
Normal file
100
kernel-module-subpackage
Normal file
@@ -0,0 +1,100 @@
|
||||
%package -n %{-n*}-kmp-%1
|
||||
%define _this_kmp_kernel_version k%(echo %2 | sed -r 'y/-/_/')
|
||||
%define _this_kmp_version %{-v*}_%_this_kmp_kernel_version
|
||||
Version: %_this_kmp_version
|
||||
Release: %{-r*}
|
||||
%(
|
||||
for spec in {%_sourcedir,%_specdir}/%name.spec /dev/null; do
|
||||
[ -e $spec ] && break
|
||||
done
|
||||
awk '
|
||||
BEGIN { tags["summary"] = "Summary: %summary"
|
||||
tags["group"] = "" }
|
||||
/^%%/ { in_pkg_header = \
|
||||
($0 ~ /^%%package[ \t]+KMP[ \t]*$/ ||
|
||||
$0 ~ /^%%package[ \t]+-n[ \t]*%name-KMP[ \t]*$/)
|
||||
next }
|
||||
in_pkg_header && /^(Summary|Group):[ \t]*/ \
|
||||
{ tag = tolower($1) ; sub(/:$/, "", tag)
|
||||
tags[tag] = $0 }
|
||||
END { print tags["summary"]
|
||||
if ( tags["group"] != "" ) print tags["group"] }
|
||||
' $spec
|
||||
)
|
||||
Provides: %{-n*}-kmp = %_this_kmp_version
|
||||
Provides: %{-n*}-kmp = %{-v*}
|
||||
Provides: multiversion(kernel)
|
||||
Provides: %{-n*}-kmp-%1-%_this_kmp_kernel_version
|
||||
Requires: coreutils grep
|
||||
Requires(pre): suse-kernel-rpm-scriptlets
|
||||
Requires(post): suse-kernel-rpm-scriptlets
|
||||
Requires: suse-kernel-rpm-scriptlets
|
||||
Requires(preun): suse-kernel-rpm-scriptlets
|
||||
Requires(postun): suse-kernel-rpm-scriptlets
|
||||
%{-c:Requires: %{-n*}-ueficert}
|
||||
Enhances: kernel-%1
|
||||
Supplements: packageand(kernel-%1:%{-n*})
|
||||
Conflicts: %{-n*}-kmp-%1-%_this_kmp_kernel_version
|
||||
AutoReqProv: on
|
||||
|
||||
%define run_if_exists run_if_exists() { \
|
||||
if [ -x "$1" ] ; then \
|
||||
"$@" \
|
||||
else \
|
||||
echo Cannot execute "$1" >&2 \
|
||||
fi \
|
||||
} \
|
||||
run_if_exists
|
||||
|
||||
%{-p:%{expand:%(cd %_sourcedir; cat %{-p*})}}
|
||||
%description -n %{-n*}-kmp-%1
|
||||
%(
|
||||
for spec in {%_sourcedir,%_specdir}/%name.spec /dev/null; do
|
||||
[ -e $spec ] && break
|
||||
done
|
||||
awk '
|
||||
/^%%/ { in_desc = \
|
||||
($0 ~ /^%%description[ \t]+KMP[ \t]*$/ ||
|
||||
$0 ~ /^%%description[ \t]+-n[ \t]*%name-KMP[ \t]*$/)
|
||||
next }
|
||||
in_desc { print; good = 1 }
|
||||
END { exit(! good) }
|
||||
' $spec || \
|
||||
awk '
|
||||
/^%%/ { in_desc = \
|
||||
($0 ~ /^%%description[ \t]*$/ ||
|
||||
$0 ~ /^%%description[ \t]+-n[ \t]*%name[ \t]*$/)
|
||||
next }
|
||||
in_desc { print; good = 1 }
|
||||
END { exit(! good) }
|
||||
' $spec
|
||||
)
|
||||
%pre -n %{-n*}-kmp-%1
|
||||
%{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-pre --name "%{-n*}-kmp-%1" \
|
||||
--version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
|
||||
--flavor "%1" --usrmerged "%{usrmerged}" "$@"
|
||||
%post -n %{-n*}-kmp-%1
|
||||
%{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-post --name "%{-n*}-kmp-%1" \
|
||||
--version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
|
||||
--flavor "%1" --usrmerged "%{usrmerged}" "$@"
|
||||
%preun -n %{-n*}-kmp-%1
|
||||
%{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-preun --name "%{-n*}-kmp-%1" \
|
||||
--version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
|
||||
--flavor "%1" --usrmerged "%{usrmerged}" "$@"
|
||||
%postun -n %{-n*}-kmp-%1
|
||||
%{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-postun --name "%{-n*}-kmp-%1" \
|
||||
--version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
|
||||
--flavor "%1" --usrmerged "%{usrmerged}" "$@"
|
||||
%posttrans -n %{-n*}-kmp-%1
|
||||
%{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
|
||||
%run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-posttrans --name "%{-n*}-kmp-%1" \
|
||||
--version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
|
||||
--flavor "%1" --usrmerged "%{usrmerged}" "$@"
|
||||
%files -n %{-n*}-kmp-%1
|
||||
%{-f:%{expand:%(cd %_sourcedir; cat %{-f*})}}
|
||||
%{!-f:%defattr (-,root,root)}
|
||||
%{!-f:%{kernel_module_directory}/%2-%1}
|
||||
210867
kernel-source-longterm.changes
Normal file
210867
kernel-source-longterm.changes
Normal file
File diff suppressed because it is too large
Load Diff
318
kernel-source-longterm.spec
Normal file
318
kernel-source-longterm.spec
Normal file
@@ -0,0 +1,318 @@
|
||||
#
|
||||
# spec file for package kernel-source-longterm
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define srcversion 6.12
|
||||
%define patchversion 6.12.55
|
||||
%define git_commit c2ab50c5267e169ed8fd925a85a73c81da717c2e
|
||||
%define variant -longterm%{nil}
|
||||
%define gcc_package gcc
|
||||
%define gcc_compiler gcc
|
||||
|
||||
%include %_sourcedir/kernel-spec-macros
|
||||
|
||||
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,arch-symbols,check-module-license,splitflist,mergedep,moddep,modflist,kernel-subpackage-build})
|
||||
|
||||
Name: kernel-source-longterm
|
||||
Version: 6.12.55
|
||||
%if 0%{?is_kotd}
|
||||
Release: <RELEASE>.gc2ab50c
|
||||
%else
|
||||
Release: 0
|
||||
%endif
|
||||
Summary: The Linux Kernel Sources
|
||||
License: GPL-2.0-only
|
||||
Group: Development/Sources
|
||||
URL: https://www.kernel.org/
|
||||
AutoReqProv: off
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
|
||||
BuildRequires: bash-sh
|
||||
%endif
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python3-base
|
||||
BuildRequires: sed
|
||||
BuildArch: noarch
|
||||
Prefix: /usr/src
|
||||
|
||||
%define src_install_dir usr/src/linux-%kernelrelease%variant
|
||||
|
||||
# if undefined use legacy location of before SLE15
|
||||
%if %{undefined _rpmmacrodir}
|
||||
%define _rpmmacrodir /etc/rpm
|
||||
%endif
|
||||
|
||||
Source0: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%srcversion.tar.xz
|
||||
%if "https://www.kernel.org/pub/linux/kernel/v6.x/" != ""
|
||||
Source1: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%srcversion.tar.sign
|
||||
Source2: linux.keyring
|
||||
%endif
|
||||
Source3: kernel-source.rpmlintrc
|
||||
Source14: series.conf
|
||||
Source16: guards
|
||||
Source17: apply-patches
|
||||
Source19: kernel-binary-conflicts
|
||||
Source20: obsolete-kmps
|
||||
Source21: config.conf
|
||||
Source23: supported.conf
|
||||
Source33: check-for-config-changes
|
||||
Source35: group-source-files.pl
|
||||
Source36: README.PATCH-POLICY.SUSE
|
||||
Source37: README.SUSE
|
||||
Source38: README.KSYMS
|
||||
Source40: source-timestamp
|
||||
Source46: split-modules
|
||||
Source47: modversions
|
||||
Source48: macros.kernel-source
|
||||
Source49: kernel-module-subpackage
|
||||
Source50: kabi.pl
|
||||
Source52: kernel-source%variant.changes
|
||||
Source57: kernel-cert-subpackage
|
||||
Source60: config.sh
|
||||
Source63: arch-symbols
|
||||
Source65: kernel-spec-macros
|
||||
Source75: release-projects
|
||||
Source76: check-module-license
|
||||
Source78: modules.fips
|
||||
Source79: splitflist
|
||||
Source80: mergedep
|
||||
Source81: moddep
|
||||
Source82: modflist
|
||||
Source83: kernel-subpackage-build
|
||||
Source84: kernel-subpackage-spec
|
||||
Source85: kernel-default-base.spec.txt
|
||||
Source86: old_changelog.txt
|
||||
Source100: config.tar.bz2
|
||||
Source101: config.addon.tar.bz2
|
||||
Source102: patches.arch.tar.bz2
|
||||
Source103: patches.drivers.tar.bz2
|
||||
Source104: patches.fixes.tar.bz2
|
||||
Source105: patches.rpmify.tar.bz2
|
||||
Source106: patches.suse.tar.bz2
|
||||
Source108: patches.addon.tar.bz2
|
||||
Source109: patches.kernel.org.tar.bz2
|
||||
Source110: patches.apparmor.tar.bz2
|
||||
Source111: patches.rt.tar.bz2
|
||||
Source113: patches.kabi.tar.bz2
|
||||
Source114: patches.drm.tar.bz2
|
||||
Source120: kabi.tar.bz2
|
||||
Source121: sysctl.tar.bz2
|
||||
Requires(post): coreutils sed
|
||||
# Source is only complete with devel files.
|
||||
Requires: kernel-devel%variant = %version-%source_rel
|
||||
Provides: %name = %version-%source_rel
|
||||
Provides: %name-srchash-%git_commit
|
||||
Provides: linux
|
||||
Provides: multiversion(kernel)
|
||||
# extra packages needed for building a kernel from scratch
|
||||
Recommends: bc
|
||||
Recommends: bison
|
||||
Recommends: flex
|
||||
Recommends: libelf-devel
|
||||
Recommends: openssl-devel
|
||||
# pahole needed for BTF
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
|
||||
Recommends: dwarves >= 1.22
|
||||
%endif
|
||||
# dracut no longer carries installkernel
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
|
||||
Recommends: kernel-install-tools
|
||||
%endif
|
||||
Recommends: %gcc_package
|
||||
%obsolete_rebuilds %name
|
||||
|
||||
# Force bzip2 instead of lzma compression to
|
||||
# 1) allow install on older dist versions, and
|
||||
# 2) decrease build times (bsc#962356 boo#1175882)
|
||||
%define _binary_payload w9.bzdio
|
||||
|
||||
%define symbols %(set -- $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*)
|
||||
|
||||
%define do_vanilla "%variant" == ""
|
||||
|
||||
%description
|
||||
Linux kernel sources with many fixes and improvements.
|
||||
|
||||
|
||||
%source_timestamp
|
||||
|
||||
%post
|
||||
%relink_function
|
||||
|
||||
relink linux-%kernelrelease%variant /usr/src/linux%variant
|
||||
|
||||
%files -f nondevel.files
|
||||
|
||||
%package -n kernel-devel%variant
|
||||
Summary: Development files needed for building kernel modules
|
||||
Group: Development/Sources
|
||||
AutoReqProv: off
|
||||
Provides: kernel-devel%variant = %version-%source_rel
|
||||
Provides: multiversion(kernel)
|
||||
Requires: kernel-macros
|
||||
Requires(post): coreutils
|
||||
%obsolete_rebuilds kernel-devel%variant
|
||||
|
||||
%description -n kernel-devel%variant
|
||||
Kernel-level headers and Makefiles required for development of
|
||||
external kernel modules.
|
||||
|
||||
|
||||
%source_timestamp
|
||||
|
||||
%post -n kernel-devel%variant
|
||||
%relink_function
|
||||
|
||||
relink linux-%kernelrelease%variant /usr/src/linux%variant
|
||||
|
||||
%files -n kernel-devel%variant -f devel.files
|
||||
%ghost /usr/src/linux%variant
|
||||
%doc /usr/share/doc/packages/*
|
||||
|
||||
# Note: The kernel-macros package intentionally does not provide
|
||||
# multiversion(kernel) nor is its name decorated with the variant (-rt)
|
||||
%package -n kernel-macros
|
||||
Summary: RPM macros for building Kernel Module Packages
|
||||
Group: Development/Sources
|
||||
Provides: kernel-subpackage-macros
|
||||
|
||||
%description -n kernel-macros
|
||||
This package provides the rpm macros and templates for Kernel Module Packages
|
||||
|
||||
|
||||
%source_timestamp
|
||||
|
||||
%if "%variant" == ""
|
||||
%files -n kernel-macros
|
||||
%{_rpmmacrodir}/macros.kernel-source
|
||||
/usr/lib/rpm/kernel-*-subpackage
|
||||
%dir /usr/lib/rpm/kernel
|
||||
/usr/lib/rpm/kernel/*
|
||||
%endif
|
||||
|
||||
%package vanilla
|
||||
%obsolete_rebuilds %name-vanilla
|
||||
Summary: Vanilla Linux kernel sources with minor build fixes
|
||||
Group: Development/Sources
|
||||
AutoReqProv: off
|
||||
Provides: %name-vanilla = %version-%source_rel
|
||||
Provides: multiversion(kernel)
|
||||
Requires: kernel-macros
|
||||
# dracut no longer carries installkernel
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
|
||||
Recommends: kernel-install-tools
|
||||
%endif
|
||||
|
||||
%description vanilla
|
||||
Vanilla Linux kernel sources with minor build fixes.
|
||||
|
||||
|
||||
%source_timestamp
|
||||
|
||||
%if %do_vanilla
|
||||
%files vanilla
|
||||
/usr/src/linux-%kernelrelease-vanilla
|
||||
%endif
|
||||
|
||||
%prep
|
||||
|
||||
echo "Symbol(s): %symbols"
|
||||
|
||||
# Unpack all sources and patches
|
||||
%setup -q -c -T -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 108 -a 109 -a 110 -a 111 -a 113 -a 114 -a 120 -a 121
|
||||
|
||||
%build
|
||||
%install
|
||||
mkdir -p %{buildroot}/usr/src
|
||||
pushd %{buildroot}/usr/src
|
||||
|
||||
# Unpack the vanilla kernel sources
|
||||
tar -xf %{S:0}
|
||||
find . -xtype l -delete -printf "deleted '%f'\n"
|
||||
if test "%srcversion" != "%kernelrelease%variant"; then
|
||||
mv linux-%srcversion linux-%kernelrelease%variant
|
||||
fi
|
||||
|
||||
%if %do_vanilla
|
||||
cp -al \
|
||||
linux-%kernelrelease%variant linux-%kernelrelease-vanilla
|
||||
cd linux-%kernelrelease-vanilla
|
||||
%_sourcedir/apply-patches --vanilla %_sourcedir/series.conf %my_builddir %symbols
|
||||
sed -i -e 's/\$(CROSS_COMPILE)gcc/\$(CROSS_COMPILE)%gcc_compiler/g' Makefile
|
||||
grep '\$(CROSS_COMPILE)%gcc_compiler' Makefile
|
||||
rm -f $(find . -name ".gitignore")
|
||||
# Hardlink duplicate files automatically (from package fdupes).
|
||||
%fdupes $PWD
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
cd linux-%kernelrelease%variant
|
||||
%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
|
||||
sed -i -e 's/\$(CROSS_COMPILE)gcc/\$(CROSS_COMPILE)%gcc_compiler/g' Makefile
|
||||
grep '\$(CROSS_COMPILE)%gcc_compiler' Makefile
|
||||
rm -f $(find . -name ".gitignore")
|
||||
|
||||
if [ -f %_sourcedir/localversion ] ; then
|
||||
cat %_sourcedir/localversion > localversion
|
||||
fi
|
||||
# Hardlink duplicate files automatically (from package fdupes).
|
||||
%fdupes $PWD
|
||||
cd ..
|
||||
popd
|
||||
|
||||
# Install the documentation and example Kernel Module Package.
|
||||
DOC=/usr/share/doc/packages/%name-%kernelrelease
|
||||
mkdir -p %buildroot/$DOC
|
||||
cp %_sourcedir/README.SUSE %buildroot/$DOC
|
||||
ln -s $DOC/README.SUSE %buildroot/%src_install_dir/
|
||||
|
||||
%if "%variant" == ""
|
||||
install -m 755 -d %{buildroot}%{_rpmmacrodir}
|
||||
install -m 644 %_sourcedir/macros.kernel-source %{buildroot}%{_rpmmacrodir}
|
||||
echo "%%kernel_module_directory %{kernel_module_directory}" >> %{buildroot}%{_rpmmacrodir}/macros.kernel-source
|
||||
|
||||
install -m 755 -d %{buildroot}/usr/lib/rpm
|
||||
install -m 644 %_sourcedir/kernel-{module,cert}-subpackage \
|
||||
%{buildroot}/usr/lib/rpm/
|
||||
install -m 755 -d %{buildroot}/usr/lib/rpm/kernel
|
||||
install -m 755 %_sourcedir/{splitflist,mergedep,moddep,modflist,kernel-subpackage-build} %{buildroot}/usr/lib/rpm/kernel
|
||||
install -m 644 %_sourcedir/kernel-subpackage-spec %{buildroot}/usr/lib/rpm/kernel
|
||||
install -m 644 %_sourcedir/kernel-spec-macros %{buildroot}/usr/lib/rpm/kernel
|
||||
install -m 644 -T %_sourcedir/kernel-default-base.spec.txt %{buildroot}/usr/lib/rpm/kernel/kernel-default-base.spec
|
||||
%endif
|
||||
|
||||
pushd "%buildroot"
|
||||
perl "%_sourcedir/group-source-files.pl" \
|
||||
-D "$OLDPWD/devel.files" -N "$OLDPWD/nondevel.files" \
|
||||
-L "%src_install_dir"
|
||||
popd
|
||||
|
||||
find %{buildroot}/usr/src/linux* -type f -name '*.[ch]' -perm /0111 -exec chmod -v a-x {} +
|
||||
# OBS checks don't like /usr/bin/env in script interpreter lines
|
||||
grep -Elr '^#! */(usr/)?bin/env ' %{buildroot}/usr/src/linux* | while read f; do
|
||||
sed -re '1 { s_^#! */usr/bin/env +/_#!/_ ; s_^#! */usr/bin/env +([^/])_#!/usr/bin/\1_ }' \
|
||||
-e '1 { s_^#! */bin/env +/_#!/_ ; s_^#! */bin/env +([^/])_#!/usr/bin/\1_ }' -i "$f"
|
||||
done
|
||||
# kernel-source and kernel-$flavor-devel are built independently, but the
|
||||
# shipped sources (/usr/src/linux/) need to be older than generated files
|
||||
# (/usr/src/linux-obj). We rely on the git commit timestamp to not point into
|
||||
# the future and be thus lower than the timestamps of files built from the
|
||||
# source (bnc#669669).
|
||||
ts="$(head -n1 %_sourcedir/source-timestamp)"
|
||||
find %buildroot/usr/src/linux* ! -type l -print0 | xargs -0 touch -d "$ts"
|
||||
|
||||
%changelog
|
||||
14
kernel-source.rpmlintrc
Normal file
14
kernel-source.rpmlintrc
Normal file
@@ -0,0 +1,14 @@
|
||||
# These zero-length files are correct:
|
||||
addFilter("zero-length /usr/src/linux-.*-obj/.*/include/config.*h")
|
||||
addFilter("zero-length /usr/src/linux-.*-obj/.*/include/config/.*")
|
||||
# vdsos are special
|
||||
addFilter("shared-lib-without-dependency-information .*/lib/modules/[1-9].*/vdso/.*")
|
||||
addFilter("missing-PT_GNU_STACK-section .*/lib/modules/[1-9].*/vdso/.*")
|
||||
# This is a stale symlink until the kernel-source package is installed:
|
||||
addFilter("dangling-symlink .*/lib/modules/[1-9].*/source")
|
||||
# These hidden files are fine:
|
||||
addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.config")
|
||||
addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.kernel-binary.spec.buildenv")
|
||||
addFilter("hidden-file-or-dir /boot/\..*\.hmac")
|
||||
# a precompiled eBPF test
|
||||
addFilter("arch-independent-package-contains-binary-or-object /usr/src/linux-.*/.*/action-ebpf")
|
||||
87
kernel-spec-macros
Normal file
87
kernel-spec-macros
Normal file
@@ -0,0 +1,87 @@
|
||||
# This file is included by all the kernel-*.spec files
|
||||
|
||||
# Build with bash instead of sh as the shell: this turns on bash
|
||||
# extensions like <(...).
|
||||
%define _buildshell /bin/bash
|
||||
|
||||
%define using_buildservice 0%{?opensuse_bs}
|
||||
|
||||
%if ! 0%{?using_buildservice}
|
||||
%define using_buildservice 0%(echo %disturl | grep -q '^obs://build\.[^.]*suse\.' && echo 1)
|
||||
%endif
|
||||
|
||||
# TW is usrmerged
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%define usrmerged 1
|
||||
%else
|
||||
%define usrmerged 0
|
||||
%endif
|
||||
|
||||
# source_rel is the package release string, without the rebuild counter
|
||||
# generated by the build service. If the release string has a non-digit
|
||||
# suffix, we keep that suffix and strip the rightmost digit component.
|
||||
# This is used in KOTD builds: 2.1.g1234567 -> 2.g1234567
|
||||
# In PTF projects, there is no rebuild counter, so we leave the release
|
||||
# string intact.
|
||||
%define source_rel %release
|
||||
%define obsolete_rebuilds() %nil
|
||||
%define obsolete_rebuilds_subpackage() %nil
|
||||
%if %using_buildservice && ! 0%{?is_ptf}
|
||||
%define source_rel %(echo %release | sed -r 's/\\.[0-9]+($|\\.[^.]*[^.0-9][^.]*$)/\\1/')
|
||||
# If the rebuild counter is > 1, obsolete all previous rebuilds (boo#867595)
|
||||
%define obsolete_rebuilds() %( \
|
||||
set -- $(echo %release | sed -rn 's/(.*\\.)([0-9]+)($|\\.[^.]*[^.0-9][^.]*$)/\\1 \\2 \\3/p') \
|
||||
if test -n "$2" && test "$2" -gt 99; then echo "warning: Rebuild counter too high in %release" >&2; exit 0; fi \
|
||||
for i in $(seq 1 $(($2-1))) ; do echo "Obsoletes: %1 = %version-$1$i$3" ; done \
|
||||
)
|
||||
%define obsolete_rebuilds_subpackage() %( \
|
||||
set -- $(echo %release | sed -rn 's/(.*\\.)([0-9]+)($|\\.[^.]*[^.0-9][^.]*$)/\\1 \\2 \\3/p') \
|
||||
if test -n "$2" && test "$2" -gt 99; then echo "warning: Rebuild counter too high in %release" >&2; exit 0; fi \
|
||||
cnt=$2
|
||||
set -- $(echo %source_rel | sed -rn 's/(.*\\.)([0-9]+)($|\\.[^.]*[^.0-9][^.]*$)/\\1 \\2 \\3/p') \
|
||||
if test -n "$2" && test "$2" -gt 99; then echo "warning: Upload counter too high in %source_rel" >&2; exit 0; fi \
|
||||
for i in $(seq 1 $2) ; do for j in $(seq 1 $cnt) ; do [ $i = $2 ] && [ $j = $cnt ] && break \
|
||||
echo "Obsoletes: %1 = %version-$1$i.$j$3" \
|
||||
done ; done \
|
||||
)
|
||||
%endif
|
||||
|
||||
# how the kernel release string (uname -r) should look like
|
||||
%define kernelrelease %patchversion-%source_rel
|
||||
|
||||
# Compare the kernel version to the given argument, return value semantics
|
||||
# same as strcmp(3). Example: %%if %%{kver_cmp 4.8} > 0 ... %%endif
|
||||
%define kver_cmp() %{lua: print(rpm.vercmp(rpm.expand("%patchversion"), rpm.expand("%1")))}
|
||||
|
||||
%define my_builddir %_builddir/%{name}-%{version}
|
||||
|
||||
# macro to add the source timestamp to package descriptions
|
||||
%define source_timestamp %(sed '1s/^/Source Timestamp: /' %_sourcedir/source-timestamp || :)
|
||||
|
||||
# function used in developent package scriptlets
|
||||
%define relink_function relink() { \
|
||||
if [ -h "$2" ]; then \
|
||||
local old=$(readlink "$2") \
|
||||
[ "$old" = "$1" ] && return 0 \
|
||||
echo "Changing symlink $2 from $old to $1" \
|
||||
elif [ -e "$2" ]; then \
|
||||
echo "Replacing file $2 with symlink to $1" \
|
||||
fi \
|
||||
rm -f "$2" && ln -s "$1" "$2" \
|
||||
}
|
||||
|
||||
%if %{usrmerged}
|
||||
%define kernel_module_directory /usr/lib/modules
|
||||
%else
|
||||
%define kernel_module_directory /lib/modules
|
||||
%endif
|
||||
|
||||
# Very basic macro for conditional execution.
|
||||
%define run_if_exists run_if_exists() { \
|
||||
if [ -x "$1" ] ; then \
|
||||
"$@" \
|
||||
else \
|
||||
echo Cannot execute "$1" >&2 \
|
||||
fi \
|
||||
} \
|
||||
run_if_exists
|
||||
76
kernel-subpackage-build
Normal file
76
kernel-subpackage-build
Normal file
@@ -0,0 +1,76 @@
|
||||
#!/bin/bash -xe
|
||||
# %scriptdir/kernel-subpackage-build %kernel_package_name %rpm_kver-%rpm_krel %package_name-%version-%release
|
||||
|
||||
scriptdir=$(dirname $0)
|
||||
kernel_package_name=$1
|
||||
kernel_nvrq=$(echo $1-$2 | sed -e 's/[.]/[.]/g')
|
||||
package_nvr=$3
|
||||
|
||||
|
||||
set -o pipefail
|
||||
install -d -m 0755 $RPM_BUILD_ROOT/boot
|
||||
|
||||
$scriptdir/splitflist $kernel_package_name kernel.flist kernel-ghost.flist
|
||||
echo Ghost files:
|
||||
cat kernel-ghost.flist
|
||||
|
||||
rpm -q --qf '%{PREIN}' $kernel_package_name | sed -e "s/$kernel_nvrq/$package_nvr/g" > prein.sh
|
||||
rpm -q --qf '%{POSTIN}' $kernel_package_name | sed -e "s/$kernel_nvrq/$package_nvr/g" > postin.sh
|
||||
rpm -q --qf '%{PREUN}' $kernel_package_name | sed -e "s/$kernel_nvrq/$package_nvr/g" > preun.sh
|
||||
rpm -q --qf '%{POSTUN}' $kernel_package_name | sed -e "s/$kernel_nvrq/$package_nvr/g" > postun.sh
|
||||
rpm -q --qf '%{POSTTRANS}' $kernel_package_name | sed -e "s/$kernel_nvrq/$package_nvr/g" > posttrans.sh
|
||||
|
||||
[ -z "$(rpm -q --triggers $kernel_package_name)" ] # not handled
|
||||
|
||||
KREL=$(sed -rne '/^(\/usr)?\/lib\/modules\/([^/]+)$/{s,.*/,,;p;q}' < kernel.flist)
|
||||
grep -q /usr/lib/modules/ kernel.flist && USR=/usr
|
||||
|
||||
$scriptdir/mergedep $KREL > modules.dep
|
||||
|
||||
|
||||
$scriptdir/moddep modules.dep request-modules modules
|
||||
|
||||
$scriptdir/modflist kernel.flist modules modules.flist /lib/modules/$KREL/modules.builtin
|
||||
grep -v "^$USR/lib/modules/$KREL\\(\$\\|/kernel\\)" < kernel.flist >> modules.flist || :
|
||||
|
||||
tar -C / -cf- -T modules.flist | tar -C $RPM_BUILD_ROOT -xvf-
|
||||
|
||||
[ -z "$USR" ] || ln -s usr/lib $RPM_BUILD_ROOT/lib
|
||||
moderr="$(/usr/sbin/depmod -b $RPM_BUILD_ROOT -e -F /boot/System.map-$KREL $KREL 2>&1 > /dev/null)"
|
||||
[ -z "$USR" ] || rm $RPM_BUILD_ROOT/lib
|
||||
|
||||
if [ "$moderr" ] ; then
|
||||
echo Picked modules have errors:
|
||||
echo $moderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "%defattr(-,root,root)" > subpackage.flist
|
||||
echo "%dir $USR/lib/modules/$KREL" >> subpackage.flist
|
||||
grep -v "^$USR/lib/modules/$KREL\\(\$\\|/kernel\\)" < kernel.flist >> subpackage.flist || :
|
||||
echo $USR/lib/modules/$KREL/kernel >> subpackage.flist
|
||||
while read name rest; do
|
||||
echo "%ghost $name"
|
||||
done < kernel-ghost.flist >> subpackage.flist
|
||||
|
||||
# recreate ghost files in build root
|
||||
while read name mode size mtime link; do
|
||||
t=$(( mode&0170000 ))
|
||||
p="${mode:0-4:4}"
|
||||
(( p != 0 )) || p=''
|
||||
if (( t == 0100000 )); then
|
||||
install -D -m "${p:-0644}" /dev/null "$RPM_BUILD_ROOT$name"
|
||||
if [ -f "$RPM_BUILD_ROOT$name".xz ] ; then xzcat "$RPM_BUILD_ROOT$name".xz > "$RPM_BUILD_ROOT$name"
|
||||
elif [ -f "$RPM_BUILD_ROOT$name".gz ] ; then zcat "$RPM_BUILD_ROOT$name".gz > "$RPM_BUILD_ROOT$name"
|
||||
elif [ -f "$RPM_BUILD_ROOT$name".zst ] ; then zstdcat "$RPM_BUILD_ROOT$name".zst > "$RPM_BUILD_ROOT$name"
|
||||
else dd if=/dev/null bs=1 count=0 status=none seek="$size" of="$RPM_BUILD_ROOT$name"
|
||||
fi
|
||||
touch -h --date="@$mtime" "$RPM_BUILD_ROOT$name"
|
||||
elif (( t == 0040000 )); then
|
||||
install -d -m "${p:-0755}" "$RPM_BUILD_ROOT$name"
|
||||
touch -h -date="@$mtime" "$RPM_BUILD_ROOT$name"
|
||||
elif (( t == 0120000 )); then
|
||||
ln -s "$link" "$RPM_BUILD_ROOT$name"
|
||||
touch -h --date="@$mtime" "$RPM_BUILD_ROOT$name"
|
||||
fi
|
||||
done < kernel-ghost.flist
|
||||
114
kernel-subpackage-spec
Normal file
114
kernel-subpackage-spec
Normal file
@@ -0,0 +1,114 @@
|
||||
%define rpm_kver %(rpm -q --qf '%%{VERSION}' %kernel_package_name)
|
||||
%define rpm_krel %(rpm -q --qf '%%{RELEASE}' %kernel_package_name)
|
||||
|
||||
%include /usr/lib/rpm/kernel/kernel-spec-macros
|
||||
|
||||
# Force bzip2 instead of lzma compression to
|
||||
# 1) allow install on older dist versions, and
|
||||
# 2) decrease build times (bsc#962356)
|
||||
# %%define _binary_payload w9.bzdio
|
||||
# Do not recompute the build-id of vmlinux in find-debuginfo.sh (bsc#964063)
|
||||
%undefine _unique_build_ids
|
||||
%define _no_recompute_build_ids 1
|
||||
# prevent usr/lib/debug/boot/vmlinux-4.12.14-11.10-default-4.12.14-11.10.ppc64le.debug
|
||||
%undefine _unique_debug_names
|
||||
|
||||
%define kernel_requires %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'manual,' | sed -e 's/.*,//' | tr '\\n' ' ')
|
||||
%define kernel_requires_pre %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'pre,' | sed -e 's/.*,//' | tr '\\n' ' ')
|
||||
%define kernel_requires_preun %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'preun,' | sed -e 's/.*,//' | tr '\\n' ' ')
|
||||
%define kernel_requires_post %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'post,' | sed -e 's/.*,//' | tr '\\n' ' ')
|
||||
%define kernel_requires_postun %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'postun,' | sed -e 's/.*,//' | tr '\\n' ' ')
|
||||
%define kernel_base_provides %(rpm -q --queryformat '[%%{PROVIDENEVRS}\\n]' %kernel_package_name | sed -E 's/^%kernel_package_name(-srchash| =)/%name\\1/g' | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\\n' ' )')
|
||||
%define kernel_base_obsoletes %(rpm -q --queryformat '[%%{OBSOLETENEVRS}\\n]' %kernel_package_name | sed -E 's/^%kernel_package_name(-srchash| =)/%name\\1/g' | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\\n' ' )')
|
||||
%define kernel_base_conflicts %(rpm -q --queryformat '[%%{CONFLICTNEVRS}\\n]' %kernel_package_name | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\\n' ' )')
|
||||
%define kernel_base_recommends %(rpm -q --queryformat '[%%{RECOMMENDNEVRS}\\n]' %kernel_package_name | grep -v '^kernel-firmware' | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\\n' ' )')
|
||||
|
||||
%if ! %(expr 1 - 1)
|
||||
%if "%{kernel_requires}" != ""
|
||||
Requires: %kernel_requires
|
||||
%endif
|
||||
%if "%{kernel_requires_pre}" != ""
|
||||
Requires(pre): %kernel_requires_pre
|
||||
%endif
|
||||
%if "%{kernel_requires_preun}" != ""
|
||||
Requires(preun):%kernel_requires_preun
|
||||
%endif
|
||||
%if "%{kernel_requires_post}" != ""
|
||||
Requires(post): %kernel_requires_post
|
||||
%endif
|
||||
%if "%{kernel_requires_postun}" != ""
|
||||
Requires(postun):%kernel_requires_postun
|
||||
%endif
|
||||
%endif
|
||||
%if "%{kernel_base_provides}" != ""
|
||||
Provides: %{kernel_base_provides}
|
||||
%endif
|
||||
%if "%{kernel_base_obsoletes}" != ""
|
||||
Obsoletes: %{kernel_base_obsoletes}
|
||||
%endif
|
||||
%if "%{kernel_base_conflicts}" != ""
|
||||
Conflicts: %{kernel_base_conflicts}
|
||||
%endif
|
||||
%if "%{kernel_base_recommends}" != ""
|
||||
Recommends: %{kernel_base_recommends}
|
||||
%endif
|
||||
# This should give Conflicts: %%kernel_package_name = %%source_rel as old
|
||||
# kernel-default-base did. Together with the %%obsolete_rebuilds translated
|
||||
# from %%kernel_package_name to %%name we should be set for obsoletes against
|
||||
# kernel rebuilds.
|
||||
Conflicts: %(rpm -q --queryformat '[%%{PROVIDENEVRS}\n]' %kernel_package_name | grep '^%kernel_package_name =' | sort -V | head -n 1)
|
||||
# To protect against obsolete rebuilds of self we need a provide equivalent to
|
||||
# %%source_rel on this package version, and do obsolete of lower upload numbers
|
||||
# and lower rebuild numbers of %%name built against same kernel.
|
||||
# The %%source-rel is calculated from the subpackage version here.
|
||||
Provides: %name = %version-%source_rel
|
||||
%obsolete_rebuilds_subpackage %name
|
||||
|
||||
%description
|
||||
%(rpm -q --qf '%%{DESCRIPTION}' %kernel_package_name)
|
||||
%extradescription
|
||||
|
||||
This is a subpackage of %kernel_package_name. Development files are in
|
||||
%kernel_package_name-devel, sources in kernel-source%variant, and
|
||||
debug information in %kernel_package_name-debuginfo.
|
||||
|
||||
%package rebuild
|
||||
Summary: Empty package to ensure rebuilding %name in OBS
|
||||
Group: Other
|
||||
Requires: %kernel_package_name = %rpm_kver-%rpm_krel
|
||||
|
||||
%description rebuild
|
||||
This is empty package that ensures %name is rebuilt every time
|
||||
%kernel_package_name is rebuilt in OBS.
|
||||
|
||||
There is no reason to install this package.
|
||||
|
||||
%files rebuild
|
||||
|
||||
%prep
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
|
||||
# get rid of /usr/lib/rpm/brp-strip-debug
|
||||
# strip removes too much from the vmlinux ELF binary
|
||||
export NO_BRP_STRIP_DEBUG=true
|
||||
export STRIP_KEEP_SYMTAB='*/vmlinux*'
|
||||
|
||||
echo "%{?modules}" | tr ', ' '\n\n' > request-modules
|
||||
%scriptdir/kernel-subpackage-build %kernel_package_name %rpm_kver-%rpm_krel %package_name-%version-%release
|
||||
|
||||
%pre -f prein.sh
|
||||
|
||||
%post -f postin.sh
|
||||
|
||||
%preun -f preun.sh
|
||||
|
||||
%postun -f postun.sh
|
||||
|
||||
%posttrans -f posttrans.sh
|
||||
|
||||
%files -f subpackage.flist
|
||||
|
||||
%changelog
|
||||
210867
kernel-syms-longterm.changes
Normal file
210867
kernel-syms-longterm.changes
Normal file
File diff suppressed because it is too large
Load Diff
73
kernel-syms-longterm.spec
Normal file
73
kernel-syms-longterm.spec
Normal file
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# spec file for package kernel-syms-longterm
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define git_commit c2ab50c5267e169ed8fd925a85a73c81da717c2e
|
||||
%define variant -longterm%{nil}
|
||||
|
||||
%include %_sourcedir/kernel-spec-macros
|
||||
|
||||
Name: kernel-syms-longterm
|
||||
Version: 6.12.55
|
||||
%if 0%{?is_kotd}
|
||||
Release: <RELEASE>.gc2ab50c
|
||||
%else
|
||||
Release: 0
|
||||
%endif
|
||||
Summary: Kernel Symbol Versions (modversions)
|
||||
License: GPL-2.0-only
|
||||
Group: Development/Sources
|
||||
URL: https://www.kernel.org/
|
||||
BuildRequires: coreutils
|
||||
ExclusiveArch: aarch64 x86_64
|
||||
Prefix: /usr/src
|
||||
AutoReqProv: off
|
||||
Source: README.KSYMS
|
||||
%ifarch aarch64 x86_64
|
||||
Requires: kernel-longterm-devel = %version-%source_rel
|
||||
%endif
|
||||
Requires: kernel-devel%variant = %version-%source_rel
|
||||
Provides: %name = %version-%source_rel
|
||||
Provides: %name-srchash-%git_commit
|
||||
Provides: multiversion(kernel)
|
||||
|
||||
# Force bzip2 instead of lzma compression to
|
||||
# 1) allow install on older dist versions, and
|
||||
# 2) decrease build times (bsc#962356 boo#1175882)
|
||||
%define _binary_payload w9.bzdio
|
||||
|
||||
%description
|
||||
Kernel symbols, such as functions and variables, have version
|
||||
information attached to them. This package contains the symbol versions
|
||||
for the standard kernels.
|
||||
|
||||
This package is needed for compiling kernel module packages with proper
|
||||
package dependencies.
|
||||
|
||||
|
||||
%source_timestamp
|
||||
|
||||
%files
|
||||
%dir %_docdir/%name
|
||||
%_docdir/%name/README.SUSE
|
||||
|
||||
%prep
|
||||
|
||||
%install
|
||||
install -m 644 -D %{SOURCE0} %buildroot/%_docdir/%name/README.SUSE
|
||||
|
||||
%changelog
|
||||
19
linux-6.12.tar.sign
Normal file
19
linux-6.12.tar.sign
Normal file
@@ -0,0 +1,19 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Comment: This signature is for the .tar version of the archive
|
||||
Comment: git archive --format tar --prefix=linux-6.12/ v6.12
|
||||
Comment: git version 2.47.0
|
||||
|
||||
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmc6xcwACgkQONu9yGCS
|
||||
aT65NhAAvh7QiDnvnOlH/ZI9TVDE70GYARPN0OQTE+7YmtwYYxtDmIWpl5V4gjcK
|
||||
jYZYWkNWZxyIi/dzZFoY8JMEwxdPfchkc2nqJxgHbZGTWudcLnTWxIRnzlEjs+7B
|
||||
B7XIlCTGYMi3hYweHNZcDzvAFp+WA2e130ZTHeJSpEy7jkdcRxnKP4kYkE52bmOr
|
||||
iK0MgfPhlDY90K9T/XQ1j0CdU9ekpwXXc+vfNPtPz4H5VpAkIvLzFmu/9oYtGBlf
|
||||
8w4wel6GlzYsZL8XJmBgK2GyhHXLKeEAsTFGoJSnZBwgqfr9ux9iVNCUgfMNyBh/
|
||||
sPp0ZzVWnqk5CsLTO/bzV64ckRLyBp9nfTekZAjnADqXPTEfDKEGKL/AUV8AFQPE
|
||||
AvZzFAV8aOFQAUkofvQyJiD61UVjziNlxh0bXLcJrTdJbNqsEQlx4Z6mWWLeufrU
|
||||
7UWboDuR0+MNGUIVCxFjYF30Zb18hIxxnZ++9+MhtbY0+aAUpJUkHm6HpNls2JtI
|
||||
0M0iUjTYtlohcadLCo+IdO0+8/HiN1rtDy+PypTNvVI5aoS9gPuJPXMGE+rSgUAk
|
||||
M0XrPcKrekJPgkL0rQJ+CfHSodsex6de9mzmPA/RHB4iwSqkAHSShs5KXzY6jy+T
|
||||
fv5YOM+4AArm5xL1uDDDINp/a3tg5Nsv49ghfeYj6IzJPJ84ciw=
|
||||
=pvFU
|
||||
-----END PGP SIGNATURE-----
|
||||
BIN
linux-6.12.tar.xz
(Stored with Git LFS)
Normal file
BIN
linux-6.12.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
linux.keyring
Normal file
BIN
linux.keyring
Normal file
Binary file not shown.
100
macros.kernel-source
Normal file
100
macros.kernel-source
Normal file
@@ -0,0 +1,100 @@
|
||||
# A few cross-distro definitions:
|
||||
%kernel_build_shell_package %{lua: \
|
||||
if ((tonumber(rpm.expand("0%{?suse_version}")) > 1500) or (tonumber(rpm.expand("0%{?sle_version}")) > 150300)) then \
|
||||
print( "bash-sh" ) \
|
||||
else \
|
||||
print( "" ) \
|
||||
end
|
||||
}
|
||||
%usrmerged %{lua: susever = rpm.expand('%{?suse_version}'); if susever ~= '' and tonumber(susever) > 1550 then print('1') else print('0') end }
|
||||
%kernel_module_package_release 1
|
||||
%kernel_module_package_buildreqs modutils kernel-syms kmod-compat suse-kernel-rpm-scriptlets %kernel_build_shell_package
|
||||
|
||||
%cpu_arch %(case %_target_cpu in \
|
||||
# from rpm --eval '%ix86' \
|
||||
(i?86 | pentium3 | pentium4 | athlon | geode) \
|
||||
echo "i386" \
|
||||
;; \
|
||||
(aarch64) \
|
||||
echo "arm64" \
|
||||
;; \
|
||||
(*)\
|
||||
echo "%_target_cpu" \
|
||||
;; \
|
||||
esac)
|
||||
|
||||
%linux_arch %(case %cpu_arch in \
|
||||
(x86_64 | i386) \
|
||||
echo "x86" \
|
||||
;; \
|
||||
(ppc*) \
|
||||
echo "powerpc" \
|
||||
;; \
|
||||
(s390x) \
|
||||
echo "s390" \
|
||||
;; \
|
||||
(arm64) \
|
||||
echo "arm64" \
|
||||
;; \
|
||||
(armv*) \
|
||||
echo "arm" \
|
||||
;; \
|
||||
(riscv*) \
|
||||
echo "riscv" \
|
||||
;;
|
||||
(*) \
|
||||
echo "%cpu_arch" \
|
||||
;; \
|
||||
esac)
|
||||
|
||||
%linux_make_arch ARCH=%linux_arch
|
||||
|
||||
# Defines %flavors_to_build and %kernel_source() as a side effect.
|
||||
%_kernel_module_package(n:v:r:t:f:Xp:bc:) \
|
||||
%{expand:%( \
|
||||
subpkg=%{-t*}%{!-t:/usr/lib/rpm/kernel-module-subpackage} \
|
||||
echo "%%define _suse_kernel_module_subpackage(n:v:r:f:p:bc) %%{expand:%%(cd %_sourcedir; cat $subpkg; echo %%%%nil)}" \
|
||||
flavors_to_build= \
|
||||
flavors="%*" \
|
||||
for flavor in $(ls /usr/src/linux-obj/%_target_cpu 2>/dev/null); do \
|
||||
case " $flavors " in \
|
||||
(*" $flavor "*) \
|
||||
[ -n "%{-X}" ] && continue ;; \
|
||||
(*) \
|
||||
[ -z "%{-X}" -a -n "$flavors" ] && continue ;; \
|
||||
esac \
|
||||
krel=$(make -si -C /usr/src/linux-obj/%_target_cpu/$flavor/ %linux_make_arch kernelrelease 2>/dev/null) \
|
||||
kver=${krel%%-*} \
|
||||
flavors_to_build="$flavors_to_build $flavor" \
|
||||
echo "%%_suse_kernel_module_subpackage -n %{-n*}%{!-n:%name} -v %{-v*}%{!-v:%version} -r %{-r*}%{!-r:%release} %{-f} %{-p} %{-b} %{-c:-c} $flavor $kver" \
|
||||
done \
|
||||
echo "%%global flavors_to_build${flavors_to_build:-%%nil}" \
|
||||
echo "%%{expand:%%(test -z '%flavors_to_build' && echo %%%%internal_kmp_error)}" \
|
||||
echo "%%global kernel_source() /usr/src/linux-obj/%_target_cpu/%%%%{1}" \
|
||||
echo "%%global kernel_module_package_moddir() updates" \
|
||||
\
|
||||
echo "%package -n %{-n*}%{!-n:%name}-kmp-_dummy_" \
|
||||
echo "Version: %version" \
|
||||
echo "Summary: %summary" \
|
||||
echo "Group: %group" \
|
||||
echo "%description -n %{-n*}%{!-n:%name}-kmp-_dummy_" \
|
||||
%{-c:
|
||||
for fmt in DER PEM; do h=$(openssl x509 -inform $fmt -fingerprint -noout -in %{-c*}); if test -n "$h"; then break; fi; done \
|
||||
cert=$(echo "$h" | sed -rn 's/^SHA1 Fingerprint=//; T; s/://g; s/(.{8}).*/\\1/p')
|
||||
: The -n expanstion in kernel-cert-subpackage only works if
|
||||
: -n is actually passed to the macro. Fix this here, so that
|
||||
: we do not have to modify the modsign-repackage script
|
||||
sed "s|@CERTS@|$cert|g; s|%%{-n.}|%{-n*}%{!-n:%name}|g" /usr/lib/rpm/kernel-cert-subpackage \
|
||||
echo "%%global __spec_install_pre %%__spec_install_pre \\\\\
|
||||
mkdir -p %%buildroot/etc/uefi/certs; openssl x509 -in %{-c*} -inform $fmt -out %%buildroot/etc/uefi/certs/${cert}.crt -outform DER" } \
|
||||
)}
|
||||
|
||||
# kernel_module_package: simply pass on all options and arguments.
|
||||
%kernel_module_package(n:v:r:t:f:xp:bc:) \
|
||||
%{expand:%%_kernel_module_package %{-x:-X} %{-n} %{-v} %{-r} %{-t} %{-f} %{-p} %{-b} %{-c} %*}
|
||||
|
||||
# suse_kernel_module_package: invert the meaning of the -x flag. (You are not
|
||||
# supposed to understand why a simple %{-x:}%{!-x:-x} won't work.)
|
||||
%suse_kernel_module_package(n:v:r:s:f:xp:bc:) \
|
||||
%{expand:%%_kernel_module_package %{-x: }%{!-x:-X} %{-n} %{-v} %{-r} %{-s:-t %{-s*}} %{-f} %{-p} %{-b} %{-c} %*}
|
||||
|
||||
28
mergedep
Normal file
28
mergedep
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
KREL=$1
|
||||
|
||||
{ cat /lib/modules/$KREL/modules.dep ;
|
||||
cat /lib/modules/$KREL/modules.softdep | grep : | sed -e 's/^softdep //' -e 's/ \(pre\|post\):/:/' ; } \
|
||||
| \
|
||||
while read l ; do
|
||||
MOD=$(echo "$l" | sed -e 's/:.*//')
|
||||
MOD=$(basename $MOD)
|
||||
case $MOD in
|
||||
*.ko.xz|*.ko.gz|*.ko.zst)
|
||||
MOD=${MOD%.*};;
|
||||
esac
|
||||
MOD=${MOD%.ko}
|
||||
DEPS="$(echo "$l" | sed -e 's/.*://')"
|
||||
moddeps=""
|
||||
for dep in $DEPS ; do
|
||||
dep=$(basename $dep)
|
||||
case $dep in
|
||||
*.ko.xz|*.ko.gz|*.ko.zst)
|
||||
dep=${dep%.*};;
|
||||
esac
|
||||
dep=${dep%.ko}
|
||||
moddeps="$moddeps $dep"
|
||||
done
|
||||
[ -n "$moddeps" ] && echo $MOD:$moddeps ||:
|
||||
done
|
||||
21
moddep
Normal file
21
moddep
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
dependencies=$1
|
||||
modules=$2
|
||||
result=$3
|
||||
|
||||
cat $modules | tr ' ' '\n' > $result
|
||||
echo > $result~
|
||||
|
||||
while ! diff -q $result~ $result > /dev/null ; do
|
||||
cp $result $result~
|
||||
while read MOD ; do
|
||||
moddeps="$(grep ^$MOD: $dependencies | sed -e 's/.*://' ||:)"
|
||||
for DEP in $moddeps ; do
|
||||
if ! grep -q ^$DEP\$ $result ; then
|
||||
echo $DEP >> $result
|
||||
echo $MOD: $DEP
|
||||
fi
|
||||
done
|
||||
done < $result
|
||||
done
|
||||
10
modflist
Normal file
10
modflist
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh -e
|
||||
flist=$1
|
||||
modules=$2
|
||||
output=$3
|
||||
mod_builtin=$4
|
||||
|
||||
while read MOD ; do
|
||||
[ -n "$MOD" ] || continue
|
||||
cat $flist | grep -E "/$MOD[.]ko([.]xz|[.]gz|[.]zst)?\$" >> $output || { grep -q /$MOD[.]ko\$ $mod_builtin && echo Module $MOD built-in ;} || echo Module $MOD missing
|
||||
done < $modules
|
||||
73
modules.fips
Normal file
73
modules.fips
Normal file
@@ -0,0 +1,73 @@
|
||||
ablk_helper
|
||||
aes-ce-ccm
|
||||
aes-neon-bs
|
||||
aes_s390
|
||||
aes_ti
|
||||
af_alg
|
||||
algif_hash
|
||||
ansi_cprng
|
||||
anubis
|
||||
arc4
|
||||
authenc
|
||||
blowfish_common
|
||||
blowfish_generic
|
||||
blowfish_x86_64
|
||||
camellia_generic
|
||||
camellia_x86_64
|
||||
cast5_generic
|
||||
cast6_generic
|
||||
cast_common
|
||||
cbc
|
||||
ccm
|
||||
cfb
|
||||
cmac
|
||||
cryptd
|
||||
crypto_user
|
||||
ctr
|
||||
cts
|
||||
deflate
|
||||
des3_ede-x86_64
|
||||
des_generic
|
||||
des_s390
|
||||
drbg
|
||||
ecb
|
||||
ecdh_generic
|
||||
fcrypt
|
||||
gcm
|
||||
gf128mul
|
||||
ghash_generic
|
||||
ghash_s390
|
||||
glue_helper
|
||||
khazad
|
||||
keywrap
|
||||
lrw
|
||||
md4
|
||||
michael_mic
|
||||
ofb
|
||||
pcbc
|
||||
rmd128
|
||||
rmd160
|
||||
rmd256
|
||||
rmd320
|
||||
salsa20_generic
|
||||
salsa20_x86_64
|
||||
seed
|
||||
serpent_generic
|
||||
serpent_sse2_x86_64
|
||||
sha1_s390
|
||||
sha256_s390
|
||||
sha3_generic
|
||||
sha512_generic
|
||||
sha512_s390
|
||||
sha512_ssse3
|
||||
tcrypt
|
||||
tea
|
||||
tgr192
|
||||
twofish_common
|
||||
twofish_generic
|
||||
twofish_x86_64
|
||||
twofish_x86_64_3way
|
||||
vmac
|
||||
wp512
|
||||
xcbc
|
||||
xts
|
||||
158
modversions
Normal file
158
modversions
Normal file
@@ -0,0 +1,158 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
use File::Basename;
|
||||
use File::Path;
|
||||
use File::Find;
|
||||
use Getopt::Long qw(:config no_ignore_case);
|
||||
use strict;
|
||||
|
||||
my %symbol_type_name = (
|
||||
n => 'normal', t => 'typedef', e => 'enum', s => 'struct', u => 'union',
|
||||
E => 'enum constant'
|
||||
);
|
||||
|
||||
my %definitions;
|
||||
my %override;
|
||||
my %override_locally;
|
||||
my %locally_unknown;
|
||||
my %locally_defined;
|
||||
|
||||
sub expand_types($);
|
||||
sub expand_types($) {
|
||||
my ($definition) = @_;
|
||||
local ($_, $1, $2);
|
||||
|
||||
my @defn = split ' ', $definition;
|
||||
for (@defn[1..$#defn]) {
|
||||
if (/^(.)#(.*)/) {
|
||||
#print "<<$defn[0] : $_>>\n";
|
||||
next if exists $locally_defined{$_};
|
||||
$locally_defined{$_} = 1;
|
||||
|
||||
if ($locally_unknown{$_}) {
|
||||
print "override " if $override_locally{$_};
|
||||
print "$_ $symbol_type_name{$1} $2 { UNKNOWN } \n";
|
||||
} else {
|
||||
if (!exists $definitions{$_}) {
|
||||
die "Missing definition of $symbol_type_name{$1} $2\n";
|
||||
}
|
||||
expand_types("$_ $definitions{$_}");
|
||||
}
|
||||
}
|
||||
}
|
||||
print "override " if $override_locally{$defn[0]};
|
||||
print "$definition\n";
|
||||
}
|
||||
|
||||
sub pack_dump($$) {
|
||||
my ($dir, $ext) = @_;
|
||||
my @files;
|
||||
|
||||
$ext = ".symtypes" unless defined $ext;
|
||||
$dir =~ s/\/+$//;
|
||||
|
||||
find(sub ($) { /\Q$ext\E$/ && push @files, $File::Find::name}, $dir);
|
||||
map { s/^\Q$dir\E\/(.*)\Q$ext\E$/$1/ } @files;
|
||||
|
||||
foreach my $file (sort @files) {
|
||||
print "/* $file.o */\n";
|
||||
|
||||
local *FD;
|
||||
open FD, "< $dir/$file$ext"
|
||||
or die "$dir/$file$ext: $!\n";
|
||||
while (<FD>) {
|
||||
chomp;
|
||||
|
||||
my $override = "";
|
||||
if (s/^override //) {
|
||||
$override = $&;
|
||||
}
|
||||
|
||||
if (/^(\S)#(\S+)\s*(.*)/) {
|
||||
my $sym = "$1#$2";
|
||||
my $definition = $3;
|
||||
|
||||
if (/^$sym\s+$symbol_type_name{$1}\s+$2\s+{\s+UNKNOWN\s+}\s*$/) {
|
||||
$_ = $override . substr($sym, 0, 1) . "##" . substr($sym, 2);
|
||||
} else {
|
||||
if (exists $definitions{$sym} && $definitions{$sym} eq $definition) {
|
||||
if (($override ne "") == (exists $override{$sym})) {
|
||||
next;
|
||||
}
|
||||
$_ = "$override$sym";
|
||||
} else {
|
||||
$definitions{$sym} = $definition;
|
||||
if ($override eq "") {
|
||||
delete $override{$sym};
|
||||
} else {
|
||||
$override{$sym} = 1;
|
||||
$_ = "$override$_";
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif ($override) {
|
||||
$_ = "$override$_";
|
||||
}
|
||||
print "$_\n";
|
||||
}
|
||||
close FD;
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub unpack_dump($$) {
|
||||
my ($dir, $ext) = @_;
|
||||
|
||||
$ext = ".symref" unless defined $ext;
|
||||
|
||||
while (<STDIN>) {
|
||||
next if /^$/;
|
||||
chomp;
|
||||
|
||||
if (/^\/\* (.*)\.o \*\//) {
|
||||
close STDOUT;
|
||||
mkpath(dirname("$dir/$1$ext"));
|
||||
open STDOUT, "> $dir/$1$ext"
|
||||
or die "$dir/$1$ext: $!\n";
|
||||
%locally_defined = ();
|
||||
%locally_unknown = ();
|
||||
%override_locally = %override;
|
||||
next;
|
||||
}
|
||||
|
||||
my $override = /^override\s/;
|
||||
s/^override\s//;
|
||||
|
||||
if (/^([^ ])#(#?)([^ ]+) *(.*)$/) {
|
||||
my $sym = "$1#$3";
|
||||
|
||||
if ($4 ne "") {
|
||||
if (/\s+{\s+UNKNOWN\s+}\s*$/) {
|
||||
$locally_unknown{$sym} = 1;
|
||||
$override_locally{$sym} = $override;
|
||||
} else {
|
||||
$definitions{$sym} = $4;
|
||||
$locally_unknown{$sym} = 0;
|
||||
$override{$sym} = $override;
|
||||
$override_locally{$sym} = $override;
|
||||
}
|
||||
} else {
|
||||
$locally_unknown{$sym} = ($2 ne "");
|
||||
$override_locally{$sym} = $override;
|
||||
}
|
||||
next;
|
||||
} elsif (/^([^# ]*)/) {
|
||||
$override_locally{$1} = $override;
|
||||
}
|
||||
expand_types($_);
|
||||
}
|
||||
}
|
||||
|
||||
my ($pack, $unpack, $ext);
|
||||
GetOptions("pack" => \$pack, "unpack" => \$unpack, "ext:s" => \$ext)
|
||||
&& ($pack || $unpack) && @ARGV == 1
|
||||
or die "USAGE:\t$0 [--ext extension] --pack {dir} > file\n" .
|
||||
"\t$0 [--ext extension] --unpack {dir} < file\n";
|
||||
|
||||
pack_dump($ARGV[0], $ext) if $pack;
|
||||
unpack_dump($ARGV[0], $ext) if $unpack;
|
||||
3
obsolete-kmps
Normal file
3
obsolete-kmps
Normal file
@@ -0,0 +1,3 @@
|
||||
# List of KMPs integrated into the kernel
|
||||
# These KMPs shoud be removed when the kernel is installed
|
||||
# <basename> <upper bound of shipped versions>
|
||||
1
old_changelog.txt
Normal file
1
old_changelog.txt
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
BIN
patches.addon.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.addon.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
patches.apparmor.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.apparmor.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
patches.arch.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.arch.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
patches.drivers.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.drivers.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
patches.drm.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.drm.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
patches.fixes.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.fixes.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
patches.kabi.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.kabi.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
3
patches.kernel.org.tar.bz2
Normal file
3
patches.kernel.org.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c7e195bd968f5a4b2a59bdbd746ac2b71e36fb476ce6b1cf6f543ab938a4a667
|
||||
size 9117089
|
||||
3
patches.rpmify.tar.bz2
Normal file
3
patches.rpmify.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a9305f69ceb189a03829dcb8247084359edc68a0cdb9938f1fa4d4e86351a528
|
||||
size 4119
|
||||
BIN
patches.rt.tar.bz2
(Stored with Git LFS)
Normal file
BIN
patches.rt.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
3
patches.suse.tar.bz2
Normal file
3
patches.suse.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fd37a19fe95ed3bc5c986fc9b6723d1c464b509a42a1981ec652a9b44a28e496
|
||||
size 54085
|
||||
22
release-projects
Normal file
22
release-projects
Normal file
@@ -0,0 +1,22 @@
|
||||
# This file contains regular expressions that define which projects
|
||||
# are considered part of an official release channel.
|
||||
# This will mark the kernel as released when it's built.
|
||||
SUSE:SLFO:[0-9].*
|
||||
SUSE:ALP:Source:Standard:Core:1.0:Build
|
||||
SUSE:SLFO:Kernel:1.0:Build
|
||||
SUSE:SLE-.*
|
||||
SUSE:Maintenance:.*
|
||||
openSUSE:[0-9].*:Update
|
||||
openSUSE:[0-9].*:Update:Test
|
||||
openSUSE:[0-9].*
|
||||
openSUSE:Leap
|
||||
openSUSE:Leap:.*
|
||||
openSUSE:Maintenance
|
||||
openSUSE:Maintenance:.*
|
||||
openSUSE:Evergreen:Maintenance
|
||||
openSUSE:Evergreen:Maintenance:.*
|
||||
openSUSE:Tumbleweed
|
||||
openSUSE:Tumbleweed:.*
|
||||
openSUSE:Factory
|
||||
openSUSE:Factory:.*
|
||||
PTF:.*
|
||||
11609
series.conf
Normal file
11609
series.conf
Normal file
File diff suppressed because it is too large
Load Diff
3
source-timestamp
Normal file
3
source-timestamp
Normal file
@@ -0,0 +1,3 @@
|
||||
2025-10-28 02:36:30 +0000
|
||||
GIT Revision: c2ab50c5267e169ed8fd925a85a73c81da717c2e
|
||||
GIT Branch: slowroll
|
||||
225
split-modules
Normal file
225
split-modules
Normal file
@@ -0,0 +1,225 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# given a Module.base and modules.dep, generate list
|
||||
# of base / supported / unsupported modules
|
||||
|
||||
set -e
|
||||
export LC_COLLATE=C
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: ${0##*/} -b Module.base [-d dir] [-i] [-e] [-o outdir]"
|
||||
echo " -i Ignore supported.conf errors"
|
||||
echo " -e Create the -extra filelist (otherwise, treat all modules as supported)"
|
||||
}
|
||||
|
||||
options=$(getopt -o b:d:o:ie -- "$@")
|
||||
if test $? -ne 0; then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
eval set -- "$options"
|
||||
opt_builddir=
|
||||
opt_out=.
|
||||
opt_dir=.
|
||||
opt_ignore_errors=false
|
||||
opt_extra=false
|
||||
while test $# -gt 0; do
|
||||
opt=$1
|
||||
shift
|
||||
case "$opt" in
|
||||
-b | -d | -o)
|
||||
arg=$1
|
||||
shift
|
||||
esac
|
||||
case "$opt" in
|
||||
-b)
|
||||
opt_builddir=$arg ;;
|
||||
-d)
|
||||
opt_dir=$arg ;;
|
||||
-o)
|
||||
opt_out=$arg ;;
|
||||
-i)
|
||||
opt_ignore_errors=true ;;
|
||||
-e)
|
||||
opt_extra=true ;;
|
||||
--)
|
||||
break ;;
|
||||
*)
|
||||
echo "Unknown option $opt" >&2
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
if test -z "$opt_builddir"; then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
tmp=$(mktemp -d)
|
||||
mkdir "$tmp/empty"
|
||||
|
||||
find "$opt_dir" -type f \( -name '*.ko' -o -name '*.ko.xz' -o -name '*.ko.gz' -o -name '*.ko.zst' \) -printf '/%P\n' | \
|
||||
awk -F/ '{ n=$NF; gsub(/-/, "_", n); sub(/\.ko(\.xz|\.gz|\.zst)?$/, "", n); print n " " $0; }' | \
|
||||
sort >"$tmp/all"
|
||||
|
||||
err=false
|
||||
while read mod path; do
|
||||
if $opt_extra; then
|
||||
support=$(/sbin/modinfo -F supported "$opt_dir/$path")
|
||||
else
|
||||
support=yes
|
||||
fi
|
||||
case "$support" in
|
||||
yes | external)
|
||||
echo "$mod"
|
||||
;;
|
||||
no)
|
||||
;;
|
||||
"")
|
||||
echo "warning: $mod not listed in supported.conf" >&2
|
||||
;;
|
||||
*)
|
||||
echo "error: invalid support flag for $mod: $support" >&2
|
||||
err=true
|
||||
;;
|
||||
esac
|
||||
done <"$tmp/all" | sort -u >"$tmp/supp"
|
||||
if $err; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
modules_dep=$(find "$opt_dir" -type f -name modules.dep)
|
||||
if test -z "$modules_dep"; then
|
||||
echo "Cannot find modules.dep in $opt_dir" >&2
|
||||
exit 1
|
||||
fi
|
||||
(
|
||||
echo '%:
|
||||
@echo $@
|
||||
ifdef EXPLAIN
|
||||
@for dep in $^; do echo "$$dep needed by $@"; done >> $(EXPLAIN)
|
||||
endif
|
||||
'
|
||||
sed -r 's:[^ ]*/([^/]*)\.ko(\.xz|\.gz|\.zst)?\>:\1:g; y/-/_/' "$modules_dep"
|
||||
) >"$tmp/dep"
|
||||
|
||||
add_dependent_modules()
|
||||
{
|
||||
xargs -r make $MAKE_ARGS EXPLAIN=$1 -rRs -C "$tmp/empty" -f "$tmp/dep" | sort -u
|
||||
}
|
||||
|
||||
# base
|
||||
if test -f "$opt_builddir/Module.base"; then
|
||||
sed 'y/-/_/' <"$opt_builddir/Module.base" | add_dependent_modules >"$tmp/base"
|
||||
else
|
||||
touch "$tmp/base"
|
||||
fi
|
||||
join -j 1 -o 2.2 "$tmp/base" "$tmp/all" >"$opt_out/base-modules"
|
||||
|
||||
# base firmware
|
||||
kver=$(make $MAKE_ARGS -s -C "$opt_builddir" kernelrelease)
|
||||
fw_dir=/lib/firmware/$kver
|
||||
test -d $opt_dir/usr$fw_dir && fw_dir=/usr$fw_dir
|
||||
if test -d "$opt_dir$fw_dir"; then
|
||||
join <(/sbin/modinfo -F firmware \
|
||||
$(sed "s:^:$opt_dir:" "$opt_out/base-modules") | sort) \
|
||||
<(find "$opt_dir$fw_dir" -type f -printf '%P\n' | sort)
|
||||
fi | sed "s:^:$fw_dir:" >"$opt_out/base-firmware"
|
||||
|
||||
# kmps
|
||||
for f in "$opt_builddir"/Module.*-kmp; do
|
||||
test -f "$f" || continue
|
||||
kmp=${f##*/Module.}
|
||||
sed 'y/-/_/' <"$f" >"$tmp/$kmp"
|
||||
join -j 1 -o 2.2 "$tmp/$kmp" "$tmp/all" >"$opt_out/$kmp-modules"
|
||||
cat "$tmp/$kmp"
|
||||
done | sort -u >"$tmp/kmp-all"
|
||||
join -v1 "$tmp/supp" "$tmp/kmp-all" >"$tmp/supp-main"
|
||||
|
||||
# main
|
||||
add_dependent_modules "$tmp/supp-explain" <"$tmp/supp-main" >"$tmp/supp-all"
|
||||
if ! cmp -s "$tmp/supp-main" "$tmp/supp-all"; then
|
||||
# FIXME: Error message not accurate if a supported KMP module is
|
||||
# needed by a module in the main package
|
||||
echo "The following unsupported modules are used by supported modules:" >&2
|
||||
join -j1 -a2 <(sort "$tmp/supp-explain") \
|
||||
<(join -v2 "$tmp/supp-main" "$tmp/supp-all") >&2
|
||||
echo "Please fix supported.conf." >&2
|
||||
if ! $opt_ignore_errors; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
join -j 1 -o 2.2 "$tmp/supp-all" "$tmp/all" >"$opt_out/main-modules"
|
||||
|
||||
# unsupported
|
||||
join -j 1 -v 2 -o 2.2 <(sort -u "$tmp/supp-all" "$tmp/kmp-all") "$tmp/all" | sort -u > "$opt_out/unsupported-modules"
|
||||
|
||||
# split again to extra and optional
|
||||
if $opt_extra && test -f "$opt_builddir/Module.optional"; then
|
||||
|
||||
declare -A modmarks wcmarks
|
||||
wcpaths=()
|
||||
while read mark path; do
|
||||
case $path in
|
||||
*.ko.xz|*.ko.gz|*.ko.zst)
|
||||
path=${path%.*};;
|
||||
esac
|
||||
path=${path%.ko}
|
||||
mod=${path##*/}
|
||||
mod=$(echo "$mod" | sed 'y/-/_/')
|
||||
modmarks["$mod"]="$mark"
|
||||
# paths with wildcards need to be verified sequentially, so we keep
|
||||
# the paths in the array wcpaths and each mark in wcmarks[]
|
||||
case "$path" in
|
||||
*[\*\?\[]*)
|
||||
wcpaths[${#wcpaths[@]}]="$path"
|
||||
wcmarks["$path"]="$mark";;
|
||||
esac
|
||||
done < "$opt_builddir/Module.optional"
|
||||
|
||||
while read xpath; do
|
||||
path=$xpath
|
||||
case $path in
|
||||
*.ko.xz|*.ko.gz|*.ko.zst)
|
||||
path=${path%.*};;
|
||||
esac
|
||||
path=${path%.ko}
|
||||
mod=${path##*/}
|
||||
mod=$(echo "$mod" | sed 'y/-/_/')
|
||||
x=${modmarks["$mod"]}
|
||||
if [ -n "$x" ]; then
|
||||
test x"$x" = x"-" && echo "$xpath"
|
||||
continue
|
||||
fi
|
||||
|
||||
# unmatched modules must be handled via wildcard
|
||||
path=${path#/usr}
|
||||
path=${path#/lib/modules/*/kernel/}
|
||||
for m in "${wcpaths[@]}"; do
|
||||
case "$path" in
|
||||
($m)
|
||||
test x${wcmarks["$m"]} = x"-" && echo "$xpath"
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
done < "$opt_out/unsupported-modules" | sort > "$tmp/unsupp-extra"
|
||||
|
||||
cat "$tmp/supp-all" "$tmp/kmp-all" "$tmp/unsupp-extra" | \
|
||||
sed -r 's:[^ ]*/([^/]*)\.ko(\.xz|\.gz|\.zst)?\>:\1:g; y/-/_/' | sort -u > "$tmp/unsupp-extra-all"
|
||||
add_dependent_modules "$tmp/unsupp-explain" <"$tmp/unsupp-extra-all" >"$tmp/unsupp-extra-dep"
|
||||
if ! cmp -s "$tmp/unsupp-extra-all" "$tmp/unsupp-extra-dep"; then
|
||||
echo "The following optional modules are used by extra modules:" >&2
|
||||
join -j1 -a2 <(sort "$tmp/unsupp-explain") \
|
||||
<(join -v2 "$tmp/unsupp-extra-all" "$tmp/unsupp-extra-dep") >&2
|
||||
echo "Please fix supported.conf." >&2
|
||||
if ! $opt_ignore_errors; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
join -j 1 -v 2 "$tmp/unsupp-extra" "$opt_out/unsupported-modules" > "$opt_out/optional-modules"
|
||||
mv "$tmp/unsupp-extra" "$opt_out/unsupported-modules"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
16
splitflist
Normal file
16
splitflist
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
package="$1"
|
||||
present="$2"
|
||||
ghost="$3"
|
||||
|
||||
missing=""
|
||||
|
||||
rpm -ql --noghost "$package" | while read x ; do
|
||||
[ -e "$x" -o -L "$x" ] && echo "$x" >> "$present" || echo Missing file "$x"
|
||||
done
|
||||
|
||||
rpm -q --qf '[%{FILEFLAGS} %{FILENAMES} 0%{FILEMODES:octal} %{FILESIZES} %{FILEMTIMES} %{FILELINKTOS}\n]' $package | while read -a line; do
|
||||
[ $[line[0]&64] = 64 ] || continue
|
||||
echo "${line[@]:1}"
|
||||
done > "$ghost"
|
||||
4316
supported.conf
Normal file
4316
supported.conf
Normal file
File diff suppressed because it is too large
Load Diff
BIN
sysctl.tar.bz2
(Stored with Git LFS)
Normal file
BIN
sysctl.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user