Accepting request 1224199 from Kernel:stable

6.11.8 & memattr fix & CET enablement; bugs: bsc#1012628 bsc#1225770 bsc#1231173 bsc#1231465 bsc#1231541 bsc#1231849 bsc#1231853 bsc#1231854 bsc#1231855 bsc#1231856 bsc#1231857 bsc#1231858 bsc#1231859 bsc#1231860 bsc#1231861 bsc#1231864 bsc#1231865 bsc#1231867 bsc#1231868 bsc#1231869 bsc#1231871 bsc#1231872 bsc#1231899 bsc#1231901 bsc#1231902 bsc#1231903 bsc#1231904 bsc#1231905 bsc#1231906 bsc#1231907 bsc#1231908 bsc#1231909 bsc#1231910 bsc#1231911 bsc#1231912 bsc#1231913 bsc#1231914 bsc#1231915 bsc#1231916 bsc#1231919 bsc#1231920 bsc#1231924 bsc#1231926 bsc#1231927 bsc#1231930 bsc#1231931 bsc#1231933 bsc#1231935 bsc#1231942 bsc#1231944 bsc#1231946 bsc#1231947 bsc#1231948 bsc#1231949 bsc#1231950 bsc#1231951 bsc#1231952 bsc#1231953 bsc#1231954 bsc#1231955 bsc#1231956 bsc#1231957 bsc#1231963 bsc#1231964 bsc#1231965 bsc#1231967 bsc#1231968 bsc#1231970 bsc#1231975 bsc#1231987 bsc#1231989 bsc#1231990 bsc#1231998 bsc#1232000 bsc#1232003 bsc#1232009 bsc#1232010 bsc#1232011 bsc#1232012 bsc#1232013 bsc#1232014 bsc#1232015 bsc#1232016 bsc#1232017 bsc#1232018 bsc#1232041 bsc#1232043 bsc#1232048 bsc#1232049 bsc#1232050 bsc#1232052 bsc#1232053 bsc#1232054 bsc#1232055 bsc#1232056 bsc#1232073 bsc#1232075 bsc#1232076 bsc#1232077 bsc#1232078 bsc#1232079 bsc#1232080 bsc#1232081 bsc#1232082 bsc#1232083 bsc#1232084 bsc#1232085 bsc#1232086 bsc#1232087 bsc#1232088 bsc#1232089 bsc#1232093 bsc#1232094 bsc#1232095 bsc#1232096 bsc#1232097 bsc#1232098 bsc#1232099 bsc#1232100 bsc#1232101 bsc#1232102 bsc#1232103 bsc#1232104 bsc#1232105 bsc#1232109 bsc#1232110 bsc#1232111 bsc#1232112 bsc#1232113 bsc#1232114 bsc#1232116 bsc#1232117 bsc#1232124 bsc#1232126 bsc#1232127 bsc#1232129 bsc#1232130 bsc#1232131 bsc#1232132 bsc#1232134 bsc#1232135 bsc#1232137 bsc#1232140 bsc#1232141 bsc#1232142 bsc#1232144 bsc#1232145 bsc#1232147 bsc#1232148 bsc#1232149 bsc#1232151 bsc#1232152 bsc#1232153 bsc#1232154 bsc#1232155 bsc#1232156 bsc#1232157 bsc#1232158 bsc#1232159 bsc#1232160 bsc#1232161 bsc#1232162 bsc#1232164 bsc#1232165 bsc#1232166 bsc#1232167 bsc#1232168 bsc#1232169 bsc#1232174 bsc#1232180 bsc#1232182 bsc#1232185 bsc#1232187 bsc#1232189 bsc#1232192 bsc#1232193 bsc#1232195 bsc#1232196 bsc#1232197 bsc#1232198 bsc#1232199 bsc#1232200 bsc#1232201 bsc#1232202 bsc#1232203 bsc#1232205 bsc#1232206 bsc#1232208 bsc#1232215 bsc#1232217 bsc#1232218 bsc#1232220 bsc#1232221 bsc#1232222 bsc#1232224 bsc#1232232 bsc#1232247 bsc#1232249 bsc#1232250 bsc#1232251 bsc#1232252 bsc#1232253 bsc#1232254 bsc#1232255 bsc#1232256 bsc#1232257 bsc#1232258 bsc#1232259 bsc#1232260 bsc#1232262 bsc#1232263 bsc#1232264 bsc#1232272 bsc#1232275 bsc#1232278 bsc#1232279 bsc#1232282 bsc#1232285 bsc#1232287 bsc#1232288 bsc#1232291 bsc#1232295 bsc#1232305 bsc#1232307 bsc#1232309 bsc#1232310 bsc#1232312 bsc#1232313 bsc#1232314 bsc#1232315 bsc#1232317 bsc#1232318 bsc#1232329 bsc#1232332 bsc#1232333 bsc#1232334 bsc#1232335 bsc#1232336 bsc#1232337 bsc#1232339 bsc#1232340 bsc#1232345 bsc#1232349 bsc#1232350 bsc#1232352 bsc#1232354 bsc#1232355 bsc#1232356 bsc#1232357 bsc#1232358 bsc#1232359 bsc#1232361 bsc#1232362 bsc#1232364 bsc#1232365 bsc#1232366 bsc#1232367 bsc#1232368 bsc#1232369 bsc#1232370 bsc#1232371 bsc#1232374 bsc#1232376 bsc#1232378 bsc#1232381 bsc#1232383 bsc#1232385 bsc#1232386 bsc#1232387 bsc#1232388 bsc#1232389 bsc#1232392 bsc#1232393 bsc#1232394 bsc#1232395 bsc#1232396 bsc#1232416 bsc#1232417 bsc#1232418 bsc#1232419 bsc#1232420 bsc#1232424 bsc#1232427 bsc#1232430 bsc#1232432 bsc#1232435 bsc#1232442 bsc#1232446 bsc#1232473 bsc#1232482 bsc#1232483 bsc#1232484 bsc#1232493 bsc#1232494 bsc#1232495 bsc#1232498 bsc#1232499 bsc#1232500 bsc#1232501 bsc#1232502 bsc#1232503 bsc#1232504 bsc#1232505 bsc#1232506 bsc#1232507 bsc#1232508 bsc#1232509 bsc#1232510 bsc#1232511 bsc#1232512 bsc#1232513 bsc#1232516 bsc#1232519 bsc#1232520 bsc#1232521 bsc#1232552 bsc#1232812 bsc#1232819 bsc#1232854 bsc#1232856 bsc#1232857 bsc#1232858 bsc#1232859 bsc#1232860 bsc#1232861 bsc#1232862 bsc#1232866 bsc#1232867 bsc#1232868 bsc#1232869 bsc#1232870 bsc#1232871 bsc#1232872 bsc#1232873 bsc#1232874 bsc#1232875 bsc#1232876 bsc#1232877 bsc#1232878 bsc#1232879 bsc#1232880 bsc#1232881 bsc#1232882 bsc#1232883 bsc#1232884 bsc#1232885 bsc#1232886 bsc#1232887 bsc#1232888 bsc#1232890 bsc#1232891 bsc#1232892 bsc#1232894 bsc#1232895 bsc#1232896 bsc#1232897 bsc#1232905 bsc#1232907 bsc#1232912 bsc#1232914 bsc#1232919 bsc#1232924 bsc#1232925 bsc#1232926 bsc#1232928 bsc#1232930 bsc#1232932 bsc#1232935 bsc#1233028 bsc#1233029 bsc#1233030 bsc#1233031 bsc#1233032 bsc#1233033 bsc#1233034 bsc#1233035 bsc#1233036 bsc#1233037 bsc#1233038 bsc#1233040 bsc#1233041 bsc#1233044 bsc#1233049 bsc#1233050 bsc#1233051 bsc#1233055 bsc#1233056 bsc#1233057 bsc#1233059 bsc#1233060 bsc#1233061 bsc#1233062 bsc#1233063 bsc#1233065 bsc#1233067 bsc#1233072 bsc#1233073 bsc#1233074 bsc#1233075 bsc#1233088 bsc#1233089 bsc#1233090 bsc#1233091 bsc#1233092 bsc#1233093 bsc#1233094 bsc#1233096 bsc#1233097 bsc#1233098 bsc#1233099 bsc#1233100 bsc#1233101 bsc#1233102 bsc#1233103 bsc#1233104 bsc#1233105 bsc#1233106 bsc#1233107 bsc#1233108 bsc#1233109 bsc#1233110 bsc#1233111 bsc#1233112 bsc#1233113 bsc#1233114 bsc#1233115 bsc#1233117 bsc#1233121 bsc#1233122 bsc#1233123 bsc#1233125 bsc#1233127 bsc#1233129 bsc#1233130 bsc#1233135 bsc#1233173 bsc#1233174 bsc#1233175 bsc#1233176 bsc#1233177 bsc#1233178 bsc#1233179 bsc#1233180 bsc#1233181 bsc#1233182 bsc#1233183 bsc#1233184 bsc#1233185 bsc#1233186 bsc#1233187 bsc#1233188 bsc#1233189 bsc#1233191 bsc#1233192 bsc#1233193 bsc#1233194 bsc#1233195 bsc#1233197 bsc#1233200 bsc#1233201 bsc#1233203 bsc#1233204 bsc#1233205 bsc#1233206 bsc#1233207 bsc#1233208 bsc#1233209 bsc#1233210 bsc#1233211 bsc#1233212 bsc#1233214 bsc#1233216 bsc#1233217 bsc#1233219 bsc#1233221 bsc#1233226 bsc#1233238 bsc#1233239 bsc#1233244 bsc#1233248 bsc#1233253 bsc#1233254 bsc#1233263 bsc#1233268 bsc#1233269 bsc#1233270 bsc#1233271 bsc#1233288 bsc#1233293

OBS-URL: https://build.opensuse.org/request/show/1224199
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kernel-source?expand=0&rev=759
This commit is contained in:
Ana Guerrero 2024-11-15 14:38:25 +00:00 committed by Git OBS Bridge
commit 24f96dd290
138 changed files with 2836608 additions and 508200 deletions

316
README.PATCH-POLICY.SUSE Normal file
View 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;
```

View File

@ -1,471 +1,434 @@
WORKING WITH THE SUSE 2.6.x and 3.x KERNEL SOURCES Working with the SUSE Kernel Sources
====================================
Andreas Gruenbacher <agruen@suse.de>, SUSE Labs, 2003, 2004, 2005, 2006 This document gives an overview of how SUSE Linux kernels are created, and
Michal Marek <mmarek@suse.de>, SUSE Labs, 2010 describes tasks like building individual kernels and creating external kernel
modules.
This document gives an overview of how SUSE Linux kernels are Overview
created, and describes tasks like building individual kernels --------
and creating external kernel modules.
A companion HOWTO that describes how to build driver update disks (among The SUSE kernels are generated from the upstream Linux kernel sources found at
other things) is available 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.
http://developer.novell.com/wiki/index.php/Creating_a_Driver_Update_Disk_%28DUD%29 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:
TABLE OF CONTENTS * kernel-source
Overview The kernel source tree, generated by unpacking the vanilla kernel sources and
Compiling your own kernel applying the patches. The kernel sources are used by a number of other
Building additional (external) modules packages. They can also be used for compiling additional kernel modules.
Supported vs. unsupported modules
Patch selection mechanism
Where to find configuration files
How to configure the kernel sources
Module load paths
* kernel-devel
OVERVIEW A complement of the kernel-source package that is needed to build external
modules.
The kernels for SUSE are generated from the vanilla Linux kernel sources * kernel-`$FLAVOR`
found at http://ftp.kernel.org, on top of which a number of patches are
applied. The resulting kernel source tree is configured and built,
resulting in a binary kernel.
The add-on patches and configuration files are maintained in A number of binary kernels, for example, kernel-default for standard use,
a GIT repository at kernel-debug with extra debugging features, etc. These packages are all
generated from the same kernel sources, and differ in the kernel
configurations used.
http://gitorious.org/opensuse/kernel-source * kernel-`$FLAVOR`-base
A script (scripts/tar-up.sh) packs up the files in the repository in a A subset of kernel-`$FLAVOR`, for use in virtualized guests that only require
form suitable for rpmbuild. When building the RPM packages, the a few device and filesystem drivers.
following binary packages get created:
* kernel-source * kernel-`$FLAVOR`-devel
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-$FLAVOR
A number of binary kernels (for example, kernel-default for
uniprocessor machines, kernel-smp for smp machines, 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 paravirtualized quests that
only require a few device and filesystem drivers.
* kernel-$FLAVOR-devel
The files used for generating kernel module packages for use with The files used for generating kernel module packages for use with
kernel-$FLAVOR. kernel-`$FLAVOR`.
* kernel-syms * kernel-syms
A meta package that pulls in the relevant kernel-$FLAVOR-devel A meta package that pulls in the relevant kernel-`$FLAVOR`-devel packages for
packages for a given architecture. a given architecture.
The repository contains the configuration files (.config) for all SUSE
kernel flavors. All configuration files are included in the
kernel-source package (see WHERE TO FIND CONFIGURATION FILES below).
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 In the installed system, the kernel-source package installs files in the
following directories: following directories:
* `/usr/src/linux-$VERSION-$RELEASE/`
* /usr/src/linux-$VERSION-$RELEASE/
The kernel sources. The kernel sources.
* /usr/src/linux * `/usr/src/linux`
A symbolic link to /usr/src/linux-$VERSION-$RELEASE. A symbolic link to `/usr/src/linux-$VERSION-$RELEASE/`.
* /usr/src/linux-$VERSION-$RELEASE-obj/$ARCH/$FLAVOR/ * `/usr/share/doc/packages/kernel-source-$VERSION-$RELEASE/`
Kernel build object files for one kernel flavor. These This document.
files are used for compiling additional kernel modules.
* /usr/src/linux-obj The kernel-`$FLAVOR`-devel packages install the following files:
A symbolic link to /usr/src/linux-$VERSION-$RELEASE-obj/$ARCH/$FLAVOR. * `/usr/src/linux-$VERSION-$RELEASE-obj/$ARCH/$FLAVOR/`
* /usr/share/doc/packages/kernel-source/ Kernel build object files for one kernel flavor. These files are used for
compiling additional kernel modules.
This document and an external kernel module example. * `/usr/src/linux-obj/$ARCH/$FLAVOR`
* /etc/init.d/running-kernel A symbolic link to `/usr/src/linux-$VERSION-$RELEASE-obj/$ARCH/$FLAVOR/`.
Init script that adapts the kernel sources in /usr/src/linux to
the running kernel.
COMPILING YOUR OWN KERNEL Compiling your own kernel
-------------------------
The kernel sources are found in the kernel-source package. The The kernel sources are found in the kernel-source package. A binary kernel can
recommended way to produce a binary kernel is: be built from these sources as follows:
(1) Install kernel-source. Change to the /usr/src/linux directory. 1. Install the kernel-source package.
(2) Create a build directory for use in configuring and building 2. Create a build directory for use in configuring and building the kernel.
the kernel. Using /usr/src/linux directly requires root priviledges Using `/usr/src/linux/` directly requires root privileges and will cause
and will cause problems if you need to build kernel modules for problems if you need to build kernel modules for other installed kernels.
other installed kernels.
(3) Configure the kernel (for example, ``make -C /usr/src/linux 3. Configure the kernel, see [How to configure the kernel
O=$(pwd) oldconfig'' or ``make -C /usr/src/linux O=$(pwd) cloneconfig'', sources](#how-to-configure-the-kernel-sources). For example,
see HOW TO CONFIGURE THE KERNEL SOURCES). `make -C /usr/src/linux O=$PWD oldconfig`.
(4) Build the kernel and all its modules (``make''). 4. Build the kernel and all its modules by invoking `make`.
(5) Make sure that /etc/modprobe.d/unsupported-modules contains 5. Make sure that `/etc/modprobe.d/10-unsupported-modules.conf` contains
allow_unsupported_modules 1 allow_unsupported_modules 1
otherwise modprobe will refuse to load any modules. otherwise modprobe will refuse to load any modules.
(6) Install the kernel and the modules (``make modules_install'', 6. Install the modules and kernel: `make modules_install`, followed by
followed by ``make install''). This will automatically create `make install`. This automatically creates an initrd for the new kernel and
an initrd for the new kernel as well (see ``mkinitrd -h''). adds an entry to the GRUB boot menu.
(7) Add the kernel to the boot manager. When using lilo, run ``lilo'' Instead of building binary kernels by hand, you can also build one of the
to update the boot map. kernel-`$FLAVOR` packages using RPM.
Instead of building binary kernels by hand, you can also build
one of the kernel-$FLAVOR packages using RPM.
BUILDING ADDITIONAL (EXTERNAL) MODULES Building additional (external) modules
--------------------------------------
A single binary kernel module generally only works for a specific A single binary kernel module generally only works for a specific version of the
version of the kernel source tree, for a specific architecture and kernel source tree, for a specific architecture and configuration. This means
configuration. This means that for each binary kernel that SUSE ships, a that for each binary kernel that SUSE ships, a custom module must be built. This
custom module must be built. This requirement is to some extent relaxed requirement is to some extent relaxed by the modversion mechanism: modversions
by the modversion mechanism: modversions attach a checksum to each attach a checksum to each symbol (function or variable) exported to modules by
symbol (function or variable) exported to modules by the kernel. This the kernel. This allows to use kernel modules that have been built for a kernel
allows to use kernel modules that have been built for a kernel with a with a different version or release number in many cases, as long as none of the
different version or release number in many cases, as long as none of symbols the module uses have changed between the two kernel versions.
the symbols the module uses have changed between the two kernel
versions.
When releasing maintenance or security update kernels for a specific When releasing maintenance or security update kernels for a specific product, we
product, we carefully try to keep the kernel ABI stable. Despite this, carefully try to keep the kernel ABI stable. Despite this, we sometimes have no
we sometimes have no choice but to break binary compatibility. In this choice but to break binary compatibility. In this case, those kernel modules
case, those kernel modules must be rebuilt. must be rebuilt.
Additional kernel modules for one of the SUSE kernel flavors can be Additional kernel modules for one of the SUSE kernel flavors can be built in the
built in three different ways: following ways:
(1) by configuring the kernel sources in a separate build directory 1. by doing an ad-hoc module build, using one of the standard configurations in
(see HOW TO CONFIGURE THE KERNEL SOURCES), or `/usr/src/linux-obj/$ARCH/$FLAVOR`, or
(2) by using one of the standard configurations in
/usr/src/linux-obj/$ARCH/$FLAVOR, or
(3) by creating a Kernel Module Package (KMP) as described in the
Kernel Module Packages Manual, http://www.suse.de/~agruen/KMPM/.
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: The first method involves the following steps:
(1) Install the kernel-source package. 1. Install the kernel-devel package.
(2) Configure the kernel, see HOW TO CONFIGURE THE KERNEL SOURCES. 2. Install the kernel-`$FLAVOR`-devel package. This is necessary for symbol
version information (`CONFIG_MODVERSIONS`).
(3) Create files required for compiling external modules: 3. Compile the module(s) by changing into the module source directory and typing
``make scripts'' and ``make prepare''. `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).
(4) Compile the module(s) by changing into the module source directory If the installed kernel sources match the running kernel, you can build
and typing ``make -C $(your_build_dir) M=$(pwd)''. 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`.)
(5) Install the module(s) by typing 4. Install the module(s) with
``make -C $(your_build_dir) M=$(pwd) modules_install''. `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.
The second method involves the following steps: Supported vs. unsupported modules
---------------------------------
(1) Install the kernel-source package. 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.
(2) Install kernel-syms.$ARCH.rpm. This package is necessary for The support status of a module can be queried with the modinfo tool. Modinfo
symbol version information (CONFIG_MODVERSIONS). will report one of the following:
(3) Compile the module(s) by changing into the module source directory * direct support by SUSE: "supported: yes",
and typing ``make -C /usr/src/linux-obj/$ARCH/$FLAVOR M=$(pwd)''. * third-party support: "supported: external",
Substitute $ARCH and $FLAVOR with the architecture and flavor * unsupported modules: no supported tag.
for which to build the module(s).
If the installed kernel sources match the running kernel, you At runtime, the support status of a module can be obtained by reading
can build modules for the running kernel by using the path `/sys/module/$MODULE/supported`.
/lib/modules/$(uname -r)/build as the -C option in the above
command. (build is a symlink to /usr/src/linux-obj/$ARCH/$FLAVOR).
Starting with SuSE Linux 9.2 / SLES9 Service Pack 1, the Note that this information is available only if the module was not built
modversion information for the running kernel is also directly into the kernel. Builtin modules are implicitly supported.
contained in the kernel-$FLAVOR packages, and so for building
modules for the running kernel, the kernel-syms package is no
longer required.
(4) Install the module(s) with The aggregated support status for the entire kernel can be inspected by reading
``make -C /usr/src/linux-obj/$ARCH/$FLAVOR M=$(pwd) modules_install''. `/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>.
Whenever building modules, please use the kernel build infrastructure as Patch selection mechanism
much as possible, and do not try to circumvent it. The -------------------------
Documentation/kbuild directory in the kernel sources documents kbuild
makefiles.
Please take a look at the demo module installed under The SUSE kernels consist of the upstream kernel sources on top of which a number
/usr/share/doc/packages/kernel-source for a simple example of an Kernel of patches is applied. The file `series.conf` determines which patches are
Module Package (KMP). 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:
SUPPORTED VS. UNSUPPORTED MODULES # rpm -i kernel-source-$RPMVERSION-$RPMRELEASE.src.rpm
As an extension to the mainline kernel, modules can be tagged as 2. Unpack the patches and the kernel sources:
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. # cd /usr/src/packages/SOURCES/
Modinfo will report one of the following: # for f in patches.*.tar.bz2; do \
- direct support by SUSE: "supported: yes"
- third-party support: "supported: external"
- unsupported modules: no supported tag.
At runtime, the setting of the" unsupported" kernel command line
parameter and /proc/sys/kernel/unsupported determines 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 externally supported or unsupported
module both set a kernel taint flag. The taint flags are included in
Oopses. The taint status of the kernel can be inspected in
/proc/sys/kernel/tainted: Bits 0 to 4 have the following meanings:
bit 0 = a module with a GPL-incompatible license was loaded (tainted & 1),
bit 1 = module load was enforced (tainted & 2),
bit 2 = an SMP-unsafe module was loaded (tainted & 4),
bit 3 = (reserved),
bit 4 = an unsupported module was loaded (tainted & 16),
bit 5 = a module with third-party support was loaded (tainted & 32).
bit 10 = a machine check exception has occurred (taint & 1024; x86_64 only
so far).
The corresponding codes for the taint flags in Oopses are (x = unknown):
- "Pxxx" if bit 0 set or else
"Gxxx" if bit 0 unset,
- "xFxx" if bit 1 set or else
"x xx" if bit 1 unset,
- "xxSx" if set or else
"xx x" if bit 2 unset,
- "xxxU" if bit 4 set or else
"xxxX" if bit 5 set or else
"xxx ".
By default, external modules will not have the supported flag (that is,
they wil be marked as unsupported). For building externally supported
modules, please get in touch with Kurt Garloff <garloff@suse.de>.
PATCH SELECTION MECHANISM
The SUSE kernels consist of the vanilla 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:
# Install the package:
$ rpm -i kernel-source.src.rpm
# Unpack the patches and the kernel sources:
$ cd /usr/src/packages/SOURCES
$ for f in patches.*.tar.bz2; do \
tar -xjf "$f" || break; \ tar -xjf "$f" || break; \
done done
$ tar -xjf linux-2.6.5.tar.bz2 # tar -xJf linux-$SRCVERSION.tar.xz
# Apply the patches 3. Apply the patches
$ for p in $(./guards < series.conf); do # for p in $(./guards < series.conf); do \
patch -d linux-2.6.5 -p1 < $p || break patch -d linux-$SRCVERSION -p1 < $p || break; \
done done
The configuration script config.conf which is similar to series.conf is The configuration script `config.conf` which is similar to `series.conf` is
used for configuration file selection. See the section WHERE TO FIND used for configuration file selection, see the section [Where to find
CONFIGURATION FILES. configuration files](#where-to-find-configuration-files).
The file format of series.conf and config.conf should be obvious from The file format of `series.conf` and `config.conf` should be apparent from the
the comments in series.conf, and from the guards(1) manual page. (The comments in `series.conf` and from the guards(1) manual page. You can generate
guards(1) manual page can be generated by running pod2man on the guards this page by running `pod2man` on the `guards` script.
script.)
WHERE TO FIND CONFIGURATION FILES Where to find configuration files
---------------------------------
Kernel configuration files are stored in the kernel GIT repository. When Kernel configuration files are stored in the kernel Git repository. When packing
packing up the repository, they end up in config.tar.bz2. up the repository, they end up in `config.tar.bz2`.
The kernel-$FLAVOR packages are based on config/$ARCH/$FLAVOR. The kernel-`$FLAVOR` packages are based on `config/$ARCH/$FLAVOR`, for instance,
(kernel-default is based on config/$ARCH/default, for example). The kernel-default is based on `config/$ARCH/default`. The kernel-`$FLAVOR` packages
kernel-$FLAVOR packages install their configuration files as install their configuration files as `/boot/config-$VERSION-$RELEASE-$FLAVOR`.
/boot/config-$VER_STR (for example, /boot/config-2.6.5-99-default). The The config is also packaged in the kernel-`$FLAVOR`-devel package as
config is also packaged in the kernel-$FLAVOR-devel package as `/usr/src/linux-obj/$ARCH/$FLAVOR/.config`.
/usr/src/linux-obj/$ARCH/$FLAVOR/.config.
In addition, the running kernel exposes a gzip compressed version of its In addition, the running kernel exposes a gzip compressed version of its
configuration file as /proc/config.gz. The kernel sources can be configuration file as `/proc/config.gz`.
configured based on /proc/config.gz with ``make cloneconfig''.
HOW TO CONFIGURE THE KERNEL SOURCES How to configure the kernel sources
-----------------------------------
Before a binary kernel is built or an additional loadable module Before a binary kernel is built or an additional loadable module for an existing
for an existing kernel is created, the kernel must be configured. kernel is created, the kernel must be configured.
In order for a loadable module to work with an existing kernel, it must In order for a loadable module to work with an existing kernel, it must be
be created with a configuration that is identical to the kernel's created with a configuration that is identical to the kernel's configuration, or
configuration, or at least very close to that. Each configuration is at least very close to that. Each configuration is contained in a single file.
contained in a single file. The kernel-syms package installs The kernel-syms package installs configurations for all standard SUSE kernel
configurations for all standard SUSE kernel variants, so for building variants, so for building only external kernel modules it is not necessary to
only external kernel modules it is not necessary to configure the kernel configure the kernel sources.
sources.
Configuring the kernel sources for a specific configuration is Configuring the kernel sources for a specific configuration is straightforward:
straightfoward:
- Locate the configuration file you want to use. (See WHERE TO FIND * Locate the configuration file you want to use, see [Where to find
CONFIGURATION FILES above). configuration files](#where-to-find-configuration-files) above.
- Copy the configuration to the file .config in your build directory. * Copy the configuration to the file `.config` in your build directory.
- Run the following commands in sequence to apply the configuration, * Run the following commands in sequence to apply the configuration, generate
generate version information files, etc.: version information files, etc.:
make -C /usr/src/linux O=$PWD clean $ make -C /usr/src/linux O=$PWD clean
make -C /usr/src/linux O=$PWD oldconfig $ make -C /usr/src/linux O=$PWD oldconfig
Alternatively to ``make oldconfig'', you can also use ``make If the kernel sources do not match the configuration file exactly,
menuconfig'' for a text menu oriented user interface. If the kernel `make oldconfig` will prompt for settings that are undefined. When no
sources do not match the configuration file exactly, ``make `.config` file is initially copied to the target build directory, the command
oldconfig'' will prompt for settings that are undefined. Once this automatically uses `/boot/config-$(uname -r)` as the starting configuration.
step is completed, a Makefile will have been created that eliminates Alternatively to `make oldconfig`, you can also use `make menuconfig` for
the need to specify the locations of the kernel source and the build a text menu oriented user interface.
directory.
For configuring the kernel to match the running kernel, there is a Once this step is completed, a `Makefile` will have been created that
shortcut ``make cloneconfig'' that expands the file /proc/config.gz eliminates the need to specify the locations of the kernel source and the
into .config, and then runs ``make oldconfig''. build directory.
HOW TO ADD CUSTOM PATCHES * Update the configuration appropriately for the target use.
Typically patches are added to the appropriate patches.* directory (e.g. Configuration files for SUSE kernels include settings to integrate with
patches.fixes) and to series.conf. When the kernel-source package is signing support provided by the Open Build Service. When using such a
exported from the git repository, the patch will be automatically added configuration file directly, the build might fail due to missing files needed
to the appropriate patch tarball. for signing kernel modules.
If your goal is to create a kernel with only a few additional patches The minimal steps to enable module signing and have the kernel build
and you don't want to be bothered with using the git repository, there automatically generate a new key pair are as follows:
is an easier way.
The kernel-source SRPM ships with two empty archives that can be be $ ./source/scripts/config --enable CONFIG_MODULE_SIG \
filled and automatically expanded when building the kernel. You can use --enable CONFIG_MODULE_SIG_ALL --undefine CONFIG_MODULE_SIG_KEY
these to add your own patches and config options without disturbing the $ make olddefconfig
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 Please refer to the upstream documentation located at
patches.addon.tar.bz2 archive and add an entry to the series.conf file. `/usr/src/linux/Documentation/admin-guide/module-signing.rst` for complete
The archive will be expanded automatically with the other kernel patches information on how to configure module signing.
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 i386 default kernel is named How to add custom patches
config/i386/default. To add config options to that kernel, you would -------------------------
create a new file called config.addon/i386/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 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 Modules that belong to a specific kernel release are installed in
/lib/modules/2.6.5-99-smp and similar. Note that this path contains the `/lib/modules/$VERSION-$RELEASE-$FLAVOR/`. Modules from KMPs must be installed
kernel package release number. Modules from KMPs must be installed below `/lib/modules/$VERSION-$RELEASE-$FLAVOR/updates/` and similar: modules
below /lib/modules/2.6.5-99-smp/updates/ and similar: modules below below `updates/` have priority over other modules.
updates/ have priority over other modules.
When KMPs contain modules that are compatible between multiple installed When KMPs contain modules that are compatible between multiple installed
kernels, symlinks are used to make those modules available to those kernels, symlinks are used to make those modules available to those compatible
compatible kernels like this: kernels like this:
/lib/modules/2.6.16-100-smp/weak-updates/foo.ko -> `/lib/modules/$VERSION-$OTHER_RELEASE-$FLAVOR/weak-updates/foo.ko` →
/lib/modules/2.6.16-99-smp/updates/foo.ko `/lib/modules/$VERSION-$RELEASE-$FLAVOR/updates/foo.ko`
Modules in the weak-updates directory have lower priority than modules Modules in the `weak-updates/` directory have lower priority than modules in
in /lib/modules/2.6.16-100-smp/updates/, and higher priority than other `/lib/modules/$VERSION-$OTHER_RELEASE-$FLAVOR/updates/`, and higher priority
modules in /lib/modules/2.6.16-100-smp. than other modules in `/lib/modules/$VERSION-$OTHER_RELEASE-$FLAVOR/`.
REFERENCES Driver update disks
-------------------
General 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.
Documentation in the kernel source tree. For information how to create such an update, refer to the mkdud and mksusecd
tools, and their documentation:
Linux Documentation Project, http://www.tldp.org/ * <https://github.com/openSUSE/mkdud>,
* <https://github.com/openSUSE/mksusecd>.
Linux Weekly News, http://lwn.net
Rusty's Remarkably Unreliable Guides (Kernel Hacking
and Kernel Locking guides),
http://www.netfilter.org/unreliable-guides/
Kernel newbies, http://www.kernelnewbies.org/
Loadable Kernel Modules References
----------
Peter Jay Salzman and Ori Pomerantz: Linux Kernel Module General:
Programming Guide, Version 2.4, April 2003,
http://www.tldp.org/guides.html
* Documentation in the kernel source tree,
* LWN.net (Linux Weekly News), <https://lwn.net/>,
* Kernel newbies, <https://kernelnewbies.org/>.
Kernel Module Packages Loadable kernel modules:
Andreas Gruenbacher: Kernel Module Packages Manual. * Peter Jay Salzman, Michael Burian, Ori Pomerantz: The Linux Kernel Module
Versions for CODE9 (SLES9, SUSE LINUX 10.0) and CODE10 Programming Guide, Version 2.6,
(SUSE Linux 10.1, SLES10), <https://tldp.org/LDP/lkmpg/2.6/html/index.html>.
http://www.suse.de/~agruen/KMPM/
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/>.

304
_constraints Normal file
View File

@ -0,0 +1,304 @@
<constraints>
<!-- Default 35GB for binary packages -->
<overwrite>
<conditions>
<package>kernel-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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:kernel-syzkaller</package>
</conditions>
<hardware>
<physicalmemory>
<size unit="G">8</size>
</physicalmemory>
</hardware>
</overwrite>
<!-- 8GB for kernel-source -->
<overwrite>
<conditions>
<package>kernel-source</package>
</conditions>
<hardware>
<disk>
<size unit="G">8</size>
</disk>
</hardware>
<hostlabel exclude="true">SLOW_DISK</hostlabel>
</overwrite>
<!-- 4GB for kernel-docs -->
<overwrite>
<conditions>
<package>kernel-docs</package>
<package>kernel-source:kernel-docs</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-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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-64kb</package>
<package>kernel-source:kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-source:kernel-debug</package>
<package>kernel-default</package>
<package>kernel-source:kernel-default</package>
<package>kernel-kvmsmall</package>
<package>kernel-source:kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-source:kernel-lpae</package>
<package>kernel-pae</package>
<package>kernel-source:kernel-pae</package>
<package>kernel-vanilla</package>
<package>kernel-source:kernel-vanilla</package>
<package>kernel-zfcpdump</package>
<package>kernel-source:kernel-zfcpdump</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: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:kernel-obs-qa-xen</package>
</conditions>
<sandbox>xen</sandbox>
</overwrite>
</constraints>

18
_multibuild Normal file
View File

@ -0,0 +1,18 @@
<multibuild>
<package>dtb-aarch64</package>
<package>dtb-armv6l</package>
<package>dtb-armv7l</package>
<package>dtb-riscv64</package>
<package>kernel-64kb</package>
<package>kernel-debug</package>
<package>kernel-default</package>
<package>kernel-docs</package>
<package>kernel-kvmsmall</package>
<package>kernel-lpae</package>
<package>kernel-obs-build</package>
<package>kernel-obs-qa</package>
<package>kernel-pae</package>
<package>kernel-syms</package>
<package>kernel-vanilla</package>
<package>kernel-zfcpdump</package>
</multibuild>

View File

@ -38,7 +38,7 @@ fi
echo "set -ex" echo "set -ex"
"$DIR"/guards "$@" <"$series" | \ "$DIR"/guards "$@" <"$series" | \
if $vanilla; then if $vanilla; then
egrep '^patches\.(kernel\.org|rpmify)/' sed -rn '/^patches\.(kernel\.org|rpmify)\//p'
else else
cat cat
fi |\ fi |\

View File

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/bash
############################################################################# #############################################################################
# Copyright (c) 2003-2005,2009 Novell, Inc. # Copyright (c) 2003-2005,2009 Novell, Inc.
# All Rights Reserved. # Copyright (c) 2010-2022 SUSE LLC
# #
# This program is free software; you can redistribute it and/or # 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 # modify it under the terms of version 2 of the GNU General Public License as
@ -14,25 +14,24 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, contact Novell, Inc. # along with this program; if not, contact https://www.suse.com/source-code/
# #
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
############################################################################# #############################################################################
# With --list, list all known architectures, otherwise print the generic # With --list, list all known architectures, otherwise print the generic
# name for this architecture (or the one specified on command line). # name for this architecture (or the one specified on command line).
if [ "$1" = "--list" ]; then if [ "$1" = "--list" ]; then
# List all known architectures # List all known architectures
echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc armv5tel armv7hl arm64 echo i386 mips{,64} sparc{,64} ppc{,64,64le} s390{,x} ia64 x86_64 alpha parisc armv6hl armv7hl arm64 riscv64
exit 0 exit 0
fi fi
if [ -n "$1" ]; then if [ -n "$1" ]; then
ARCH="$1" ARCH="$1"
else else
ARCH="`arch`" ARCH="$(arch)"
fi fi
case "$ARCH" in case "$ARCH" in
# from rpm --eval '%ix86' # from rpm --eval '%ix86'

View File

@ -1,9 +1,53 @@
#! /bin/bash #! /bin/bash
# lines 4 contains a timestamp... # 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_HAS_[A-Z0-9_]*'
'AS_VERSION'
'AS_WRUSS' # x86_32
'BUILTIN_RETURN_ADDRESS_STRIPS_PAC'
'CC_CAN_[A-Z_]*'
'CC_HAS_[A-Z_]*'
'CC_HAVE_[A-Z_]*'
'CC_VERSION_TEXT'
'DYNAMIC_SIGFRAME'
'FTRACE_MCOUNT_USE_[A-Z_]*'
'GCC_ASM_GOTO_OUTPUT_BROKEN'
'GCC_ASM_GOTO_OUTPUT_WORKAROUND'
'GCC_VERSION'
'G*CC[0-9]*_NO_[A-Z_]*'
'HAVE_[A-Z]*_COMPILER'
'HAVE_RUST'
'HAVE_SHADOW_CALL_STACK'
'LD_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_]*'
)
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="$( differences="$(
diff -bU0 <(sed -e '/^# .* is not set$/p' -e '/^$\|^#/d' "$1" | sort) \ diff -bU0 <(sed "${SED_ARGS[@]}" "$1" | sort) \
<(sed -e '/^# .* is not set$/p' -e '/^$\|^#/d' "$2" | sort) \ <(sed "${SED_ARGS[@]}" "$2" | sort) \
| grep '^[-+][^-+]' | grep '^[-+][^-+]'
)" || true )" || true
if [ -n "$differences" ]; then if [ -n "$differences" ]; then

13
check-module-license Normal file
View 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

View File

@ -1,36 +0,0 @@
#! /bin/sh
sourcedir=$1
modpath=$2
# Check for modules not listed in supported.conf: First, for each module
# in the list, set mod_$module=1
for module in $($sourcedir/guards --list < $sourcedir/supported.conf \
| sed -e 's,.*/,,'); do
m=${module##*/}
m=${m%.ko}
eval mod_${m//-/_}=1
done
# Check if any installed module was not listed
status=
cd $modpath
for module in $(find . -name '*.ko' | sort); do
case "$module" in
./kernel/drivers/staging/* | ./kernel/Documentation/*)
continue ;;
esac
module=${module%.ko}
m=${module##*/}
m=${m//-/_}
m="mod_$m"
if [ -z "${!m}" ]; then
if [ -z "$status" ]; then
echo "Modules not listed in supported.conf:"
status=1
fi
echo ${module#./}
fi
done
exit $status

15
compress-vmlinux.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -x
# Once the brp script is reasonably widespread, we will remove the specfile
# hack and this script
if test -x /usr/lib/rpm/brp-suse.d/brp-99-compress-vmlinux; then
exit 0
fi
vmlinux=$1
if test -e "$vmlinux" -a -e "$vmlinux.gz"; then
# Deliberately not using gzip -n; the vmlinux image has a predictable
# timestamp (bnc#880848#c20)
gzip -k -9 -f "$vmlinux"
fi

View File

@ -40,7 +40,7 @@ warned=false
while read patch; do while read patch; do
dir=${patch%/*} dir=${patch%/*}
for p in "${path[@]}"; do for p in "${path[@]}"; do
if test -d "$p/$dir"; then if test -e "$p/$patch"; then
echo "$p/$patch" echo "$p/$patch"
continue 2 continue 2
fi fi
@ -64,13 +64,13 @@ done >"$series" < <($(dirname $0)/guards $EXTRA_SYMBOLS <series.conf)
# Parse all the changes to KERNELRELEASE out of all patches and # Parse all the changes to KERNELRELEASE out of all patches and
# convert them to shell code that can be evaluated. Evaluate it. # convert them to shell code that can be evaluated. Evaluate it.
eval "$( eval "$( {
<"$series" xargs awk ' <"$series" xargs awk '
/^--- |^\+\+\+ / \ /^--- |^\+\+\+ / \
{ M = match($2, /^[^\/]+\/Makefile( \t|$)/) } { M = match($2, /^[^\/]+\/Makefile( \t|$)/) }
M && /^+(VERSION|PATCHLEVEL|SUBLEVEL|EXTRAVERSION)/ \ M && /^+(VERSION|PATCHLEVEL|SUBLEVEL|EXTRAVERSION)/ \
{ print } { print }
' \ ' || echo exit 1 ; } \
| sed -e 's,^+,,' -e 's, *= *\(.*\),="\1",' | sed -e 's,^+,,' -e 's, *= *\(.*\),="\1",'
)" )"

File diff suppressed because it is too large Load Diff

View File

@ -8,52 +8,37 @@
# kernel-binary and kernel-source rely on this # kernel-binary and kernel-source rely on this
# #
+i386 i386/default
+i386 i386/desktop
+i386 i386/pae
+i386 -syms i386/debug
+i386 i386/xen
+i386 -syms i386/ec2
+i386 i386/vanilla
+i386 -syms i386/trace
+ia64 ia64/default
+ia64 -syms ia64/debug
+ia64 ia64/vanilla
+ia64 -syms ia64/trace
+x86_64 x86_64/default +x86_64 x86_64/default
+x86_64 x86_64/desktop
+x86_64 x86_64/xen
+x86_64 -syms x86_64/ec2
+x86_64 -syms x86_64/debug +x86_64 -syms x86_64/debug
- x86_64/syzkaller
+x86_64 x86_64/vanilla +x86_64 x86_64/vanilla
+x86_64 -syms x86_64/trace +x86_64 -syms x86_64/kvmsmall
+ppc ppc/default +i386 i386/pae
+ppc ppc/vanilla +i386 i386/default
+ppc64 ppc64/default +i386 -syms i386/debug
+ppc64 -syms ppc64/trace +i386 i386/vanilla
+ppc64 -syms ppc64/debug
+ppc64 ppc64/vanilla +ppc64le ppc64le/default
+ppc64le -syms ppc64le/debug
+ppc64le ppc64le/vanilla
+ppc64le -syms ppc64le/kvmsmall
# ARM architectures # ARM architectures
+armv5tel armv5tel/versatile +armv6hl armv6hl/default
+armv6hl armv6hl/vanilla
+armv7hl armv7hl/default +armv7hl armv7hl/default
+armv7hl armv7hl/imx51 +armv7hl armv7hl/vanilla
+armv7hl armv7hl/omap2plus +armv7hl armv7hl/lpae
+armv7hl armv7hl/u8500
+armv7hl armv7hl/cubox
+armv7hl armv7hl/exynos
+arm64 arm64/default +arm64 arm64/default
+arm64 -syms arm64/debug
+arm64 arm64/64kb
+arm64 arm64/vanilla
+arm64 -syms arm64/kvmsmall
+s390 s390/s390
+s390 -syms s390/trace
+s390 s390/vanilla
+s390x s390x/default +s390x s390x/default
+s390x -syms s390x/trace
+s390x s390x/vanilla +s390x s390x/vanilla
+s390x -syms s390x/zfcpdump
# Maintained by jengelh +riscv64 riscv64/default
# +sparc64 sparc64/default +riscv64 riscv64/vanilla
# +sparc64 -syms sparc64/net

View File

@ -1,9 +1,29 @@
# The version of the main tarball to use # The version of the main tarball to use
SRCVERSION=3.8 SRCVERSION=6.11
# variant of the kernel-source package, either empty or "-rt" # variant of the kernel-source package, either empty or "-rt"
VARIANT= VARIANT=
# 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 # buildservice projects to build the kernel against
OBS_PROJECT=openSUSE:Factory OBS_PROJECT=openSUSE:Factory
OBS_PROJECT_ARM=openSUSE:Factory:ARM OBS_PROJECT_ARM=openSUSE:Factory:ARM
IBS_PROJECT=SUSE:Factory:Head OBS_PROJECT_LEGACYX86=openSUSE:Factory:LegacyX86
IBS_PROJECT_ARM=Devel:ARM:Factory OBS_PROJECT_PPC=openSUSE:Factory:PowerPC
OBS_PROJECT_RISCV=openSUSE:Factory:RISCV
OBS_PROJECT_S390=openSUSE:Factory:zSystems
# 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

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:06cc1ea73652adeedd293d43813ede21a530a15c6494c0c8e74755a91b95474c oid sha256:cf4e7d8c912fa860d9948e74179ef04aa3ca647250dfa5b1b9a553c7ed78d4c6
size 312899 size 300368

View File

@ -1,60 +0,0 @@
#!/usr/bin/perl
#
# Merge two kernel configs, eliminating duplicated assignments.
# TODO:
# support for #include-style directives in config files, to make the
# kernel configs more maintainable
use strict;
use warnings;
# ( { source => <file> name => ... value => ...}, { comment => ...}, ... )
my @lines;
# references into the @lines array
my %variables;
sub store_var {
my ($file, $line, $name, $value) = @_;
if (exists($variables{$name})) {
if ($variables{$name}->{source} eq $file) {
print STDERR "$file:$line: warning: $name redefined\n";
}
} else {
my $new = {};
push(@lines, $new);
$variables{$name} = $new;
}
$variables{$name}->{source} = $file;
$variables{$name}->{name} = $name;
$variables{$name}->{value} = $value;
}
sub store_comment {
my ($comment) = @_;
push(@lines, { comment => $comment });
}
while (<>) {
chomp;
if (/^CONFIG_(\w+)=(.*)/) {
store_var($ARGV, $., $1, $2);
} elsif (/^# CONFIG_(\w+) is not set/) {
store_var($ARGV, $., $1, 'n');
} elsif (/^$|^#/) {
store_comment($_);
} else {
print STDERR "$ARGV:$.: warning: ignoring unknown line\n";
}
}
for my $line (@lines) {
if (exists($line->{comment})) {
print "$line->{comment}\n";
} elsif ($line->{value} eq 'n') {
print "# CONFIG_$line->{name} is not set\n";
} else {
print "CONFIG_$line->{name}=$line->{value}\n";
}
}

184
constraints.in Normal file
View File

@ -0,0 +1,184 @@
<constraints>
<!-- Default 35GB for binary packages -->
<overwrite>
<conditions>
@BINARY_PACKAGES_XML@
</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@VARIANT@:kernel-syzkaller</package>
</conditions>
<hardware>
<physicalmemory>
<size unit="G">8</size>
</physicalmemory>
</hardware>
</overwrite>
<!-- 8GB for kernel-source@VARIANT@ -->
<overwrite>
<conditions>
<package>kernel-source@VARIANT@</package>
</conditions>
<hardware>
<disk>
<size unit="G">8</size>
</disk>
</hardware>
<hostlabel exclude="true">SLOW_DISK</hostlabel>
</overwrite>
<!-- 4GB for kernel-docs@VARIANT@ -->
<overwrite>
<conditions>
<package>kernel-docs@VARIANT@</package>
<package>kernel-source@VARIANT@:kernel-docs@VARIANT@</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>
@BINARY_PACKAGES_XML@
</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>
@BINARY_PACKAGES_XML@
</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>
@BINARY_PACKAGES_XML@
</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>
@BINARY_PACKAGES_XML@
</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>
@BINARY_PACKAGES_XML@
</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>
@BINARY_PACKAGES_XML@
</conditions>
<hardware>
<disk>
<size unit="G">45</size>
</disk>
</hardware>
</overwrite>
<!-- 52GB for binary packages on riscv64-->
<overwrite>
<conditions>
<arch>riscv64</arch>
@BINARY_PACKAGES_XML@
</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@VARIANT@: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@VARIANT@:kernel-obs-qa-xen</package>
</conditions>
<sandbox>xen</sandbox>
</overwrite>
</constraints>

View File

@ -1,16 +0,0 @@
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"
}
release="@KERNELRELEASE@@SRCVARIANT@-obj"
arch_flavor="@CPU_ARCH_FLAVOR@"
relink ../../linux-$release/"$arch_flavor" /usr/src/linux-obj/"$arch_flavor"

View File

@ -1,4 +0,0 @@
# handle update from an older kernel-source with linux-obj as symlink
if [ -h /usr/src/linux-obj ]; then
rm -vf /usr/src/linux-obj
fi

165739
dtb-aarch64.changes Normal file

File diff suppressed because it is too large Load Diff

868
dtb-aarch64.spec Normal file
View File

@ -0,0 +1,868 @@
#
# spec file for package dtb-aarch64
#
# Copyright (c) 2024 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.11
%define patchversion 6.11.8
%define variant %{nil}
%include %_sourcedir/kernel-spec-macros
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb,check-module-license,klp-symbols,splitflist,mergedep,moddep,modflist,kernel-subpackage-build})
Name: dtb-aarch64
Version: 6.11.8
%if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0
%endif
Summary: Device Tree files for $MACHINES
License: GPL-2.0-only
Group: System/Boot
URL: https://www.kernel.org/
BuildRequires: cpp
BuildRequires: dtc >= 1.4.3
BuildRequires: xz
%if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
ExclusiveArch: aarch64
%else
ExclusiveArch: do_not_build
%endif
%define dtbdir /boot/dtb-%kernelrelease
Source0: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%srcversion.tar.xz
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
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source57: kernel-cert-subpackage
Source58: constraints.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-flavors
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
Source70: kernel-obs-build.spec.in
Source71: kernel-obs-qa.spec.in
Source72: compress-vmlinux.sh
Source73: dtb.spec.in.in
Source74: mkspec-dtb
Source75: release-projects
Source76: check-module-license
Source77: klp-symbols
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
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 3
NoSource: 14
NoSource: 16
NoSource: 17
NoSource: 19
NoSource: 20
NoSource: 21
NoSource: 23
NoSource: 33
NoSource: 35
NoSource: 36
NoSource: 37
NoSource: 38
NoSource: 40
NoSource: 46
NoSource: 47
NoSource: 48
NoSource: 49
NoSource: 50
NoSource: 51
NoSource: 52
NoSource: 53
NoSource: 54
NoSource: 55
NoSource: 56
NoSource: 57
NoSource: 58
NoSource: 60
NoSource: 61
NoSource: 62
NoSource: 63
NoSource: 64
NoSource: 65
NoSource: 67
NoSource: 68
NoSource: 69
NoSource: 70
NoSource: 71
NoSource: 72
NoSource: 73
NoSource: 74
NoSource: 75
NoSource: 76
NoSource: 77
NoSource: 78
NoSource: 79
NoSource: 80
NoSource: 81
NoSource: 82
NoSource: 83
NoSource: 84
NoSource: 85
NoSource: 86
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 113
NoSource: 114
NoSource: 120
NoSource: 121
Requires: kernel = %version
%description
Device Tree files for $MACHINES.
%package -n dtb-allwinner
Summary: Allwinner based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-allwinner
Device Tree files for Allwinner based arm64 systems.
%post -n dtb-allwinner
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-allwinner -f dtb-allwinner.list
%else
%files -n dtb-allwinner
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/allwinner
%{dtbdir}/allwinner/*.dtb
%package -n dtb-altera
Summary: Altera based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-altera
Device Tree files for Altera based arm64 systems.
%post -n dtb-altera
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-altera -f dtb-altera.list
%else
%files -n dtb-altera
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/altera
%{dtbdir}/altera/*.dtb
%package -n dtb-amazon
Summary: Amazon based arm64 systems
Group: System/Boot
Provides: dtb-al = %version
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-amazon
Device Tree files for Amazon based arm64 systems.
%post -n dtb-amazon
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-amazon -f dtb-amazon.list
%else
%files -n dtb-amazon
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/amazon
%{dtbdir}/amazon/*.dtb
%package -n dtb-amd
Summary: AMD based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-amd
Device Tree files for AMD based arm64 systems.
%post -n dtb-amd
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-amd -f dtb-amd.list
%else
%files -n dtb-amd
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/amd
%{dtbdir}/amd/*.dtb
%package -n dtb-amlogic
Summary: Amlogic based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-amlogic
Device Tree files for Amlogic based arm64 systems.
%post -n dtb-amlogic
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-amlogic -f dtb-amlogic.list
%else
%files -n dtb-amlogic
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/amlogic
%{dtbdir}/amlogic/*.dtb
%package -n dtb-apm
Summary: AppliedMicro based arm64 systems
Group: System/Boot
Provides: dtb-apm-mustang = %version
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-apm
Device Tree files for AppliedMicro based arm64 systems.
%post -n dtb-apm
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-apm -f dtb-apm.list
%else
%files -n dtb-apm
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/apm
%{dtbdir}/apm/*.dtb
%package -n dtb-apple
Summary: Apple SOC based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-apple
Device Tree files for Apple SOC based arm64 systems.
%post -n dtb-apple
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-apple -f dtb-apple.list
%else
%files -n dtb-apple
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/apple
%{dtbdir}/apple/*.dtb
%package -n dtb-arm
Summary: ARM Ltd. based arm64 systems
Group: System/Boot
Provides: dtb-foundation-v8 = %version
Provides: dtb-rtsm_ve-aemv8a = %version
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-arm
Device Tree files for ARM Ltd. based arm64 systems.
%post -n dtb-arm
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-arm -f dtb-arm.list
%else
%files -n dtb-arm
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/arm
%{dtbdir}/arm/*.dtb
%package -n dtb-broadcom
Summary: Broadcom based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-broadcom
Device Tree files for Broadcom based arm64 systems.
%post -n dtb-broadcom
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-broadcom -f dtb-broadcom.list
%else
%files -n dtb-broadcom
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/broadcom
%{dtbdir}/broadcom/*.dtb
%package -n dtb-cavium
Summary: Cavium based arm64 systems
Group: System/Boot
Provides: dtb-thunder-88xx = %version
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-cavium
Device Tree files for Cavium based arm64 systems.
%post -n dtb-cavium
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-cavium -f dtb-cavium.list
%else
%files -n dtb-cavium
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/cavium
%{dtbdir}/cavium/*.dtb
%package -n dtb-exynos
Summary: Samsung Exynos based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-exynos
Device Tree files for Samsung Exynos based arm64 systems.
%post -n dtb-exynos
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-exynos -f dtb-exynos.list
%else
%files -n dtb-exynos
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/exynos
%{dtbdir}/exynos/*.dtb
%package -n dtb-freescale
Summary: NXP (Freescale) based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-freescale
Device Tree files for NXP (Freescale) based arm64 systems.
%post -n dtb-freescale
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-freescale -f dtb-freescale.list
%else
%files -n dtb-freescale
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/freescale
%{dtbdir}/freescale/*.dtb
%package -n dtb-hisilicon
Summary: HiSilicon based arm64 systems
Group: System/Boot
Provides: dtb-hisilicon64 = %version
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-hisilicon
Device Tree files for HiSilicon based arm64 systems.
%post -n dtb-hisilicon
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-hisilicon -f dtb-hisilicon.list
%else
%files -n dtb-hisilicon
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/hisilicon
%{dtbdir}/hisilicon/*.dtb
%package -n dtb-lg
Summary: LG based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-lg
Device Tree files for LG based arm64 systems.
%post -n dtb-lg
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-lg -f dtb-lg.list
%else
%files -n dtb-lg
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/lg
%{dtbdir}/lg/*.dtb
%package -n dtb-marvell
Summary: Marvell based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-marvell
Device Tree files for Marvell based arm64 systems.
%post -n dtb-marvell
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-marvell -f dtb-marvell.list
%else
%files -n dtb-marvell
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/marvell
%{dtbdir}/marvell/*.dtb
%package -n dtb-mediatek
Summary: MediaTek based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-mediatek
Device Tree files for MediaTek based arm64 systems.
%post -n dtb-mediatek
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-mediatek -f dtb-mediatek.list
%else
%files -n dtb-mediatek
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/mediatek
%{dtbdir}/mediatek/*.dtb
%package -n dtb-nvidia
Summary: Nvidia based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-nvidia
Device Tree files for Nvidia based arm64 systems.
%post -n dtb-nvidia
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-nvidia -f dtb-nvidia.list
%else
%files -n dtb-nvidia
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/nvidia
%{dtbdir}/nvidia/*.dtb
%package -n dtb-qcom
Summary: Qualcomm based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-qcom
Device Tree files for Qualcomm based arm64 systems.
%post -n dtb-qcom
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-qcom -f dtb-qcom.list
%else
%files -n dtb-qcom
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/qcom
%{dtbdir}/qcom/*.dtb
%package -n dtb-renesas
Summary: Renesas based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-renesas
Device Tree files for Renesas based arm64 systems.
%post -n dtb-renesas
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-renesas -f dtb-renesas.list
%else
%files -n dtb-renesas
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/renesas
%{dtbdir}/renesas/*.dtb
%package -n dtb-rockchip
Summary: Rockchip based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-rockchip
Device Tree files for Rockchip based arm64 systems.
%post -n dtb-rockchip
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-rockchip -f dtb-rockchip.list
%else
%files -n dtb-rockchip
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/rockchip
%{dtbdir}/rockchip/*.dtb
%package -n dtb-socionext
Summary: Socionext based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-socionext
Device Tree files for Socionext based arm64 systems.
%post -n dtb-socionext
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-socionext -f dtb-socionext.list
%else
%files -n dtb-socionext
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/socionext
%{dtbdir}/socionext/*.dtb
%package -n dtb-sprd
Summary: Spreadtrum based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-sprd
Device Tree files for Spreadtrum based arm64 systems.
%post -n dtb-sprd
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-sprd -f dtb-sprd.list
%else
%files -n dtb-sprd
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/sprd
%{dtbdir}/sprd/*.dtb
%package -n dtb-xilinx
Summary: Xilinx based arm64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-xilinx
Device Tree files for Xilinx based arm64 systems.
%post -n dtb-xilinx
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-xilinx -f dtb-xilinx.list
%else
%files -n dtb-xilinx
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/xilinx
%{dtbdir}/xilinx/*.dtb
%prep
# Unpack all sources and patches
%setup -q -c -T -a 0 -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
cd linux-%srcversion
%_sourcedir/apply-patches %_sourcedir/series.conf ..
%build
source=linux-%srcversion
cp $source/COPYING .
SRCDIR=$PWD/$source
mkdir pp
PPDIR=$PWD/pp
export DTC_FLAGS="-R 4 -p 0x1000"
DTC_FLAGS="$DTC_FLAGS -@"
cd $source/arch/arm64/boot/dts
for dts in allwinner/*.dts altera/*.dts amazon/*.dts amd/*.dts amlogic/*.dts apm/*.dts apple/*.dts arm/*.dts broadcom/*.dts cavium/*.dts exynos/*.dts freescale/*.dts hisilicon/*.dts lg/*.dts marvell/*.dts mediatek/*.dts nvidia/*.dts qcom/*.dts renesas/*.dts rockchip/*.dts socionext/*.dts sprd/*.dts xilinx/*.dts ; do
target=${dts%*.dts}
mkdir -p $PPDIR/$(dirname $target)
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $target.dts -o $PPDIR/$target.dts
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $target) -o $PPDIR/$target.dtb $PPDIR/$target.dts
done
%install
cd pp
for dts in allwinner/*.dts altera/*.dts amazon/*.dts amd/*.dts amlogic/*.dts apm/*.dts apple/*.dts arm/*.dts broadcom/*.dts cavium/*.dts exynos/*.dts freescale/*.dts hisilicon/*.dts lg/*.dts marvell/*.dts mediatek/*.dts nvidia/*.dts qcom/*.dts renesas/*.dts rockchip/*.dts socionext/*.dts sprd/*.dts xilinx/*.dts ; do
target=${dts%*.dts}
install -m 755 -d %{buildroot}%{dtbdir}/$(dirname $target)
# install -m 644 COPYING %{buildroot}%{dtbdir}/$(dirname $target)
install -m 644 $target.dtb %{buildroot}%{dtbdir}/$(dirname $target)
%ifarch %arm aarch64 riscv64
# HACK: work around U-Boot ignoring vendor dir
baselink=%{dtbdir}/$(basename $target).dtb
ln -s $target.dtb %{buildroot}$baselink
%ifarch %arm
case $dts in
esac
echo $baselink >> ../$pkgname.list
%else
vendordir=$(basename $(dirname $target))
echo $baselink >> ../dtb-$vendordir.list
%endif
%endif
done
cd -
%changelog

165739
dtb-armv6l.changes Normal file

File diff suppressed because it is too large Load Diff

269
dtb-armv6l.spec Normal file
View File

@ -0,0 +1,269 @@
#
# spec file for package dtb-armv6l
#
# Copyright (c) 2024 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.11
%define patchversion 6.11.8
%define variant %{nil}
%include %_sourcedir/kernel-spec-macros
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb,check-module-license,klp-symbols,splitflist,mergedep,moddep,modflist,kernel-subpackage-build})
Name: dtb-armv6l
Version: 6.11.8
%if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0
%endif
Summary: Device Tree files for $MACHINES
License: GPL-2.0-only
Group: System/Boot
URL: https://www.kernel.org/
BuildRequires: cpp
BuildRequires: dtc >= 1.4.3
BuildRequires: xz
%if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
ExclusiveArch: armv6l armv6hl
%else
ExclusiveArch: do_not_build
%endif
%define dtbdir /boot/dtb-%kernelrelease
Source0: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%srcversion.tar.xz
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
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source57: kernel-cert-subpackage
Source58: constraints.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-flavors
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
Source70: kernel-obs-build.spec.in
Source71: kernel-obs-qa.spec.in
Source72: compress-vmlinux.sh
Source73: dtb.spec.in.in
Source74: mkspec-dtb
Source75: release-projects
Source76: check-module-license
Source77: klp-symbols
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
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 3
NoSource: 14
NoSource: 16
NoSource: 17
NoSource: 19
NoSource: 20
NoSource: 21
NoSource: 23
NoSource: 33
NoSource: 35
NoSource: 36
NoSource: 37
NoSource: 38
NoSource: 40
NoSource: 46
NoSource: 47
NoSource: 48
NoSource: 49
NoSource: 50
NoSource: 51
NoSource: 52
NoSource: 53
NoSource: 54
NoSource: 55
NoSource: 56
NoSource: 57
NoSource: 58
NoSource: 60
NoSource: 61
NoSource: 62
NoSource: 63
NoSource: 64
NoSource: 65
NoSource: 67
NoSource: 68
NoSource: 69
NoSource: 70
NoSource: 71
NoSource: 72
NoSource: 73
NoSource: 74
NoSource: 75
NoSource: 76
NoSource: 77
NoSource: 78
NoSource: 79
NoSource: 80
NoSource: 81
NoSource: 82
NoSource: 83
NoSource: 84
NoSource: 85
NoSource: 86
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 113
NoSource: 114
NoSource: 120
NoSource: 121
Requires: kernel = %version
%description
Device Tree files for $MACHINES.
%package -n dtb-bcm2835
Summary: Raspberry Pi 1 (A+, B, B+)
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-bcm2835
Device Tree files for Raspberry Pi 1 (A+, B, B+).
%post -n dtb-bcm2835
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-bcm2835 -f dtb-bcm2835.list
%else
%files -n dtb-bcm2835
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/broadcom
%{dtbdir}/broadcom/bcm2835*.dtb
%prep
# Unpack all sources and patches
%setup -q -c -T -a 0 -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
cd linux-%srcversion
%_sourcedir/apply-patches %_sourcedir/series.conf ..
%build
source=linux-%srcversion
cp $source/COPYING .
SRCDIR=$PWD/$source
mkdir pp
PPDIR=$PWD/pp
export DTC_FLAGS="-R 4 -p 0x1000"
DTC_FLAGS="$DTC_FLAGS -@"
cd $source/arch/arm/boot/dts
for dts in broadcom/bcm2835*.dts ; do
target=${dts%*.dts}
mkdir -p $PPDIR/$(dirname $target)
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $target.dts -o $PPDIR/$target.dts
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $target) -o $PPDIR/$target.dtb $PPDIR/$target.dts
done
%install
cd pp
for dts in broadcom/bcm2835*.dts ; do
target=${dts%*.dts}
install -m 755 -d %{buildroot}%{dtbdir}/$(dirname $target)
# install -m 644 COPYING %{buildroot}%{dtbdir}/$(dirname $target)
install -m 644 $target.dtb %{buildroot}%{dtbdir}/$(dirname $target)
%ifarch %arm aarch64 riscv64
# HACK: work around U-Boot ignoring vendor dir
baselink=%{dtbdir}/$(basename $target).dtb
ln -s $target.dtb %{buildroot}$baselink
%ifarch %arm
case $dts in
broadcom/bcm2835*.dts) pkgname=dtb-bcm2835;;
esac
echo $baselink >> ../$pkgname.list
%else
vendordir=$(basename $(dirname $target))
echo $baselink >> ../dtb-$vendordir.list
%endif
%endif
done
cd -
%changelog

165739
dtb-armv7l.changes Normal file

File diff suppressed because it is too large Load Diff

1460
dtb-armv7l.spec Normal file

File diff suppressed because it is too large Load Diff

165739
dtb-riscv64.changes Normal file

File diff suppressed because it is too large Load Diff

430
dtb-riscv64.spec Normal file
View File

@ -0,0 +1,430 @@
#
# spec file for package dtb-riscv64
#
# Copyright (c) 2024 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.11
%define patchversion 6.11.8
%define variant %{nil}
%include %_sourcedir/kernel-spec-macros
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb,check-module-license,klp-symbols,splitflist,mergedep,moddep,modflist,kernel-subpackage-build})
Name: dtb-riscv64
Version: 6.11.8
%if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0
%endif
Summary: Device Tree files for $MACHINES
License: GPL-2.0-only
Group: System/Boot
URL: https://www.kernel.org/
BuildRequires: cpp
BuildRequires: dtc >= 1.4.3
BuildRequires: xz
%if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
ExclusiveArch: riscv64
%else
ExclusiveArch: do_not_build
%endif
%define dtbdir /boot/dtb-%kernelrelease
Source0: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%srcversion.tar.xz
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
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source57: kernel-cert-subpackage
Source58: constraints.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-flavors
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
Source70: kernel-obs-build.spec.in
Source71: kernel-obs-qa.spec.in
Source72: compress-vmlinux.sh
Source73: dtb.spec.in.in
Source74: mkspec-dtb
Source75: release-projects
Source76: check-module-license
Source77: klp-symbols
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
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 3
NoSource: 14
NoSource: 16
NoSource: 17
NoSource: 19
NoSource: 20
NoSource: 21
NoSource: 23
NoSource: 33
NoSource: 35
NoSource: 36
NoSource: 37
NoSource: 38
NoSource: 40
NoSource: 46
NoSource: 47
NoSource: 48
NoSource: 49
NoSource: 50
NoSource: 51
NoSource: 52
NoSource: 53
NoSource: 54
NoSource: 55
NoSource: 56
NoSource: 57
NoSource: 58
NoSource: 60
NoSource: 61
NoSource: 62
NoSource: 63
NoSource: 64
NoSource: 65
NoSource: 67
NoSource: 68
NoSource: 69
NoSource: 70
NoSource: 71
NoSource: 72
NoSource: 73
NoSource: 74
NoSource: 75
NoSource: 76
NoSource: 77
NoSource: 78
NoSource: 79
NoSource: 80
NoSource: 81
NoSource: 82
NoSource: 83
NoSource: 84
NoSource: 85
NoSource: 86
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 113
NoSource: 114
NoSource: 120
NoSource: 121
Requires: kernel = %version
%description
Device Tree files for $MACHINES.
%package -n dtb-allwinner
Summary: Allwinner based riscv64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-allwinner
Device Tree files for Allwinner based riscv64 systems.
%post -n dtb-allwinner
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-allwinner -f dtb-allwinner.list
%else
%files -n dtb-allwinner
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/allwinner
%{dtbdir}/allwinner/*.dtb
%package -n dtb-microchip
Summary: Microchip based riscv64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-microchip
Device Tree files for Microchip based riscv64 systems.
%post -n dtb-microchip
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-microchip -f dtb-microchip.list
%else
%files -n dtb-microchip
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/microchip
%{dtbdir}/microchip/*.dtb
%package -n dtb-renesas
Summary: Renesas based riscv64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-renesas
Device Tree files for Renesas based riscv64 systems.
%post -n dtb-renesas
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-renesas -f dtb-renesas.list
%else
%files -n dtb-renesas
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/renesas
%{dtbdir}/renesas/*.dtb
%package -n dtb-sifive
Summary: SiFive based riscv64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-sifive
Device Tree files for SiFive based riscv64 systems.
%post -n dtb-sifive
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-sifive -f dtb-sifive.list
%else
%files -n dtb-sifive
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/sifive
%{dtbdir}/sifive/*.dtb
%package -n dtb-sophgo
Summary: Sophgo based riscv64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-sophgo
Device Tree files for Sophgo based riscv64 systems.
%post -n dtb-sophgo
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-sophgo -f dtb-sophgo.list
%else
%files -n dtb-sophgo
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/sophgo
%{dtbdir}/sophgo/*.dtb
%package -n dtb-starfive
Summary: StarFive based riscv64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-starfive
Device Tree files for StarFive based riscv64 systems.
%post -n dtb-starfive
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-starfive -f dtb-starfive.list
%else
%files -n dtb-starfive
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/starfive
%{dtbdir}/starfive/*.dtb
%package -n dtb-thead
Summary: T-HEAD based riscv64 systems
Group: System/Boot
Provides: multiversion(dtb)
Requires(post): coreutils
%description -n dtb-thead
Device Tree files for T-HEAD based riscv64 systems.
%post -n dtb-thead
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%kernelrelease dtb
%ifarch %arm aarch64 riscv64
%files -n dtb-thead -f dtb-thead.list
%else
%files -n dtb-thead
%endif
%defattr(-,root,root)
%ghost /boot/dtb
%dir %{dtbdir}
%dir %{dtbdir}/thead
%{dtbdir}/thead/*.dtb
%prep
# Unpack all sources and patches
%setup -q -c -T -a 0 -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
cd linux-%srcversion
%_sourcedir/apply-patches %_sourcedir/series.conf ..
%build
source=linux-%srcversion
cp $source/COPYING .
SRCDIR=$PWD/$source
mkdir pp
PPDIR=$PWD/pp
export DTC_FLAGS="-R 4 -p 0x1000"
DTC_FLAGS="$DTC_FLAGS -@"
cd $source/arch/riscv/boot/dts
for dts in allwinner/*.dts microchip/*.dts renesas/*.dts sifive/*.dts sophgo/*.dts starfive/*.dts thead/*.dts ; do
target=${dts%*.dts}
mkdir -p $PPDIR/$(dirname $target)
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $target.dts -o $PPDIR/$target.dts
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $target) -o $PPDIR/$target.dtb $PPDIR/$target.dts
done
%install
cd pp
for dts in allwinner/*.dts microchip/*.dts renesas/*.dts sifive/*.dts sophgo/*.dts starfive/*.dts thead/*.dts ; do
target=${dts%*.dts}
install -m 755 -d %{buildroot}%{dtbdir}/$(dirname $target)
# install -m 644 COPYING %{buildroot}%{dtbdir}/$(dirname $target)
install -m 644 $target.dtb %{buildroot}%{dtbdir}/$(dirname $target)
%ifarch %arm aarch64 riscv64
# HACK: work around U-Boot ignoring vendor dir
baselink=%{dtbdir}/$(basename $target).dtb
ln -s $target.dtb %{buildroot}$baselink
%ifarch %arm
case $dts in
esac
echo $baselink >> ../$pkgname.list
%else
vendordir=$(basename $(dirname $target))
echo $baselink >> ../dtb-$vendordir.list
%endif
%endif
done
cd -
%changelog

104
dtb.spec.in.in Normal file
View File

@ -0,0 +1,104 @@
#
# spec file for package $NAME
#
# Copyright (c) @YEAR@ 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 @SRCVERSION@
%define patchversion @PATCHVERSION@
%define variant @VARIANT@%{nil}
%include %_sourcedir/kernel-spec-macros
%(chmod +x %_sourcedir/{@SCRIPTS@})
Name: $NAME
Version: @RPMVERSION@
%if 0%{?is_kotd}
Release: <RELEASE>.g@COMMIT@
%else
Release: @RELEASE@
%endif
Summary: Device Tree files for $MACHINES
License: GPL-2.0-only
Group: System/Boot
URL: https://www.kernel.org/
BuildRequires: cpp
BuildRequires: dtc >= 1.4.3
BuildRequires: xz
%if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
$ARCH_RESTRICTIONS
%else
ExclusiveArch: do_not_build
%endif
%define dtbdir /boot/dtb-%kernelrelease
@SOURCES@
Requires: kernel = %version
%description
Device Tree files for $MACHINES.
$SUBPKG_DESC
%prep
# Unpack all sources and patches
%setup -q -c -T -a 0 @UNPACK_PATCHES@
cd linux-%srcversion
%_sourcedir/apply-patches %_sourcedir/series.conf ..
%build
source=linux-%srcversion
cp $source/COPYING .
SRCDIR=$PWD/$source
mkdir pp
PPDIR=$PWD/pp
export DTC_FLAGS="-R 4 -p 0x1000"
DTC_FLAGS="$DTC_FLAGS -@"
cd $source/$DTS_folder
for dts in $ALL_SUPPORTED_DTB; do
target=${dts%*.dts}
mkdir -p $PPDIR/$(dirname $target)
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $target.dts -o $PPDIR/$target.dts
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $target) -o $PPDIR/$target.dtb $PPDIR/$target.dts
done
%install
cd pp
for dts in $ALL_SUPPORTED_DTB; do
target=${dts%*.dts}
install -m 755 -d %{buildroot}%{dtbdir}/$(dirname $target)
# install -m 644 COPYING %{buildroot}%{dtbdir}/$(dirname $target)
install -m 644 $target.dtb %{buildroot}%{dtbdir}/$(dirname $target)
%ifarch %arm aarch64 riscv64
# HACK: work around U-Boot ignoring vendor dir
baselink=%{dtbdir}/$(basename $target).dtb
ln -s $target.dtb %{buildroot}$baselink
%ifarch %arm
case $dts in
$SUBPKG_CASE
esac
echo $baselink >> ../$pkgname.list
%else
vendordir=$(basename $(dirname $target))
echo $baselink >> ../dtb-$vendordir.list
%endif
%endif
done
cd -
%changelog

View File

@ -1,18 +0,0 @@
#! /bin/bash
trap 'rm -f "$filelist"' EXIT
filelist=$(mktemp -t ${0##*/}.XXXXXXXXXX)
grep -v '/kernel/drivers/staging/.*\.ko$' >"$filelist"
shopt -s nullglob
# pretend that /boot/vmlinux-* is in the -base package and not in -devel
if grep -q '/boot/System\.map\>' "$filelist"; then
prefix=$(sed -rn 's:(.*)/boot/System\.map\>.*:\1:p; T; q' "$filelist")
for f in "$prefix"/boot/vmlinux*; do
echo "$f" >>"$filelist"
done
else
perl -ni -e 'next if /\/boot\/vmlinux/ && !/\.debug$/; print' "$filelist"
fi
/usr/lib/rpm/find-provides "$@" <"$filelist"

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl #!/usr/bin/perl
use Getopt::Long; use File::Spec;
use Getopt::Long qw(:config no_ignore_case);
use strict; use strict;
&main(); &main();
@ -18,15 +19,26 @@ sub main
&output($dev, $ndev, $dev_output, $ndev_output); &output($dev, $ndev, $dev_output, $ndev_output);
} }
sub rpm_quote_filename
{
# technically should also quote % -> %% " -> \" \ -> \\
return map { "\"$_\"" } @_;
}
sub scan sub scan
{ {
my $loc = shift @_; # 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); my(@dev, @ndev);
foreach $_ (`find "$loc"`) foreach $_ (`find "$loc"`)
{ {
chomp $_; chomp $_;
if (!-f $_) { if (-d $_ && !-l $_) {
# Generate directory list later. # Generate directory list later.
next; next;
} }
@ -34,19 +46,27 @@ sub scan
m{^\Q$loc\E.*/Kconfig} || m{^\Q$loc\E.*/Kconfig} ||
m{^\Q$loc\E.*/Kbuild} || m{^\Q$loc\E.*/Kbuild} ||
m{^\Q$loc\E.*/Makefile} || 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/[^/]+/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/include/[^/]+\b} ||
m{^\Q$loc\E/scripts\b}; m{^\Q$loc\E/scripts\b};
if (substr($_, 0, 1) ne "/") { my $abs_path = rpm_path($_);
# We cannot use an absolute path during find, $is_devel ? push(@dev, $abs_path) : push(@ndev, $abs_path);
# but rpm wants one later.
$_ = "/$_";
}
$is_devel ? push(@dev, $_) : push(@ndev, $_);
} }
push(@dev, &calc_dirs("/$loc", \@dev)); my @dev_dirs = calc_dirs($abs_loc, \@dev);
push(@ndev, &calc_dirs("/$loc", \@ndev)); 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); return (\@dev, \@ndev);
} }
@ -56,15 +76,18 @@ sub calc_dirs
my %dirs; my %dirs;
foreach my $file (@$files) { foreach my $file (@$files) {
my $path = $file; my ($volume,$path,$basename) = File::Spec->splitpath($file);
my @dirs = File::Spec->splitdir($path);
do { do {
$path =~ s{/[^/]+$}{}; # Always create $path from catdir() to avoid ending forward slash
$path = File::Spec->catdir(@dirs);
$dirs{$path} = 1; $dirs{$path} = 1;
pop @dirs;
} while ($path ne $base); } while ($path ne $base);
# This loop also makes sure that $base itself is included. # This loop also makes sure that $base itself is included.
} }
return map { "\%dir $_" } keys %dirs; return keys %dirs;
} }
sub output sub output
@ -80,3 +103,11 @@ sub output
print FH join("\n", @$ndev), "\n"; print FH join("\n", @$ndev), "\n";
close FH; 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");
}

70
guards
View File

@ -1,7 +1,7 @@
#!/usr/bin/perl -w #!/usr/bin/perl -w
############################################################################# ##############################################################################
# Copyright (c) 2003-2007,2009 Novell, Inc. # Copyright (c) 2003-2007,2009 Novell, Inc.
# All Rights Reserved. # Copyright (c) 2010-2022 SUSE LLC
# #
# This program is free software; you can redistribute it and/or # 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 # modify it under the terms of version 2 of the GNU General Public License as
@ -13,10 +13,8 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, contact Novell, Inc. # along with this program; if not, contact https://www.suse.com/source-code/
# #
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
############################################################################# #############################################################################
# #
# Guards: # Guards:
@ -28,7 +26,7 @@
# #
use FileHandle; use FileHandle;
use Getopt::Long; use Getopt::Long qw(:config no_ignore_case);
use strict; use strict;
# Prototypes # Prototypes
@ -36,20 +34,6 @@ sub files_in($$);
sub parse($$); sub parse($$);
sub help(); sub help();
#sub strip_ext($) {
# local ($_) = @_;
# s/\.(diff?|patch)$//;
#}
#sub try_ext($) {
# my ($path) = @_;
# for my $p in (($path, "$path.diff", "$path.dif", "$path.patch")) {
# return $p
# if (-f $p);
# }
# return undef;
#}
sub slashme($) { sub slashme($) {
my ($dir) = @_; my ($dir) = @_;
$dir =~ s#([^/])$#$&/#; # append a slash if necessary $dir =~ s#([^/])$#$&/#; # append a slash if necessary
@ -67,7 +51,18 @@ sub files_in($$) {
my $dh = new FileHandle; my $dh = new FileHandle;
my (@files, $file); 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" : '.' opendir $dh, length("$dir$path") ? "$dir$path" : '.'
or die "$dir$path: $!\n"; or die "$dir$path: $!\n";
while ($file = readdir($dh)) { while ($file = readdir($dh)) {
@ -126,8 +121,8 @@ sub help() {
print "SYNOPSIS: $0 [--prefix=dir] [--path=dir1:dir2:...]\n" . print "SYNOPSIS: $0 [--prefix=dir] [--path=dir1:dir2:...]\n" .
" [--default=0|1] [--check|--list] [--invert-match]\n" . " [--default=0|1] [--check|--list] [--invert-match]\n" .
" [--with-guards] [--config=file] symbol ...\n\n" . " [--with-guards] [--config=file] symbol ...\n\n" .
" (Default values: --path='" . join(':', @path) . "', " . " Defaults: --default=$default\n" .
"--default=$default)\n"; " Use --path=\@<file> to read the list of entries from <file>\n";
exit 0; exit 0;
} }
@ -172,7 +167,7 @@ if ($check) {
my @files; my @files;
foreach (@path) { foreach (@path) {
@files = (@files, files_in($dir, slashme($_))); @files = (@files, files_in($dir, $_));
} }
my %files = map { $_ => 0 } @files; my %files = map { $_ => 0 } @files;
@ -181,7 +176,11 @@ if ($check) {
if (exists $files{$patch}) { if (exists $files{$patch}) {
$files{$patch}++; $files{$patch}++;
} else { } else {
if ($config eq '-') {
print "Not found: $dir$patch\n"; print "Not found: $dir$patch\n";
} else {
print "In $config but not found: $dir$patch\n";
}
$problems++; $problems++;
}}); }});
@ -192,15 +191,21 @@ if ($check) {
next if $ref == 1; next if $ref == 1;
if ($ref == 0) { if ($ref == 0) {
print "Unused: $file\n" if $ref == 0; if ($config eq '-') {
print "Unused: $file\n";
} else {
print "Not in $config: $file\n";
}
$problems++; $problems++;
} }
if ($ref > 1) { if ($ref > 1) {
print "Warning: multiple uses: $file\n" 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... # This is not an error if the entries are mutually exclusive...
} }
} }
exit $problems ? 1 : 0; exit ($problems ? 1 : 0);
} elsif ($list) { } elsif ($list) {
parse($fh, sub { parse($fh, sub {
@ -257,9 +262,8 @@ guards - select from a list of files guarded by conditions
=head1 SYNOPSIS =head1 SYNOPSIS
F<guards> [--prefix=F<dir>] [--path=F<dir1:dir2:...>] [--default=<0|1>] F<guards> [--prefix=F<dir>] [--path=F<dir1:dir2:...>] [--default=<0|1>]
[--check|--list] [--invert-match] [--with-guards] [--config=<file>] [--check|--list] [--invert-match] [--with-guards] [--config=<file>]
I<symbol> ... I<symbol> ...
=head1 DESCRIPTION =head1 DESCRIPTION
@ -293,10 +297,12 @@ 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 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 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. I<--path> option can be used to specify which directory or directories to scan.
Multiple directories are eparated by a colon (C<:>) character. The Multiple directories are separated by a colon (C<:>) character. The
I<--prefix> option specifies the location of the files. 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 independend of any rules. Use I<--invert-match> 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 to list only the excluded patches. Use I<--with-guards> to also include all
inclusion and exclusion rules. inclusion and exclusion rules.

103
kabi.pl
View File

@ -2,13 +2,16 @@
use strict; use strict;
use warnings; use warnings;
use Getopt::Long; use Getopt::Long qw(:config no_ignore_case);
use Data::Dumper; use Data::Dumper;
# ( { sym => regexp, mod => regexp, fail => 0/1 }, ... ) # ( { sym => regexp, mod => regexp, fail => 0/1 }, ... )
my @rules; my @rules;
my ($opt_verbose, $opt_rules); my ($opt_verbose, $opt_rules);
# if Module.symvers also lists namespaces (>=5.4)
my $use_namespaces;
sub load_rules { sub load_rules {
my $file = shift; my $file = shift;
my $errors = 0; my $errors = 0;
@ -33,8 +36,14 @@ sub load_rules {
$pattern =~ s/\*/.*/g; $pattern =~ s/\*/.*/g;
$pattern =~ s/\?/./g; $pattern =~ s/\?/./g;
$pattern =~ s/.*/^$&\$/; $pattern =~ s/.*/^$&\$/;
# If it matches a module path or vmlinux
if ($pattern =~ /\/|^vmlinux$/) { if ($pattern =~ /\/|^vmlinux$/) {
$new->{mod} = $pattern; $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 { } else {
$new->{sym} = $pattern; $new->{sym} = $pattern;
} }
@ -47,20 +56,49 @@ sub load_rules {
close($fh); 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 { sub load_symvers {
my $file = shift; my $file = shift;
my %res; my %res;
my $errors = 0; my $errors = 0;
my $new;
xopen(my $fh, '<', $file); xopen(my $fh, '<', $file);
while (<$fh>) { while (<$fh>) {
my @l = split(/\s+/); chomp;
if (@l < 3) { my @l = split(/\t/, $_, -1);
if (@l < 4) {
print STDERR "$file:$.: unknown line\n"; print STDERR "$file:$.: unknown line\n";
$errors++; $errors++;
next; next;
} }
my $new = { crc => $l[0], mod => $l[2] }; 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; $res{$l[1]} = $new;
} }
if (!%res) { if (!%res) {
@ -71,25 +109,53 @@ sub load_symvers {
return %res; 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; my $kabi_errors = 0;
sub kabi_change { sub kabi_change {
my ($sym, $mod, $oldcrc, $newcrc) = @_; my ($sym, $symvers, $message) = @_;
my $fail = 1; my $fail = 1;
for my $rule (@rules) { for my $rule (@rules) {
if ($rule->{mod} && $mod =~ $rule->{mod} || if ($rule->{mod} && $symvers->{mod} =~ $rule->{mod} ||
$rule->{sym} && $sym =~ $rule->{sym}) { $rule->{sym} && $sym =~ $rule->{sym} ||
($use_namespaces && $rule->{namespace} &&
$symvers->{namespace} =~ $rule->{namespace})) {
$fail = $rule->{fail}; $fail = $rule->{fail};
last; last;
} }
} }
return unless $fail or $opt_verbose; return unless $fail or $opt_verbose;
print STDERR "KABI: symbol $sym($mod) ";
if ($newcrc) { print STDERR "KABI: symbol $sym(mod:$symvers->{mod}";
print STDERR "changed crc from $oldcrc to $newcrc" if ($use_namespaces && $symvers->{namespace}) {
} else { print STDERR " ns:$symvers->{namespace}";
print STDERR "lost";
} }
print STDERR ") $message";
if ($fail) { if ($fail) {
$kabi_errors++; $kabi_errors++;
print STDERR "\n"; print STDERR "\n";
@ -110,6 +176,10 @@ if (!$res || @ARGV != 2) {
print STDERR "Usage: $0 [--rules <rules file>] Module.symvers.old Module.symvers\n"; print STDERR "Usage: $0 [--rules <rules file>] Module.symvers.old Module.symvers\n";
exit 1; exit 1;
} }
# Determine symvers format
$use_namespaces = symvers_uses_namespaces($ARGV[0]);
if (defined($opt_rules)) { if (defined($opt_rules)) {
load_rules($opt_rules); load_rules($opt_rules);
} }
@ -118,10 +188,13 @@ my %new = load_symvers($ARGV[1]);
for my $sym (sort keys(%old)) { for my $sym (sort keys(%old)) {
if (!$new{$sym}) { if (!$new{$sym}) {
kabi_change($sym, $old{$sym}->{mod}, $old{$sym}->{crc}, 0); kabi_change($sym, $old{$sym}, "lost");
} elsif ($old{$sym}->{crc} ne $new{$sym}->{crc}) { } elsif ($old{$sym}->{crc} ne $new{$sym}->{crc}) {
kabi_change($sym, $new{$sym}->{mod}, $old{$sym}->{crc}, kabi_change($sym, $old{$sym}, "changed crc from " .
$new{$sym}->{crc}); "$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) { if ($kabi_errors) {

165739
kernel-64kb.changes Normal file

File diff suppressed because it is too large Load Diff

2028
kernel-64kb.spec Normal file

File diff suppressed because it is too large Load Diff

18
kernel-binary-conflicts Normal file
View 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

File diff suppressed because it is too large Load Diff

40
kernel-cert-subpackage Normal file
View 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

File diff suppressed because it is too large Load Diff

View File

@ -1,959 +0,0 @@
#
# spec file for package kernel-cubox
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor cubox
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-cubox
Summary: Kernel for SolidRun Cubox
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: armv7hl
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The standard kernel for Marvell Dove SoC, as found in
the SolidRun Cubox.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: Kernel for SolidRun Cubox - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The standard kernel for Marvell Dove SoC, as found in
the SolidRun Cubox.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: Kernel for SolidRun Cubox - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The standard kernel for Marvell Dove SoC, as found in
the SolidRun Cubox.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View 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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,995 +0,0 @@
#
# spec file for package kernel-desktop
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor desktop
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-desktop
Summary: Kernel optimized for the desktop
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
This kernel is optimized for the desktop. It is configured for lower latency
and has many of the features that aren't usually used on desktop machines
disabled.
%ifarch %ix86
This kernel supports up to 64GB of main memory. It requires Physical
Addressing Extensions (PAE), which were introduced with the Pentium Pro
processor.
PAE is not only more physical address space but also important for the
"no execute" feature which disables execution of code that is marked as
non-executable. Therefore, the PAE kernel should be used on any systems
that support it, regardless of the amount of main memory.
%endif
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: Kernel optimized for the desktop - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
This kernel is optimized for the desktop. It is configured for lower latency
and has many of the features that aren't usually used on desktop machines
disabled.
%ifarch %ix86
This kernel supports up to 64GB of main memory. It requires Physical
Addressing Extensions (PAE), which were introduced with the Pentium Pro
processor.
PAE is not only more physical address space but also important for the
"no execute" feature which disables execution of code that is marked as
non-executable. Therefore, the PAE kernel should be used on any systems
that support it, regardless of the amount of main memory.
%endif
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: Kernel optimized for the desktop - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
This kernel is optimized for the desktop. It is configured for lower latency
and has many of the features that aren't usually used on desktop machines
disabled.
%ifarch %ix86
This kernel supports up to 64GB of main memory. It requires Physical
Addressing Extensions (PAE), which were introduced with the Pentium Pro
processor.
PAE is not only more physical address space but also important for the
"no execute" feature which disables execution of code that is marked as
non-executable. Therefore, the PAE kernel should be used on any systems
that support it, regardless of the amount of main memory.
%endif
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# #
# spec file for package kernel-docs # spec file for package kernel-docs
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,86 +12,310 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# norootforbuild
%define patchversion 3.8.2 %define srcversion 6.11
%define patchversion 6.11.8
%define git_commit 099023b3ad8e1f4420d5eb954f757ec8d0cc4a5a
%define variant %{nil} %define variant %{nil}
%define build_html 1
%define build_pdf 0
%include %_sourcedir/kernel-spec-macros %include %_sourcedir/kernel-spec-macros
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb,check-module-license,klp-symbols,splitflist,mergedep,moddep,modflist,kernel-subpackage-build})
Name: kernel-docs Name: kernel-docs
Summary: Kernel Documentation Version: 6.11.8
Version: 3.8.2 %if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0 Release: 0
BuildRequires: docbook-toys docbook-utils ghostscript_any libjpeg-devel texlive transfig xmlto xorg-x11-devel %endif
BuildRequires: kernel-source%variant Summary: Kernel Documentation
Url: http://www.kernel.org/ License: GPL-2.0-only
License: GPL-2.0
Group: Documentation/Man Group: Documentation/Man
Provides: %name = %version-%source_rel URL: https://www.kernel.org/
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
BuildRequires: bash-sh
%endif
# TW (4.13 or later) no longer needs xmlto
%if 0%{?sle_version}
BuildRequires: xmlto
%endif
%if %build_pdf || %build_html
# ReST handling
BuildRequires: ImageMagick
BuildRequires: graphviz
BuildRequires: graphviz-gd
BuildRequires: graphviz-gnome
%if ! 0%{?suse_version} || 0%{?suse_version} > 1500
BuildRequires: python3-base
BuildRequires: python3-PyYAML
BuildRequires: python3-Sphinx
BuildRequires: texlive-amscls
%else
%if 0%{?suse_version} && 0%{?suse_version} < 1500
BuildRequires: python-packaging
BuildRequires: python-six
BuildRequires: python-Sphinx
%else
BuildRequires: python3-base
BuildRequires: python3-Sphinx < 3
%endif
%endif
BuildRequires: texlive-anyfontsize
%if %build_pdf
%if 0%{?suse_version} && 0%{?suse_version} < 1500
BuildRequires: python-Sphinx-latex
%else
BuildRequires: python3-base
BuildRequires: python3-Sphinx-latex
%endif
BuildRequires: texlive-adjustbox
BuildRequires: texlive-dejavu
BuildRequires: texlive-dejavu-fonts
BuildRequires: texlive-glyphlist
BuildRequires: texlive-makeindex
BuildRequires: texlive-varwidth
BuildRequires: texlive-xetex
BuildRequires: texlive-zapfding
%endif
%endif
%if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build %else
Source: kernel-spec-macros ExclusiveArch: do_not_build
%endif
Source0: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%srcversion.tar.xz
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
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source57: kernel-cert-subpackage
Source58: constraints.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-flavors
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
Source70: kernel-obs-build.spec.in
Source71: kernel-obs-qa.spec.in
Source72: compress-vmlinux.sh
Source73: dtb.spec.in.in
Source74: mkspec-dtb
Source75: release-projects
Source76: check-module-license
Source77: klp-symbols
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
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 3
NoSource: 14
NoSource: 16
NoSource: 17
NoSource: 19
NoSource: 20
NoSource: 21
NoSource: 23
NoSource: 33
NoSource: 35
NoSource: 36
NoSource: 37
NoSource: 38
NoSource: 40
NoSource: 46
NoSource: 47
NoSource: 48
NoSource: 49
NoSource: 50
NoSource: 51
NoSource: 52
NoSource: 53
NoSource: 54
NoSource: 55
NoSource: 56
NoSource: 57
NoSource: 58
NoSource: 60
NoSource: 61
NoSource: 62
NoSource: 63
NoSource: 64
NoSource: 65
NoSource: 67
NoSource: 68
NoSource: 69
NoSource: 70
NoSource: 71
NoSource: 72
NoSource: 73
NoSource: 74
NoSource: 75
NoSource: 76
NoSource: 77
NoSource: 78
NoSource: 79
NoSource: 80
NoSource: 81
NoSource: 82
NoSource: 83
NoSource: 84
NoSource: 85
NoSource: 86
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 113
NoSource: 114
NoSource: 120
NoSource: 121
Provides: %name = %version-%source_rel
Provides: %name-srchash-%git_commit
%description %description
These are the PDF documents and man pages (section 9) built from A few basic documents from the current kernel sources.
thecurrent kernel sources.
%source_timestamp %source_timestamp
%prep
cp -av /etc/texmf/web2c/texmf.cnf .
cat << EOF >> texmf.cnf
main_memory.pdfjadetex = 2500000
hash_extra.pdfjadetex = 70000
max_strings.pdfjadetex = 120000
save_size.pdfjadetex = 10000
EOF
%setup -T -c
%build
# use texmf.cnf from local source
export TEXMFCNF=$RPM_BUILD_DIR
export LANG=en_US
make -C /usr/src/linux%variant O=$PWD -k -i mandocs %{?jobs:-j%jobs}
make -C /usr/src/linux%variant O=$PWD -k -i pdfdocs %{?jobs:-j%jobs}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/%{_mandir}/man9
# filter out obscure device drivers - they clutter up the rpm and don't add any real value
find Documentation/DocBook/ -name '*.9.gz' |
egrep -v 'man/(sis[69]|rio|fsl|struct_rio|RIO|mpc85|set_rx_mode|mdio_(read|write)|mii_ioctl|mca_|z8530|nand|sppp|piix|(read|write)_zs)' |
while read i ; do
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9
done
install -d $RPM_BUILD_ROOT/usr/share/doc/kernel
cp -a Documentation/DocBook/*.pdf $RPM_BUILD_ROOT/usr/share/doc/kernel || true
if [ -d Documentation/kdb ] ; then
for i in Documentation/kdb/*.m* ; do
k=`basename $i`
k=${k/man/9}
k=${k/mm/9}
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9/$k
done
fi
ln -s /usr/share/man/man9/request_threaded_irq.9.gz $RPM_BUILD_ROOT/usr/share/man/man9/request_irq.9.gz
cp -a /usr/src/linux%variant/{COPYING,CREDITS,MAINTAINERS,README,REPORTING-BUGS} .
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %if 0%{?suse_version} && 0%{?suse_version} < 1500
%doc COPYING CREDITS MAINTAINERS README REPORTING-BUGS %doc COPYING
%{_mandir}/man9/* %else
%docdir /usr/share/doc/kernel %license COPYING
/usr/share/doc/kernel %endif
%doc CREDITS MAINTAINERS README
%doc old_changelog.txt
%if %build_pdf
%package pdf
Summary: Kernel Documentation (PDF)
Group: Documentation/Other
%description pdf
These are PDF documents built from the current kernel sources.
%source_timestamp
%files pdf
%dir %{_datadir}/doc/kernel
%docdir %{_datadir}/doc/kernel/pdf
%{_datadir}/doc/kernel/pdf
%endif
%if %build_html
%package html
Summary: Kernel Documentation (HTML)
Group: Documentation/HTML
%description html
These are HTML documents built from the current kernel sources.
%source_timestamp
%files html
%dir %{_datadir}/doc/kernel
%docdir %{_datadir}/doc/kernel/html
%{_datadir}/doc/kernel/html
%endif
%prep
%setup -q -c -T -a 0 -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
cp -a linux-%srcversion/{COPYING,CREDITS,MAINTAINERS,README} .
cp %_sourcedir/old_changelog.txt .
cd linux-%srcversion
%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
%build
cd linux-%srcversion
export LANG=en_US.utf8
%if %build_html
mkdir -p html
make %{?make_arg} O=$PWD/html \
%if ! 0%{?suse_version} || 0%{?suse_version} >= 1500
PYTHON=python3 \
%endif
htmldocs
%endif
%if %build_pdf
mkdir -p pdf
make %{?make_arg} O=$PWD/pdf \
%if ! 0%{?suse_version} || 0%{?suse_version} >= 1500
PYTHON=python3 \
%endif
pdfdocs
%endif
%install
cd linux-%srcversion
%if %build_html
install -d %{buildroot}%{_datadir}/doc/kernel/html/rst
cp -a html/Documentation/output/* %{buildroot}%{_datadir}/doc/kernel/html/rst || true
%endif
%if %build_pdf
install -d %{buildroot}%{_datadir}/doc/kernel/pdf
for i in pdf/Documentation/output/latex/*.pdf; do
cp -a $i %{buildroot}%{_datadir}/doc/kernel/pdf
done
%endif
%changelog %changelog

View File

@ -1,7 +1,7 @@
# #
# spec file for package kernel-docs@VARIANT@ # spec file for package kernel-docs@VARIANT@
# #
# Copyright (c) @YEAR@ SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) @YEAR@ SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,86 +12,172 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# norootforbuild
%define srcversion @SRCVERSION@
%define patchversion @PATCHVERSION@ %define patchversion @PATCHVERSION@
%define git_commit @COMMIT_FULL@
%define variant @VARIANT@%{nil} %define variant @VARIANT@%{nil}
%define build_html @BUILD_HTML@
%define build_pdf @BUILD_PDF@
%include %_sourcedir/kernel-spec-macros %include %_sourcedir/kernel-spec-macros
%(chmod +x %_sourcedir/{@SCRIPTS@})
Name: kernel-docs@VARIANT@ Name: kernel-docs@VARIANT@
Summary: Kernel Documentation
Version: @RPMVERSION@ Version: @RPMVERSION@
%if 0%{?is_kotd}
Release: <RELEASE>.g@COMMIT@
%else
Release: @RELEASE@ Release: @RELEASE@
BuildRequires: docbook-toys docbook-utils ghostscript_any libjpeg-devel texlive transfig xmlto xorg-x11-devel %endif
BuildRequires: kernel-source%variant Summary: Kernel Documentation
Url: http://www.kernel.org/ License: GPL-2.0-only
License: GPL-2.0
Group: Documentation/Man Group: Documentation/Man
Provides: %name = %version-%source_rel URL: https://www.kernel.org/
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
BuildRequires: bash-sh
%endif
# TW (4.13 or later) no longer needs xmlto
%if 0%{?sle_version}
BuildRequires: xmlto
%endif
%if %build_pdf || %build_html
# ReST handling
BuildRequires: ImageMagick
BuildRequires: graphviz
BuildRequires: graphviz-gd
BuildRequires: graphviz-gnome
%if ! 0%{?suse_version} || 0%{?suse_version} > 1500
BuildRequires: python3-base
BuildRequires: python3-PyYAML
BuildRequires: python3-Sphinx
BuildRequires: texlive-amscls
%else
%if 0%{?suse_version} && 0%{?suse_version} < 1500
BuildRequires: python-packaging
BuildRequires: python-six
BuildRequires: python-Sphinx
%else
BuildRequires: python3-base
BuildRequires: python3-Sphinx < 3
%endif
%endif
BuildRequires: texlive-anyfontsize
%if %build_pdf
%if 0%{?suse_version} && 0%{?suse_version} < 1500
BuildRequires: python-Sphinx-latex
%else
BuildRequires: python3-base
BuildRequires: python3-Sphinx-latex
%endif
BuildRequires: texlive-adjustbox
BuildRequires: texlive-dejavu
BuildRequires: texlive-dejavu-fonts
BuildRequires: texlive-glyphlist
BuildRequires: texlive-makeindex
BuildRequires: texlive-varwidth
BuildRequires: texlive-xetex
BuildRequires: texlive-zapfding
%endif
%endif
%if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build %else
Source: kernel-spec-macros ExclusiveArch: do_not_build
%endif
@SOURCES@
Provides: %name = %version-%source_rel
Provides: %name-srchash-%git_commit
%description %description
These are the PDF documents and man pages (section 9) built from A few basic documents from the current kernel sources.
thecurrent kernel sources.
%source_timestamp %source_timestamp
%prep
cp -av /etc/texmf/web2c/texmf.cnf .
cat << EOF >> texmf.cnf
main_memory.pdfjadetex = 2500000
hash_extra.pdfjadetex = 70000
max_strings.pdfjadetex = 120000
save_size.pdfjadetex = 10000
EOF
%setup -T -c
%build
# use texmf.cnf from local source
export TEXMFCNF=$RPM_BUILD_DIR
export LANG=en_US
make -C /usr/src/linux%variant O=$PWD -k -i mandocs %{?jobs:-j%jobs}
make -C /usr/src/linux%variant O=$PWD -k -i pdfdocs %{?jobs:-j%jobs}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/%{_mandir}/man9
# filter out obscure device drivers - they clutter up the rpm and don't add any real value
find Documentation/DocBook/ -name '*.9.gz' |
egrep -v 'man/(sis[69]|rio|fsl|struct_rio|RIO|mpc85|set_rx_mode|mdio_(read|write)|mii_ioctl|mca_|z8530|nand|sppp|piix|(read|write)_zs)' |
while read i ; do
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9
done
install -d $RPM_BUILD_ROOT/usr/share/doc/kernel
cp -a Documentation/DocBook/*.pdf $RPM_BUILD_ROOT/usr/share/doc/kernel || true
if [ -d Documentation/kdb ] ; then
for i in Documentation/kdb/*.m* ; do
k=`basename $i`
k=${k/man/9}
k=${k/mm/9}
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9/$k
done
fi
ln -s /usr/share/man/man9/request_threaded_irq.9.gz $RPM_BUILD_ROOT/usr/share/man/man9/request_irq.9.gz
cp -a /usr/src/linux%variant/{COPYING,CREDITS,MAINTAINERS,README,REPORTING-BUGS} .
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %if 0%{?suse_version} && 0%{?suse_version} < 1500
%doc COPYING CREDITS MAINTAINERS README REPORTING-BUGS %doc COPYING
%{_mandir}/man9/* %else
%docdir /usr/share/doc/kernel %license COPYING
/usr/share/doc/kernel %endif
%doc CREDITS MAINTAINERS README
%doc old_changelog.txt
%if %build_pdf
%package pdf
Summary: Kernel Documentation (PDF)
Group: Documentation/Other
%description pdf
These are PDF documents built from the current kernel sources.
%source_timestamp
%files pdf
%dir %{_datadir}/doc/kernel
%docdir %{_datadir}/doc/kernel/pdf
%{_datadir}/doc/kernel/pdf
%endif
%if %build_html
%package html
Summary: Kernel Documentation (HTML)
Group: Documentation/HTML
%description html
These are HTML documents built from the current kernel sources.
%source_timestamp
%files html
%dir %{_datadir}/doc/kernel
%docdir %{_datadir}/doc/kernel/html
%{_datadir}/doc/kernel/html
%endif
%prep
%setup -q -c -T -a 0 @UNPACK_PATCHES@
cp -a linux-%srcversion/{COPYING,CREDITS,MAINTAINERS,README} .
cp %_sourcedir/old_changelog.txt .
cd linux-%srcversion
%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
%build
cd linux-%srcversion
export LANG=en_US.utf8
%if %build_html
mkdir -p html
make %{?make_arg} O=$PWD/html \
%if ! 0%{?suse_version} || 0%{?suse_version} >= 1500
PYTHON=python3 \
%endif
htmldocs
%endif
%if %build_pdf
mkdir -p pdf
make %{?make_arg} O=$PWD/pdf \
%if ! 0%{?suse_version} || 0%{?suse_version} >= 1500
PYTHON=python3 \
%endif
pdfdocs
%endif
%install
cd linux-%srcversion
%if %build_html
install -d %{buildroot}%{_datadir}/doc/kernel/html/rst
cp -a html/Documentation/output/* %{buildroot}%{_datadir}/doc/kernel/html/rst || true
%endif
%if %build_pdf
install -d %{buildroot}%{_datadir}/doc/kernel/pdf
for i in pdf/Documentation/output/latex/*.pdf; do
cp -a $i %{buildroot}%{_datadir}/doc/kernel/pdf
done
%endif
%changelog %changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,965 +0,0 @@
#
# spec file for package kernel-ec2
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor ec2
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-ec2
Summary: The Amazon EC2 Xen Kernel
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The Linux kernel for Xen paravirtualization.
This kernel can only be used both as an unprivileged ("xenU")
kernel (for Amazon EC2).
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: The Amazon EC2 Xen Kernel - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The Linux kernel for Xen paravirtualization.
This kernel can only be used both as an unprivileged ("xenU")
kernel (for Amazon EC2).
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: The Amazon EC2 Xen Kernel - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The Linux kernel for Xen paravirtualization.
This kernel can only be used both as an unprivileged ("xenU")
kernel (for Amazon EC2).
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,956 +0,0 @@
#
# spec file for package kernel-exynos
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor exynos
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-exynos
Summary: Kernel for Samsung's Exynos SoC
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: armv7hl
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The standard kernel for Samsung's Exynos 4 & 5 SoC, as found in the Origen board.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: Kernel for Samsung's Exynos SoC - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The standard kernel for Samsung's Exynos 4 & 5 SoC, as found in the Origen board.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: Kernel for Samsung's Exynos SoC - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The standard kernel for Samsung's Exynos 4 & 5 SoC, as found in the Origen board.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,959 +0,0 @@
#
# spec file for package kernel-imx51
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor imx51
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-imx51
Summary: Kernel for Freescale's iMX SoC
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: armv7hl
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The standard kernel for Freescale's i.MX51 SoC, as found in
devices like the Genesi EfikaMX family.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: Kernel for Freescale's iMX SoC - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The standard kernel for Freescale's i.MX51 SoC, as found in
devices like the Genesi EfikaMX family.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: Kernel for Freescale's iMX SoC - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The standard kernel for Freescale's i.MX51 SoC, as found in
devices like the Genesi EfikaMX family.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

165739
kernel-kvmsmall.changes Normal file

File diff suppressed because it is too large Load Diff

2044
kernel-kvmsmall.spec Normal file

File diff suppressed because it is too large Load Diff

165739
kernel-lpae.changes Normal file

File diff suppressed because it is too large Load Diff

2020
kernel-lpae.spec Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
%package -n %{-n*}-%1 %package -n %{-n*}-kmp-%1
%define _this_kmp_version %{-v*}_k%(echo %2 | sed -r 'y/-/_/; s/^(2\.6\.[0-9]+)_/\\1.0_/; # use 2.6.x.0 for mainline kernels') %define _this_kmp_kernel_version k%(echo %2 | sed -r 'y/-/_/')
%define _this_kmp_version %{-v*}_%_this_kmp_kernel_version
Version: %_this_kmp_version Version: %_this_kmp_version
Release: %{-r*} Release: %{-r*}
%( %(
@ -8,7 +9,7 @@ for spec in {%_sourcedir,%_specdir}/%name.spec /dev/null; do
done done
awk ' awk '
BEGIN { tags["summary"] = "Summary: %summary" BEGIN { tags["summary"] = "Summary: %summary"
tags["group"] = "Group: %group" } tags["group"] = "" }
/^%%/ { in_pkg_header = \ /^%%/ { in_pkg_header = \
($0 ~ /^%%package[ \t]+KMP[ \t]*$/ || ($0 ~ /^%%package[ \t]+KMP[ \t]*$/ ||
$0 ~ /^%%package[ \t]+-n[ \t]*%name-KMP[ \t]*$/) $0 ~ /^%%package[ \t]+-n[ \t]*%name-KMP[ \t]*$/)
@ -17,17 +18,36 @@ in_pkg_header && /^(Summary|Group):[ \t]*/ \
{ tag = tolower($1) ; sub(/:$/, "", tag) { tag = tolower($1) ; sub(/:$/, "", tag)
tags[tag] = $0 } tags[tag] = $0 }
END { print tags["summary"] END { print tags["summary"]
print tags["group"] } if ( tags["group"] != "" ) print tags["group"] }
' $spec ' $spec
) )
Provides: %{-n*} = %_this_kmp_version Provides: %{-n*}-kmp = %_this_kmp_version
Provides: %{-n*} = %{-v*} Provides: %{-n*}-kmp = %{-v*}
Provides: multiversion(kernel) Provides: multiversion(kernel)
Provides: %{-n*}-kmp-%1-%_this_kmp_kernel_version
Requires: coreutils grep 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 Enhances: kernel-%1
Supplements: packageand(kernel-%1:%{-n*})
Conflicts: %{-n*}-kmp-%1-%_this_kmp_kernel_version
AutoReqProv: on 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*})}} %{-p:%{expand:%(cd %_sourcedir; cat %{-p*})}}
%description -n %{-n*}-%1 %description -n %{-n*}-kmp-%1
%( %(
for spec in {%_sourcedir,%_specdir}/%name.spec /dev/null; do for spec in {%_sourcedir,%_specdir}/%name.spec /dev/null; do
[ -e $spec ] && break [ -e $spec ] && break
@ -49,28 +69,32 @@ in_desc { print; good = 1 }
END { exit(! good) } END { exit(! good) }
' $spec ' $spec
) )
%post -n %{-n*}-%1 %pre -n %{-n*}-kmp-%1
nvr=%{-n*}-%1-%_this_kmp_version-%{-r*} %{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
wm2=/usr/lib/module-init-tools/weak-modules2 %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-pre --name "%{-n*}-kmp-%1" \
if [ -x $wm2 ]; then --version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
%{-b:KMP_NEEDS_MKINITRD=1} /bin/bash -${-/e/} $wm2 --add-kmp $nvr --flavor "%1" --usrmerged "%{usrmerged}" "$@"
fi %post -n %{-n*}-kmp-%1
%preun -n %{-n*}-%1 %{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
nvr=%{-n*}-%1-%_this_kmp_version-%{-r*} %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-post --name "%{-n*}-kmp-%1" \
rpm -ql $nvr | sed -n '/\.ko$/p' > /var/run/rpm-$nvr-modules --version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
%postun -n %{-n*}-%1 --flavor "%1" --usrmerged "%{usrmerged}" "$@"
nvr=%{-n*}-%1-%_this_kmp_version-%{-r*} %preun -n %{-n*}-kmp-%1
modules=( $(cat /var/run/rpm-$nvr-modules) ) %{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
rm -f /var/run/rpm-$nvr-modules %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-preun --name "%{-n*}-kmp-%1" \
if [ ${#modules[*]} = 0 ]; then --version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
echo "WARNING: $nvr does not contain any kernel modules" >&2 --flavor "%1" --usrmerged "%{usrmerged}" "$@"
exit 0 %postun -n %{-n*}-kmp-%1
fi %{-b:KMP_NEEDS_MKINITRD=1; export KMP_NEEDS_MKINITRD}
wm2=/usr/lib/module-init-tools/weak-modules2 %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/kmp-postun --name "%{-n*}-kmp-%1" \
if [ -x $wm2 ]; then --version "%_this_kmp_version" --release "%{-r*}" --kernelrelease "%2" \
printf '%s\n' "${modules[@]}" | /bin/bash -${-/e/} $wm2 --remove-kmp $nvr --flavor "%1" --usrmerged "%{usrmerged}" "$@"
fi %posttrans -n %{-n*}-kmp-%1
%files -n %{-n*}-%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:%{expand:%(cd %_sourcedir; cat %{-f*})}}
%{!-f:%defattr (-,root,root)} %{!-f:%defattr (-,root,root)}
%{!-f:/lib/modules/%2-%1} %{!-f:%{kernel_module_directory}/%2-%1}

165739
kernel-obs-build.changes Normal file

File diff suppressed because it is too large Load Diff

186
kernel-obs-build.spec Normal file
View File

@ -0,0 +1,186 @@
#
# spec file for package kernel-obs-build
#
# Copyright (c) 2024 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/
#
# needsrootforbuild
#!BuildIgnore: post-build-checks
%define patchversion 6.11.8
%define variant %{nil}
%include %_sourcedir/kernel-spec-macros
%if 0%{?suse_version}
%if "%{nil}"
%global kernel_flavor %{nil}
%else
%ifarch %ix86
%global kernel_flavor -pae
%else
%ifarch armv7l armv7hl
%global kernel_flavor -lpae
%else
%global kernel_flavor -default
%endif
%endif
%endif
%global kernel_package kernel%kernel_flavor-srchash-099023b3ad8e1f4420d5eb954f757ec8d0cc4a5a
%endif
%if 0%{?rhel_version}
%global kernel_package kernel
%endif
Name: kernel-obs-build
Version: 6.11.8
%if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0
%endif
Summary: package kernel and initrd for OBS VM builds
License: GPL-2.0-only
Group: SLES
BuildRequires: coreutils
BuildRequires: device-mapper
BuildRequires: dracut
BuildRequires: %kernel_package
BuildRequires: util-linux
%if 0%{?suse_version} > 1550 || 0%{?sle_version} > 150200
BuildRequires: zstd
%endif
%if ! 0%{?is_kotd} || %{?is_kotd_qa}%{!?is_kotd_qa:0}
ExclusiveArch: aarch64 armv6hl armv7hl ppc64le riscv64 s390x x86_64
%else
ExclusiveArch: do_not_build
%endif
%description
This package is repackaging already compiled kernels to make them usable
inside of Open Build Service (OBS) VM builds. An initrd with some basic
kernel modules is generated as well, but further kernel modules can be
loaded during build when installing the kernel package.
%files
/.build.cmdline.*
/.build.console.*
/.build.hostarch.*
/.build.initrd.*
/.build.kernel.*
%prep
%build
# set 'date of last password change' to a static value (bsc#1189305)
sed -i 's/^\(root:\*:\)[1-9][0-9]*\(::::::\)/\142\2/' /etc/shadow
mkdir -p /usr/lib/dracut/modules.d/80obs
cat > /usr/lib/dracut/modules.d/80obs/module-setup.sh <<EOF
#!/bin/bash
# called by dracut
check() {
return 0
}
# called by dracut
installkernel() {
hostonly='' instmods obs
}
# called by dracut
install() {
inst_hook pre-udev 10 "\$moddir"/setup_obs.sh
}
EOF
chmod a+rx /usr/lib/dracut/modules.d/80obs/module-setup.sh
cat > /usr/lib/dracut/modules.d/80obs/setup_obs.sh <<EOF
#!/bin/sh
info "Loading kernel modules for OBS"
info " Loop..."
modprobe -q loop max_loop=64
info " binfmt misc..."
modprobe -q binfmt_misc
EOF
chmod a+rx /usr/lib/dracut/modules.d/80obs/setup_obs.sh
# Configure systemd in kernel-obs-build's initrd not to limit TasksMax,
# we run with build as PID 1 (boo#965564)
echo "DefaultTasksMax=infinity" >> /etc/systemd/system.conf
echo "DefaultTasksAccounting=no" >> /etc/systemd/system.conf
echo 127.0.0.1 localhost > /etc/hosts # omit build-machine host name (boo#1084909)
# a longer list to have them also available for qemu cross builds where x86_64 kernel runs in eg. arm env.
# this list of modules where available on build workers of build.opensuse.org, so we stay compatible.
export KERNEL_MODULES="
loop dm-crypt essiv dm-mod dm-snapshot binfmt-misc fuse kqemu squashfs ext2 ext3 ext4 btrfs
xfs nf_conntrack_ipv6 binfmt_misc virtio_pci virtio_mmio virtio_blk virtio_rng fat vfat
nls_cp437 nls_iso8859-1 ibmvscsi sd_mod e1000 ibmveth overlay 9p 9pnet_virtio qemu_fw_cfg
algif_hash aegis128 xts bridge br_netfilter nf_nat xt_conntrack iptable_nat iptable_filter
iso9660"
# manually load all modules to make sure they're available
for i in $KERNEL_MODULES; do
(
echo "info ' $i'"
echo "modprobe -q $i"
) >> /usr/lib/dracut/modules.d/80obs/setup_obs.sh
done
ROOT=""
[ -e "/dev/vda" ] && ROOT="-d /dev/vda"
[ -e /dev/hda1 ] && ROOT="-d /dev/hda1" # for xen builds
%define kernel_name vmlinu?
%ifarch s390 s390x
%define kernel_name image
%endif
%ifarch %arm
%define kernel_name zImage
%endif
%ifarch aarch64 riscv64
%define kernel_name Image
%endif
# --host-only mode is needed for unlimited TasksMax workaround (boo#965564)
dracut --reproducible --host-only --no-hostonly-cmdline \
--no-early-microcode --nofscks --strip --hardlink \
--drivers="$KERNEL_MODULES" --force /tmp/initrd.kvm \
%if 0%{?suse_version} > 1550 || 0%{?sle_version} > 150200
--compress "zstd -19 -T0" \
%endif
$(echo /boot/%{kernel_name}-*%{kernel_flavor} | sed -n -e 's,[^-]*-\(.*'%{kernel_flavor}'\),\1,p')
#cleanup
rm -rf /usr/lib/dracut/modules.d/80obs
%install
install -d -m 0755 %{buildroot}
cp -v /boot/%{kernel_name}-*%{kernel_flavor} %{buildroot}/.build.kernel.kvm
cp -v /tmp/initrd.kvm %{buildroot}/.build.initrd.kvm
# inform worker kernel parameters to invoke
CMDLINE="elevator=noop nmi_watchdog=0 rw ia32_emulation=1"
echo "$CMDLINE" > %{buildroot}/.build.cmdline.kvm
# inform worker about availability of virtio-serial
touch %{buildroot}/.build.console.kvm
if grep -qx CONFIG_VIRTIO_CONSOLE=y /boot/config-*%{kernel_flavor} ; then
echo "virtio" > %{buildroot}/.build.console.kvm
fi
#inform worker about arch
#see obs-build commit e47399d738e51
uname -m > %{buildroot}/.build.hostarch.kvm
%changelog

186
kernel-obs-build.spec.in Normal file
View File

@ -0,0 +1,186 @@
#
# spec file for package kernel-obs-build
#
# Copyright (c) @YEAR@ 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/
#
# needsrootforbuild
#!BuildIgnore: post-build-checks
%define patchversion @PATCHVERSION@
%define variant @VARIANT@%{nil}
%include %_sourcedir/kernel-spec-macros
%if 0%{?suse_version}
%if "@OBS_BUILD_VARIANT@"
%global kernel_flavor @OBS_BUILD_VARIANT@
%else
%ifarch %ix86
%global kernel_flavor -pae
%else
%ifarch armv7l armv7hl
%global kernel_flavor -lpae
%else
%global kernel_flavor -default
%endif
%endif
%endif
%global kernel_package kernel%kernel_flavor-srchash-@COMMIT_FULL@
%endif
%if 0%{?rhel_version}
%global kernel_package kernel
%endif
Name: kernel-obs-build
Version: @RPMVERSION@
%if 0%{?is_kotd}
Release: <RELEASE>.g@COMMIT@
%else
Release: @RELEASE@
%endif
Summary: package kernel and initrd for OBS VM builds
License: GPL-2.0-only
Group: SLES
BuildRequires: coreutils
BuildRequires: device-mapper
BuildRequires: dracut
BuildRequires: %kernel_package
BuildRequires: util-linux
%if 0%{?suse_version} > 1550 || 0%{?sle_version} > 150200
BuildRequires: zstd
%endif
%if ! 0%{?is_kotd} || %{?is_kotd_qa}%{!?is_kotd_qa:0}
ExclusiveArch: @ARCHS@
%else
ExclusiveArch: do_not_build
%endif
%description
This package is repackaging already compiled kernels to make them usable
inside of Open Build Service (OBS) VM builds. An initrd with some basic
kernel modules is generated as well, but further kernel modules can be
loaded during build when installing the kernel package.
%files
/.build.cmdline.*
/.build.console.*
/.build.hostarch.*
/.build.initrd.*
/.build.kernel.*
%prep
%build
# set 'date of last password change' to a static value (bsc#1189305)
sed -i 's/^\(root:\*:\)[1-9][0-9]*\(::::::\)/\142\2/' /etc/shadow
mkdir -p /usr/lib/dracut/modules.d/80obs
cat > /usr/lib/dracut/modules.d/80obs/module-setup.sh <<EOF
#!/bin/bash
# called by dracut
check() {
return 0
}
# called by dracut
installkernel() {
hostonly='' instmods obs
}
# called by dracut
install() {
inst_hook pre-udev 10 "\$moddir"/setup_obs.sh
}
EOF
chmod a+rx /usr/lib/dracut/modules.d/80obs/module-setup.sh
cat > /usr/lib/dracut/modules.d/80obs/setup_obs.sh <<EOF
#!/bin/sh
info "Loading kernel modules for OBS"
info " Loop..."
modprobe -q loop max_loop=64
info " binfmt misc..."
modprobe -q binfmt_misc
EOF
chmod a+rx /usr/lib/dracut/modules.d/80obs/setup_obs.sh
# Configure systemd in kernel-obs-build's initrd not to limit TasksMax,
# we run with build as PID 1 (boo#965564)
echo "DefaultTasksMax=infinity" >> /etc/systemd/system.conf
echo "DefaultTasksAccounting=no" >> /etc/systemd/system.conf
echo 127.0.0.1 localhost > /etc/hosts # omit build-machine host name (boo#1084909)
# a longer list to have them also available for qemu cross builds where x86_64 kernel runs in eg. arm env.
# this list of modules where available on build workers of build.opensuse.org, so we stay compatible.
export KERNEL_MODULES="
loop dm-crypt essiv dm-mod dm-snapshot binfmt-misc fuse kqemu squashfs ext2 ext3 ext4 btrfs
xfs nf_conntrack_ipv6 binfmt_misc virtio_pci virtio_mmio virtio_blk virtio_rng fat vfat
nls_cp437 nls_iso8859-1 ibmvscsi sd_mod e1000 ibmveth overlay 9p 9pnet_virtio qemu_fw_cfg
algif_hash aegis128 xts bridge br_netfilter nf_nat xt_conntrack iptable_nat iptable_filter
iso9660"
# manually load all modules to make sure they're available
for i in $KERNEL_MODULES; do
(
echo "info ' $i'"
echo "modprobe -q $i"
) >> /usr/lib/dracut/modules.d/80obs/setup_obs.sh
done
ROOT=""
[ -e "/dev/vda" ] && ROOT="-d /dev/vda"
[ -e /dev/hda1 ] && ROOT="-d /dev/hda1" # for xen builds
%define kernel_name vmlinu?
%ifarch s390 s390x
%define kernel_name image
%endif
%ifarch %arm
%define kernel_name zImage
%endif
%ifarch aarch64 riscv64
%define kernel_name Image
%endif
# --host-only mode is needed for unlimited TasksMax workaround (boo#965564)
dracut --reproducible --host-only --no-hostonly-cmdline \
--no-early-microcode --nofscks --strip --hardlink \
--drivers="$KERNEL_MODULES" --force /tmp/initrd.kvm \
%if 0%{?suse_version} > 1550 || 0%{?sle_version} > 150200
--compress "zstd -19 -T0" \
%endif
$(echo /boot/%{kernel_name}-*%{kernel_flavor} | sed -n -e 's,[^-]*-\(.*'%{kernel_flavor}'\),\1,p')
#cleanup
rm -rf /usr/lib/dracut/modules.d/80obs
%install
install -d -m 0755 %{buildroot}
cp -v /boot/%{kernel_name}-*%{kernel_flavor} %{buildroot}/.build.kernel.kvm
cp -v /tmp/initrd.kvm %{buildroot}/.build.initrd.kvm
# inform worker kernel parameters to invoke
CMDLINE="elevator=noop nmi_watchdog=0 rw ia32_emulation=1"
echo "$CMDLINE" > %{buildroot}/.build.cmdline.kvm
# inform worker about availability of virtio-serial
touch %{buildroot}/.build.console.kvm
if grep -qx CONFIG_VIRTIO_CONSOLE=y /boot/config-*%{kernel_flavor} ; then
echo "virtio" > %{buildroot}/.build.console.kvm
fi
#inform worker about arch
#see obs-build commit e47399d738e51
uname -m > %{buildroot}/.build.hostarch.kvm
%changelog

165739
kernel-obs-qa.changes Normal file

File diff suppressed because it is too large Load Diff

76
kernel-obs-qa.spec Normal file
View File

@ -0,0 +1,76 @@
#
# spec file for package kernel-obs-qa
#
# Copyright (c) 2024 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/
#
# needsrootforbuild
%define patchversion 6.11.8
%define variant %{nil}
%include %_sourcedir/kernel-spec-macros
Name: kernel-obs-qa
Version: 6.11.8
%if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0
%endif
Summary: Basic QA tests for the kernel
License: GPL-2.0-only
Group: SLES
BuildRequires: kernel-default
# kernel-obs-build must be also configured as VMinstall, but is required
# here as well to avoid that qa and build package build parallel
BuildRequires: kernel-obs-build
BuildRequires: modutils
%if ! 0%{?is_kotd} || %{?is_kotd_qa}%{!?is_kotd_qa:0}
ExclusiveArch: aarch64 armv6hl armv7hl ppc64le riscv64 s390x x86_64
%else
ExclusiveArch: do_not_build
%endif
%description
This package is using the kernel compiled within Open Build Service(OBS)
projects and runs basic tests.
%files
/usr/share/%name
%prep
%build
%check
# More tests are comming, currently the main test is the existens of
# this spec file. It does trigger a build within OBS VM which is using
# the kernel of the same project.
# test suites should be packaged in other packages, but build required
# and called here.
krel=$(uname -r)
if test ! -d "/lib/modules/$krel/kernel" && test ! -d "/usr/lib/modules/$krel/kernel"; then
echo "Kernel package for $krel not installed; exiting"
exit 0
fi
/sbin/modprobe loop
%install
mkdir -p %{buildroot}/usr/share/%name
touch %{buildroot}/usr/share/%name/logfile
%changelog

76
kernel-obs-qa.spec.in Normal file
View File

@ -0,0 +1,76 @@
#
# spec file for package kernel-obs-qa
#
# Copyright (c) @YEAR@ 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/
#
# needsrootforbuild
%define patchversion @PATCHVERSION@
%define variant @VARIANT@%{nil}
%include %_sourcedir/kernel-spec-macros
Name: kernel-obs-qa
Version: @RPMVERSION@
%if 0%{?is_kotd}
Release: <RELEASE>.g@COMMIT@
%else
Release: @RELEASE@
%endif
Summary: Basic QA tests for the kernel
License: GPL-2.0-only
Group: SLES
BuildRequires: kernel-default
# kernel-obs-build must be also configured as VMinstall, but is required
# here as well to avoid that qa and build package build parallel
BuildRequires: kernel-obs-build
BuildRequires: modutils
%if ! 0%{?is_kotd} || %{?is_kotd_qa}%{!?is_kotd_qa:0}
ExclusiveArch: @ARCHS@
%else
ExclusiveArch: do_not_build
%endif
%description
This package is using the kernel compiled within Open Build Service(OBS)
projects and runs basic tests.
%files
/usr/share/%name
%prep
%build
%check
# More tests are comming, currently the main test is the existens of
# this spec file. It does trigger a build within OBS VM which is using
# the kernel of the same project.
# test suites should be packaged in other packages, but build required
# and called here.
krel=$(uname -r)
if test ! -d "/lib/modules/$krel/kernel" && test ! -d "/usr/lib/modules/$krel/kernel"; then
echo "Kernel package for $krel not installed; exiting"
exit 0
fi
/sbin/modprobe loop
%install
mkdir -p %{buildroot}/usr/share/%name
touch %{buildroot}/usr/share/%name/logfile
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,959 +0,0 @@
#
# spec file for package kernel-omap2plus
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor omap2plus
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-omap2plus
Summary: Kernel for Texas instrument's OMAP SoC
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: armv7hl
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The standard kernel for Texas instrument's OMAP SoC, as
found in devices like the PandaBoard and BeagleBoard.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: Kernel for Texas instrument's OMAP SoC - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The standard kernel for Texas instrument's OMAP SoC, as
found in devices like the PandaBoard and BeagleBoard.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: Kernel for Texas instrument's OMAP SoC - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The standard kernel for Texas instrument's OMAP SoC, as
found in devices like the PandaBoard and BeagleBoard.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,959 +0,0 @@
#
# spec file for package kernel-s390
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor s390
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-s390
Summary: The Standard Kernel
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
%ifarch s390
Provides: kernel-32bit
Obsoletes: kernel-32bit
%endif
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: s390
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The standard kernel.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: The Standard Kernel - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The standard kernel.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: The Standard Kernel - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The standard kernel.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,14 @@
# These zero-length files are correct: # These zero-length files are correct:
addFilter("zero-length /usr/src/linux-3\..*obj/.*include/config.*h") addFilter("zero-length /usr/src/linux-.*-obj/.*/include/config.*h")
addFilter("zero-length /usr/src/linux-.*-obj/.*/include/config/.*")
# vdsos are special # vdsos are special
addFilter("shared-lib-without-dependency-information /lib/modules/3\..*/vdso/.*") addFilter("shared-lib-without-dependency-information .*/lib/modules/[1-9].*/vdso/.*")
addFilter("missing-PT_GNU_STACK-section /lib/modules/3\..*/vdso/") addFilter("missing-PT_GNU_STACK-section .*/lib/modules/[1-9].*/vdso/.*")
# This is a stale symlink until the kernel-source package is installed: # This is a stale symlink until the kernel-source package is installed:
addFilter("dangling-symlink /lib/modules/3\..*/source") addFilter("dangling-symlink .*/lib/modules/[1-9].*/source")
# These hidden files are fine: # These hidden files are fine:
addFilter ("hidden-file-or-dir /usr/src/linux-3\..*-obj/.*/.config") addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.config")
addFilter ("hidden-file-or-dir /usr/src/linux-3\..*-obj/.*/.kernel-binary.spec.buildenv") 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")

View File

@ -1,7 +1,7 @@
# #
# spec file for package kernel-source # spec file for package kernel-source
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,59 +12,72 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# norootforbuild
# icecream 0
%define srcversion 3.8 %define srcversion 6.11
%define patchversion 3.8.2 %define patchversion 6.11.8
%define git_commit 099023b3ad8e1f4420d5eb954f757ec8d0cc4a5a
%define variant %{nil} %define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros %include %_sourcedir/kernel-spec-macros
%define src_install_dir usr/src/linux-%kernelrelease%variant %(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb,check-module-license,klp-symbols,splitflist,mergedep,moddep,modflist,kernel-subpackage-build})
Name: kernel-source Name: kernel-source
Summary: The Linux Kernel Sources Version: 6.11.8
Version: 3.8.2 %if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0 Release: 0
License: GPL-2.0 %endif
Summary: The Linux Kernel Sources
License: GPL-2.0-only
Group: Development/Sources Group: Development/Sources
Url: http://www.kernel.org/ URL: https://www.kernel.org/
AutoReqProv: off AutoReqProv: off
BuildRequires: coreutils sed %if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
BuildRequires: bash-sh
%endif
BuildRequires: coreutils
BuildRequires: fdupes BuildRequires: fdupes
Requires(post): coreutils sed BuildRequires: sed
Provides: multiversion(kernel) %if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
Provides: linux BuildArch: noarch
Provides: %name = %version-%source_rel %else
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2 ExclusiveArch: do_not_build
Source2: source-post.sh %endif
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 Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf Source14: series.conf
Source16: guards Source16: guards
Source17: apply-patches Source17: apply-patches
Source19: kernel-binary-conflicts
Source20: obsolete-kmps
Source21: config.conf Source21: config.conf
Source23: supported.conf Source23: supported.conf
Source33: check-for-config-changes Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl Source35: group-source-files.pl
Source36: README.PATCH-POLICY.SUSE
Source37: README.SUSE Source37: README.SUSE
Source38: README.KSYMS Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp Source40: source-timestamp
Source44: find-provides Source46: split-modules
Source45: split-modules Source47: modversions
Source46: modversions
Source48: macros.kernel-source Source48: macros.kernel-source
Source49: kernel-module-subpackage Source49: kernel-module-subpackage
Source50: kabi.pl Source50: kabi.pl
@ -74,16 +87,34 @@ Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in Source56: kernel-docs.spec.in
Source57: kernel-cert-subpackage
Source58: constraints.in
Source60: config.sh Source60: config.sh
Source61: compute-PATCHVERSION.sh Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf Source62: old-flavors
Source63: arch-symbols Source63: arch-symbols
Source64: package-descriptions Source64: package-descriptions
Source65: kernel-spec-macros Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh Source67: log.sh
Source68: host-memcpy-hack.h Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver Source69: try-disable-staging-driver
Source70: kernel-obs-build.spec.in
Source71: kernel-obs-qa.spec.in
Source72: compress-vmlinux.sh
Source73: dtb.spec.in.in
Source74: mkspec-dtb
Source75: release-projects
Source76: check-module-license
Source77: klp-symbols
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 Source100: config.tar.bz2
Source101: config.addon.tar.bz2 Source101: config.addon.tar.bz2
Source102: patches.arch.tar.bz2 Source102: patches.arch.tar.bz2
@ -91,25 +122,43 @@ Source103: patches.drivers.tar.bz2
Source104: patches.fixes.tar.bz2 Source104: patches.fixes.tar.bz2
Source105: patches.rpmify.tar.bz2 Source105: patches.rpmify.tar.bz2
Source106: patches.suse.tar.bz2 Source106: patches.suse.tar.bz2
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2 Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2 Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2 Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2 Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2 Source113: patches.kabi.tar.bz2
Source114: patches.drm.tar.bz2
Source120: kabi.tar.bz2 Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2 Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): coreutils sed
BuildArch: noarch
Prefix: /usr/src
# Source is only complete with devel files. # Source is only complete with devel files.
Requires: kernel-devel = %version-%release 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
%obsolete_rebuilds %name
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver}) # 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 symbols %(set -- $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*)
%define variant_symbols %(case %name in (*-rt) echo "RT" ;; esac)
%define do_vanilla "%variant" == "" %define do_vanilla "%variant" == ""
@ -118,12 +167,23 @@ Linux kernel sources with many fixes and improvements.
%source_timestamp %source_timestamp
%post
%relink_function
relink linux-%kernelrelease%variant /usr/src/linux%variant
%files -f nondevel.files
%package -n kernel-devel%variant %package -n kernel-devel%variant
Summary: Development files needed for building kernel modules Summary: Development files needed for building kernel modules
Group: Development/Sources Group: Development/Sources
AutoReqProv: off AutoReqProv: off
Provides: multiversion(kernel)
Provides: kernel-devel%variant = %version-%source_rel 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 %description -n kernel-devel%variant
Kernel-level headers and Makefiles required for development of Kernel-level headers and Makefiles required for development of
@ -131,55 +191,91 @@ external kernel modules.
%source_timestamp %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 %package vanilla
Summary: Vanilla Linux kernel sources with minor build fixes. %obsolete_rebuilds %name-vanilla
Summary: Vanilla Linux kernel sources with minor build fixes
Group: Development/Sources Group: Development/Sources
AutoReqProv: off AutoReqProv: off
Provides: multiversion(kernel)
Provides: %name-vanilla = %version-%source_rel 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 %description vanilla
Vanilla Linux kernel sources with minor build fixes. Vanilla Linux kernel sources with minor build fixes.
%source_timestamp %source_timestamp
%if %do_vanilla
%files vanilla
/usr/src/linux-%kernelrelease-vanilla
%endif
%prep %prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "Please get a copy of linux-%srcversion.tar.bz2 from" \
"ftp://ftp.kernel.org/pub/linux/kernel/v2.6/."
fi
echo "Symbol(s): %symbols" echo "Symbol(s): %symbols"
# Unpack all sources and patches # Unpack all sources and patches
%setup -q -c -T -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121 %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 %build
mkdir -p $RPM_BUILD_ROOT/usr/src %install
cd $RPM_BUILD_ROOT/usr/src mkdir -p %{buildroot}/usr/src
pushd %{buildroot}/usr/src
# Unpack the vanilla kernel sources # Unpack the vanilla kernel sources
tar -xjf %_sourcedir/linux-%srcversion.tar.bz2 tar -xf %{S:0}
find . -xtype l -delete -printf "deleted '%f'\n"
if test "%srcversion" != "%kernelrelease%variant"; then if test "%srcversion" != "%kernelrelease%variant"; then
mv linux-%srcversion linux-%kernelrelease%variant mv linux-%srcversion linux-%kernelrelease%variant
fi fi
%if %do_vanilla %if %do_vanilla
%if %vanilla_only
mv \
%else
cp -al \ cp -al \
%endif
linux-%kernelrelease%variant linux-%kernelrelease-vanilla linux-%kernelrelease%variant linux-%kernelrelease-vanilla
cd linux-%kernelrelease-vanilla cd linux-%kernelrelease-vanilla
%_sourcedir/apply-patches --vanilla %_sourcedir/series.conf %my_builddir %symbols %_sourcedir/apply-patches --vanilla %_sourcedir/series.conf %my_builddir %symbols
rm -f $(find . -name ".gitignore") rm -f $(find . -name ".gitignore")
# Hardlink duplicate files automatically (from package fdupes).
%fdupes $PWD
cd .. cd ..
%endif %endif
%if ! %vanilla_only
ln -sf linux%variant linux%variant # dummy symlink
cd linux-%kernelrelease%variant cd linux-%kernelrelease%variant
%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols %_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
rm -f $(find . -name ".gitignore") rm -f $(find . -name ".gitignore")
@ -187,30 +283,31 @@ rm -f $(find . -name ".gitignore")
if [ -f %_sourcedir/localversion ] ; then if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion cat %_sourcedir/localversion > localversion
fi fi
%endif
# Hardlink duplicate files automatically (from package fdupes). # Hardlink duplicate files automatically (from package fdupes).
%fdupes $RPM_BUILD_ROOT %fdupes $PWD
cd ..
popd
%install
%if ! %vanilla_only
# Install the documentation and example Kernel Module Package. # Install the documentation and example Kernel Module Package.
DOC=$RPM_BUILD_ROOT/usr/share/doc/packages/%name DOC=/usr/share/doc/packages/%name-%kernelrelease
mkdir -p $DOC mkdir -p %buildroot/$DOC
cp %_sourcedir/README.SUSE %_sourcedir/config-options.changes.txt $DOC cp %_sourcedir/README.SUSE %buildroot/$DOC
ln -s /usr/share/doc/packages/%name/README.SUSE %buildroot/%src_install_dir/ ln -s $DOC/README.SUSE %buildroot/%src_install_dir/
install -m 755 -d $RPM_BUILD_ROOT/etc/rpm %if "%variant" == ""
install -m 644 %_sourcedir/macros.kernel-source $RPM_BUILD_ROOT/etc/rpm/ install -m 755 -d %{buildroot}%{_rpmmacrodir}
install -m 755 -d $RPM_BUILD_ROOT/usr/lib/rpm install -m 644 %_sourcedir/macros.kernel-source %{buildroot}%{_rpmmacrodir}
install -m 644 %_sourcedir/kernel-module-subpackage \ echo "%%kernel_module_directory %{kernel_module_directory}" >> %{buildroot}%{_rpmmacrodir}/macros.kernel-source
$RPM_BUILD_ROOT/usr/lib/rpm/
for script in post; do install -m 755 -d %{buildroot}/usr/lib/rpm
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \ install -m 644 %_sourcedir/kernel-{module,cert}-subpackage \
-e "s:@SRCVARIANT@:%variant:g" \ %{buildroot}/usr/lib/rpm/
%_sourcedir/source-$script.sh > %name-$script.sh install -m 755 -d %{buildroot}/usr/lib/rpm/kernel
done 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" pushd "%buildroot"
perl "%_sourcedir/group-source-files.pl" \ perl "%_sourcedir/group-source-files.pl" \
@ -218,35 +315,17 @@ perl "%_sourcedir/group-source-files.pl" \
-L "%src_install_dir" -L "%src_install_dir"
popd 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_ }' -i "$f"
done
# kernel-source and kernel-$flavor-devel are built independently, but the # kernel-source and kernel-$flavor-devel are built independently, but the
# shipped sources (/usr/src/linux/) need to be older than generated files # 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 # (/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 # the future and be thus lower than the timestamps of files built from the
# source (bnc#669669). # source (bnc#669669).
ts="$(head -n1 %_sourcedir/source-timestamp)" ts="$(head -n1 %_sourcedir/source-timestamp)"
find %buildroot/usr/src/linux* ! -type l | xargs touch -d "$ts" find %buildroot/usr/src/linux* ! -type l -print0 | xargs -0 touch -d "$ts"
%post -f %name-post.sh
%post -n kernel-devel%variant -f %name-post.sh
%files -f nondevel.files
%defattr(-, root, root)
/usr/src/linux%variant-%kernelrelease/README.SUSE
%files -n kernel-devel%variant -f devel.files
%defattr(-,root,root)
%ghost /usr/src/linux%variant
/usr/share/doc/packages/%name
/etc/rpm/macros.kernel-source
/usr/lib/rpm/kernel-module-subpackage
%endif
%if %do_vanilla
%files vanilla
%defattr(-, root, root)
/usr/src/linux-%kernelrelease-vanilla
%endif
%changelog %changelog

View File

@ -1,7 +1,7 @@
# #
# spec file for package kernel-source@VARIANT@ # spec file for package kernel-source@VARIANT@
# #
# Copyright (c) @YEAR@ SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) @YEAR@ SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,59 +12,72 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# norootforbuild
# icecream 0
%define srcversion @SRCVERSION@ %define srcversion @SRCVERSION@
%define patchversion @PATCHVERSION@ %define patchversion @PATCHVERSION@
%define git_commit @COMMIT_FULL@
%define variant @VARIANT@%{nil} %define variant @VARIANT@%{nil}
%define vanilla_only @VANILLA_ONLY@
%include %_sourcedir/kernel-spec-macros %include %_sourcedir/kernel-spec-macros
%define src_install_dir usr/src/linux-%kernelrelease%variant %(chmod +x %_sourcedir/{@SCRIPTS@})
Name: kernel-source@VARIANT@ Name: kernel-source@VARIANT@
Summary: The Linux Kernel Sources
Version: @RPMVERSION@ Version: @RPMVERSION@
%if 0%{?is_kotd}
Release: <RELEASE>.g@COMMIT@
%else
Release: @RELEASE@ Release: @RELEASE@
License: GPL-2.0 %endif
Summary: The Linux Kernel Sources
License: GPL-2.0-only
Group: Development/Sources Group: Development/Sources
Url: http://www.kernel.org/ URL: https://www.kernel.org/
AutoReqProv: off AutoReqProv: off
BuildRequires: coreutils sed %if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
BuildRequires: bash-sh
%endif
BuildRequires: coreutils
BuildRequires: fdupes BuildRequires: fdupes
Requires(post): coreutils sed BuildRequires: sed
Provides: multiversion(kernel) %if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
Provides: linux BuildArch: noarch
Provides: %name = %version-%source_rel %else
Source0: @TARBALL_URL@linux-%srcversion.tar.bz2 ExclusiveArch: do_not_build
Source2: source-post.sh %endif
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: @TARBALL_URL@linux-%srcversion.tar.xz
%if "@TARBALL_URL@" != ""
Source1: @TARBALL_URL@linux-%srcversion.tar.sign
Source2: linux.keyring
%endif
Source3: kernel-source.rpmlintrc Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf Source14: series.conf
Source16: guards Source16: guards
Source17: apply-patches Source17: apply-patches
Source19: kernel-binary-conflicts
Source20: obsolete-kmps
Source21: config.conf Source21: config.conf
Source23: supported.conf Source23: supported.conf
Source33: check-for-config-changes Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl Source35: group-source-files.pl
Source36: README.PATCH-POLICY.SUSE
Source37: README.SUSE Source37: README.SUSE
Source38: README.KSYMS Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp Source40: source-timestamp
Source44: find-provides Source46: split-modules
Source45: split-modules Source47: modversions
Source46: modversions
Source48: macros.kernel-source Source48: macros.kernel-source
Source49: kernel-module-subpackage Source49: kernel-module-subpackage
Source50: kabi.pl Source50: kabi.pl
@ -74,16 +87,34 @@ Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in Source56: kernel-docs.spec.in
Source57: kernel-cert-subpackage
Source58: constraints.in
Source60: config.sh Source60: config.sh
Source61: compute-PATCHVERSION.sh Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf Source62: old-flavors
Source63: arch-symbols Source63: arch-symbols
Source64: package-descriptions Source64: package-descriptions
Source65: kernel-spec-macros Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh Source67: log.sh
Source68: host-memcpy-hack.h Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver Source69: try-disable-staging-driver
Source70: kernel-obs-build.spec.in
Source71: kernel-obs-qa.spec.in
Source72: compress-vmlinux.sh
Source73: dtb.spec.in.in
Source74: mkspec-dtb
Source75: release-projects
Source76: check-module-license
Source77: klp-symbols
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 Source100: config.tar.bz2
Source101: config.addon.tar.bz2 Source101: config.addon.tar.bz2
Source102: patches.arch.tar.bz2 Source102: patches.arch.tar.bz2
@ -91,25 +122,43 @@ Source103: patches.drivers.tar.bz2
Source104: patches.fixes.tar.bz2 Source104: patches.fixes.tar.bz2
Source105: patches.rpmify.tar.bz2 Source105: patches.rpmify.tar.bz2
Source106: patches.suse.tar.bz2 Source106: patches.suse.tar.bz2
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2 Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2 Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2 Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2 Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2 Source113: patches.kabi.tar.bz2
Source114: patches.drm.tar.bz2
Source120: kabi.tar.bz2 Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2 Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): coreutils sed
BuildArch: noarch
Prefix: /usr/src
# Source is only complete with devel files. # Source is only complete with devel files.
Requires: kernel-devel = %version-%release 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
%obsolete_rebuilds %name
%(chmod +x %_sourcedir/{@SCRIPTS@}) # 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 symbols %(set -- $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*)
%define variant_symbols %(case %name in (*-rt) echo "RT" ;; esac)
%define do_vanilla "%variant" == "" %define do_vanilla "%variant" == ""
@ -118,12 +167,23 @@ Linux kernel sources with many fixes and improvements.
%source_timestamp %source_timestamp
%post
%relink_function
relink linux-%kernelrelease%variant /usr/src/linux%variant
%files -f nondevel.files
%package -n kernel-devel%variant %package -n kernel-devel%variant
Summary: Development files needed for building kernel modules Summary: Development files needed for building kernel modules
Group: Development/Sources Group: Development/Sources
AutoReqProv: off AutoReqProv: off
Provides: multiversion(kernel)
Provides: kernel-devel%variant = %version-%source_rel 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 %description -n kernel-devel%variant
Kernel-level headers and Makefiles required for development of Kernel-level headers and Makefiles required for development of
@ -131,23 +191,62 @@ external kernel modules.
%source_timestamp %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 %package vanilla
Summary: Vanilla Linux kernel sources with minor build fixes. %obsolete_rebuilds %name-vanilla
Summary: Vanilla Linux kernel sources with minor build fixes
Group: Development/Sources Group: Development/Sources
AutoReqProv: off AutoReqProv: off
Provides: multiversion(kernel)
Provides: %name-vanilla = %version-%source_rel 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 %description vanilla
Vanilla Linux kernel sources with minor build fixes. Vanilla Linux kernel sources with minor build fixes.
%source_timestamp %source_timestamp
%if %do_vanilla
%files vanilla
/usr/src/linux-%kernelrelease-vanilla
%endif
%prep %prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "Please get a copy of linux-%srcversion.tar.bz2 from" \
"ftp://ftp.kernel.org/pub/linux/kernel/v2.6/."
fi
echo "Symbol(s): %symbols" echo "Symbol(s): %symbols"
@ -155,31 +254,28 @@ echo "Symbol(s): %symbols"
%setup -q -c -T @UNPACK_PATCHES@ %setup -q -c -T @UNPACK_PATCHES@
%build %build
mkdir -p $RPM_BUILD_ROOT/usr/src %install
cd $RPM_BUILD_ROOT/usr/src mkdir -p %{buildroot}/usr/src
pushd %{buildroot}/usr/src
# Unpack the vanilla kernel sources # Unpack the vanilla kernel sources
tar -xjf %_sourcedir/linux-%srcversion.tar.bz2 tar -xf %{S:0}
find . -xtype l -delete -printf "deleted '%f'\n"
if test "%srcversion" != "%kernelrelease%variant"; then if test "%srcversion" != "%kernelrelease%variant"; then
mv linux-%srcversion linux-%kernelrelease%variant mv linux-%srcversion linux-%kernelrelease%variant
fi fi
%if %do_vanilla %if %do_vanilla
%if %vanilla_only
mv \
%else
cp -al \ cp -al \
%endif
linux-%kernelrelease%variant linux-%kernelrelease-vanilla linux-%kernelrelease%variant linux-%kernelrelease-vanilla
cd linux-%kernelrelease-vanilla cd linux-%kernelrelease-vanilla
%_sourcedir/apply-patches --vanilla %_sourcedir/series.conf %my_builddir %symbols %_sourcedir/apply-patches --vanilla %_sourcedir/series.conf %my_builddir %symbols
rm -f $(find . -name ".gitignore") rm -f $(find . -name ".gitignore")
# Hardlink duplicate files automatically (from package fdupes).
%fdupes $PWD
cd .. cd ..
%endif %endif
%if ! %vanilla_only
ln -sf linux%variant linux%variant # dummy symlink
cd linux-%kernelrelease%variant cd linux-%kernelrelease%variant
%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols %_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
rm -f $(find . -name ".gitignore") rm -f $(find . -name ".gitignore")
@ -187,30 +283,31 @@ rm -f $(find . -name ".gitignore")
if [ -f %_sourcedir/localversion ] ; then if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion cat %_sourcedir/localversion > localversion
fi fi
%endif
# Hardlink duplicate files automatically (from package fdupes). # Hardlink duplicate files automatically (from package fdupes).
%fdupes $RPM_BUILD_ROOT %fdupes $PWD
cd ..
popd
%install
%if ! %vanilla_only
# Install the documentation and example Kernel Module Package. # Install the documentation and example Kernel Module Package.
DOC=$RPM_BUILD_ROOT/usr/share/doc/packages/%name DOC=/usr/share/doc/packages/%name-%kernelrelease
mkdir -p $DOC mkdir -p %buildroot/$DOC
cp %_sourcedir/README.SUSE %_sourcedir/config-options.changes.txt $DOC cp %_sourcedir/README.SUSE %buildroot/$DOC
ln -s /usr/share/doc/packages/%name/README.SUSE %buildroot/%src_install_dir/ ln -s $DOC/README.SUSE %buildroot/%src_install_dir/
install -m 755 -d $RPM_BUILD_ROOT/etc/rpm %if "%variant" == ""
install -m 644 %_sourcedir/macros.kernel-source $RPM_BUILD_ROOT/etc/rpm/ install -m 755 -d %{buildroot}%{_rpmmacrodir}
install -m 755 -d $RPM_BUILD_ROOT/usr/lib/rpm install -m 644 %_sourcedir/macros.kernel-source %{buildroot}%{_rpmmacrodir}
install -m 644 %_sourcedir/kernel-module-subpackage \ echo "%%kernel_module_directory %{kernel_module_directory}" >> %{buildroot}%{_rpmmacrodir}/macros.kernel-source
$RPM_BUILD_ROOT/usr/lib/rpm/
for script in post; do install -m 755 -d %{buildroot}/usr/lib/rpm
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \ install -m 644 %_sourcedir/kernel-{module,cert}-subpackage \
-e "s:@SRCVARIANT@:%variant:g" \ %{buildroot}/usr/lib/rpm/
%_sourcedir/source-$script.sh > %name-$script.sh install -m 755 -d %{buildroot}/usr/lib/rpm/kernel
done 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" pushd "%buildroot"
perl "%_sourcedir/group-source-files.pl" \ perl "%_sourcedir/group-source-files.pl" \
@ -218,35 +315,17 @@ perl "%_sourcedir/group-source-files.pl" \
-L "%src_install_dir" -L "%src_install_dir"
popd 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_ }' -i "$f"
done
# kernel-source and kernel-$flavor-devel are built independently, but the # kernel-source and kernel-$flavor-devel are built independently, but the
# shipped sources (/usr/src/linux/) need to be older than generated files # 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 # (/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 # the future and be thus lower than the timestamps of files built from the
# source (bnc#669669). # source (bnc#669669).
ts="$(head -n1 %_sourcedir/source-timestamp)" ts="$(head -n1 %_sourcedir/source-timestamp)"
find %buildroot/usr/src/linux* ! -type l | xargs touch -d "$ts" find %buildroot/usr/src/linux* ! -type l -print0 | xargs -0 touch -d "$ts"
%post -f %name-post.sh
%post -n kernel-devel%variant -f %name-post.sh
%files -f nondevel.files
%defattr(-, root, root)
/usr/src/linux%variant-%kernelrelease/README.SUSE
%files -n kernel-devel%variant -f devel.files
%defattr(-,root,root)
%ghost /usr/src/linux%variant
/usr/share/doc/packages/%name
/etc/rpm/macros.kernel-source
/usr/lib/rpm/kernel-module-subpackage
%endif
%if %do_vanilla
%files vanilla
%defattr(-, root, root)
/usr/src/linux-%kernelrelease-vanilla
%endif
%changelog %changelog

View File

@ -6,31 +6,82 @@
%define using_buildservice 0%{?opensuse_bs} %define using_buildservice 0%{?opensuse_bs}
# source_rel is the package release string, without the rebuild counter %if ! 0%{?using_buildservice}
# generated by the build service. In non-official builds, the upstream %define using_buildservice 0%(echo %disturl | grep -q '^obs://build\.[^.]*suse\.' && echo 1)
# EXTRAVERSION component is also part of the release string,
# e.g. next.20110101.9.6 (hyphens are replaced by periods). Builds in the
# official distribution projects replace the release string though.
%define source_rel %release
%if %using_buildservice
%define source_rel %(release=%release; echo ${release%.*})
%endif %endif
# release_num is the numeric source revision part of the release number, # TW is usrmerged
# i.e. source_rel without the upstream tags like -rcX. A hyphen is added %if 0%{?suse_version} >= 1550
# automatically for convenient use. %define usrmerged 1
# examples: rc3 -> "", rc3.1 -> -1, next.20110101.9 -> -9 %else
# %define usrmerged 0
# patchversion is inserted into the spec files by the mkspec script, it is the %endif
# upstream release string unchanged, e.g. 2.6.38-rc3
%define release_num %(upstream=%patchversion; upstream=${upstream#%version}; upstream=${upstream#-}; upstream=${upstream//-/.}; rel="%source_rel" ; res="${rel#$upstream}"; res=${res#.}; echo ${res:+-}${res}) # 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 # how the kernel release string (uname -r) should look like
%define kernelrelease %patchversion%release_num %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} %define my_builddir %_builddir/%{name}-%{version}
# macro to add the source timestamp to package descriptions # macro to add the source timestamp to package descriptions
%define source_timestamp %(sed '1s/^/Source Timestamp: /' %_sourcedir/source-timestamp || :) %define source_timestamp %(sed '1s/^/Source Timestamp: /' %_sourcedir/source-timestamp || :)
# vim: ft=spec # 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

72
kernel-subpackage-build Normal file
View File

@ -0,0 +1,72 @@
#!/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"
dd if=/dev/null bs=1 count=0 status=none seek="$size" of="$RPM_BUILD_ROOT$name"
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

109
kernel-subpackage-spec Normal file
View File

@ -0,0 +1,109 @@
%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
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

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# #
# spec file for package kernel-syms # spec file for package kernel-syms
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,69 +12,62 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# norootforbuild
%define git_commit 099023b3ad8e1f4420d5eb954f757ec8d0cc4a5a
%define variant %{nil} %define variant %{nil}
%include %_sourcedir/kernel-spec-macros %include %_sourcedir/kernel-spec-macros
Name: kernel-syms Name: kernel-syms
Summary: Kernel Symbol Versions (modversions) Version: 6.11.8
Version: 3.8.2
%if %using_buildservice %if %using_buildservice
%if 0%{?is_kotd}
Release: <RELEASE>.g099023b
%else
Release: 0 Release: 0
%endif
%else %else
%define kernel_source_release %(LC_ALL=C rpm -q kernel-devel%variant-%version --qf "%{RELEASE}" | grep -v 'not installed' || echo 0) %define kernel_source_release %(LC_ALL=C rpm -q kernel-devel%variant-%version --qf "%{RELEASE}" | grep -v 'not installed' || echo 0)
Release: %kernel_source_release Release: %kernel_source_release
%endif %endif
License: GPL-2.0 Summary: Kernel Symbol Versions (modversions)
License: GPL-2.0-only
Group: Development/Sources Group: Development/Sources
Url: http://www.kernel.org/ URL: https://www.kernel.org/
AutoReqProv: off
BuildRequires: coreutils BuildRequires: coreutils
%ifarch armv7hl %if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
Requires: kernel-cubox-devel = %version-%source_rel ExclusiveArch: %ix86 aarch64 armv6hl armv7hl ppc64le riscv64 s390x x86_64
%else
ExclusiveArch: do_not_build
%endif %endif
%ifarch aarch64 armv7hl %ix86 ia64 ppc ppc64 s390x x86_64 Prefix: /usr/src
AutoReqProv: off
Source: README.KSYMS
%ifarch aarch64
Requires: kernel-64kb-devel = %version-%source_rel
%endif
%ifarch aarch64 armv6hl armv7hl %ix86 ppc64le riscv64 s390x x86_64
Requires: kernel-default-devel = %version-%source_rel Requires: kernel-default-devel = %version-%source_rel
%endif %endif
%ifarch %ix86 x86_64
Requires: kernel-desktop-devel = %version-%source_rel
%endif
%ifarch armv7hl %ifarch armv7hl
Requires: kernel-exynos-devel = %version-%source_rel Requires: kernel-lpae-devel = %version-%source_rel
%endif
%ifarch armv7hl
Requires: kernel-imx51-devel = %version-%source_rel
%endif
%ifarch armv7hl
Requires: kernel-omap2plus-devel = %version-%source_rel
%endif %endif
%ifarch %ix86 %ifarch %ix86
Requires: kernel-pae-devel = %version-%source_rel Requires: kernel-pae-devel = %version-%source_rel
%endif %endif
%ifarch s390 Requires: pesign-obs-integration
Requires: kernel-s390-devel = %version-%source_rel
%endif
%ifarch armv7hl
Requires: kernel-u8500-devel = %version-%source_rel
%endif
%ifarch armv5tel
Requires: kernel-versatile-devel = %version-%source_rel
%endif
%ifarch %ix86 x86_64
Requires: kernel-xen-devel = %version-%source_rel
%endif
Provides: multiversion(kernel)
Provides: %name = %version-%source_rel
Source: README.KSYMS
Requires: kernel-devel%variant = %version-%source_rel Requires: kernel-devel%variant = %version-%source_rel
BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: %name = %version-%source_rel
ExclusiveArch: %ix86 aarch64 armv5tel armv7hl ia64 ppc ppc64 s390 s390x x86_64 Provides: %name-srchash-%git_commit
Prefix: /usr/src 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 %description
Kernel symbols, such as functions and variables, have version Kernel symbols, such as functions and variables, have version
@ -86,14 +79,14 @@ package dependencies.
%source_timestamp %source_timestamp
%files
%dir %_docdir/%name
%_docdir/%name/README.SUSE
%prep %prep
%install %install
install -m 644 -D %{SOURCE0} %buildroot/%_docdir/%name/README.SUSE install -m 644 -D %{SOURCE0} %buildroot/%_docdir/%name/README.SUSE
%files
%defattr(-, root, root)
%dir %_docdir/%name
%_docdir/%name/README.SUSE
%changelog %changelog

View File

@ -1,7 +1,7 @@
# #
# spec file for package kernel-syms@VARIANT@ # spec file for package kernel-syms@VARIANT@
# #
# Copyright (c) @YEAR@ SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) @YEAR@ SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,37 +12,51 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# norootforbuild
%define git_commit @COMMIT_FULL@
%define variant @VARIANT@%{nil} %define variant @VARIANT@%{nil}
%include %_sourcedir/kernel-spec-macros %include %_sourcedir/kernel-spec-macros
Name: kernel-syms@VARIANT@ Name: kernel-syms@VARIANT@
Summary: Kernel Symbol Versions (modversions)
Version: @RPMVERSION@ Version: @RPMVERSION@
%if %using_buildservice %if %using_buildservice
%if 0%{?is_kotd}
Release: <RELEASE>.g@COMMIT@
%else
Release: @RELEASE@ Release: @RELEASE@
%endif
%else %else
%define kernel_source_release %(LC_ALL=C rpm -q kernel-devel%variant-%version --qf "%{RELEASE}" | grep -v 'not installed' || echo 0) %define kernel_source_release %(LC_ALL=C rpm -q kernel-devel%variant-%version --qf "%{RELEASE}" | grep -v 'not installed' || echo 0)
Release: %kernel_source_release Release: %kernel_source_release
%endif %endif
License: GPL-2.0 Summary: Kernel Symbol Versions (modversions)
License: GPL-2.0-only
Group: Development/Sources Group: Development/Sources
Url: http://www.kernel.org/ URL: https://www.kernel.org/
AutoReqProv: off
BuildRequires: coreutils BuildRequires: coreutils
@REQUIRES@ %if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
Provides: multiversion(kernel)
Provides: %name = %version-%source_rel
Source: README.KSYMS
Requires: kernel-devel%variant = %version-%source_rel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: @ARCHS@ ExclusiveArch: @ARCHS@
%else
ExclusiveArch: do_not_build
%endif
Prefix: /usr/src Prefix: /usr/src
AutoReqProv: off
Source: README.KSYMS
@REQUIRES@
Requires: pesign-obs-integration
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 %description
Kernel symbols, such as functions and variables, have version Kernel symbols, such as functions and variables, have version
@ -54,14 +68,14 @@ package dependencies.
%source_timestamp %source_timestamp
%files
%dir %_docdir/%name
%_docdir/%name/README.SUSE
%prep %prep
%install %install
install -m 644 -D %{SOURCE0} %buildroot/%_docdir/%name/README.SUSE install -m 644 -D %{SOURCE0} %buildroot/%_docdir/%name/README.SUSE
%files
%defattr(-, root, root)
%dir %_docdir/%name
%_docdir/%name/README.SUSE
%changelog %changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,967 +0,0 @@
#
# spec file for package kernel-trace
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor trace
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-trace
Summary: The Standard Kernel with Tracing Features
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
%ifarch ppc64
Provides: kernel-kdump
Obsoletes: kernel-kdump
%endif
%ifarch s390
Provides: kernel-32bit
Obsoletes: kernel-32bit
%endif
%ifarch s390x
Provides: kernel-64bit
Obsoletes: kernel-64bit
%endif
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 ia64 ppc64 s390 s390x x86_64
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
This kernel has different tracing features enabled (e.g. utrace, ftrace).
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: The Standard Kernel with Tracing Features - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
This kernel has different tracing features enabled (e.g. utrace, ftrace).
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: The Standard Kernel with Tracing Features - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
This kernel has different tracing features enabled (e.g. utrace, ftrace).
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,959 +0,0 @@
#
# spec file for package kernel-u8500
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor u8500
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-u8500
Summary: Kernel for ST-Ericsson's Nova SoC
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: armv7hl
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The standard kernel for ST-Ericsson's Nova SoC, as found in
devices like the Snowball.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: Kernel for ST-Ericsson's Nova SoC - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The standard kernel for ST-Ericsson's Nova SoC, as found in
devices like the Snowball.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: Kernel for ST-Ericsson's Nova SoC - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The standard kernel for ST-Ericsson's Nova SoC, as found in
devices like the Snowball.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,956 +0,0 @@
#
# spec file for package kernel-versatile
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor versatile
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-versatile
Summary: Kernel for Versatile SoC
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: armv5tel
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The standard kernel for Versatile SoC, or for emulation with QEMU.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: Kernel for Versatile SoC - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The standard kernel for Versatile SoC, or for emulation with QEMU.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: Kernel for Versatile SoC - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The standard kernel for Versatile SoC, or for emulation with QEMU.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,965 +0,0 @@
#
# spec file for package kernel-xen
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
# This makes the OBS store the project cert as %_sourcedir/_projectcert.crt
# needssslcertforbuild
%define srcversion 3.8
%define patchversion 3.8.2
%define variant %{nil}
%define vanilla_only 0
%include %_sourcedir/kernel-spec-macros
%define build_flavor xen
%define build_default (%build_flavor == "default")
%define build_kdump (%build_flavor == "kdump")
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
%define build_vanilla (%build_flavor == "vanilla")
%define build_ps3 (%build_flavor == "ps3")
%define build_src_dir %my_builddir/linux-%srcversion
%define src_install_dir /usr/src/linux-%kernelrelease%variant
%define obj_install_dir %src_install_dir-obj
%define rpm_install_dir %buildroot%obj_install_dir
%define kernel_build_dir %my_builddir/linux-obj
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,check-supported-list,group-source-files.pl,find-provides,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,configtool.pl,log.sh,try-disable-staging-driver})
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
%define cpu_arch_flavor %cpu_arch/%build_flavor
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT CONFIG_EFI_STUB
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
%ifarch %ix86 x86_64
%define install_vdso 1
%else
%define install_vdso 0
%endif
Name: kernel-xen
Summary: The Xen Kernel
Version: 3.8.2
Release: 0
License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/
BuildRequires: coreutils module-init-tools sparse bc
BuildRequires: fdupes
# Used to sign the kernel in the buildservice
BuildRequires: pesign-obs-integration
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
%if %split_base
Provides: kernel-base = %version-%source_rel
# Obsolete the -base subpackage from 11.1 and 11.2 development phase
Obsoletes: %name-base <= 2.6.31
%endif
Requires(pre): coreutils awk
# Need a module-init-tools with /usr/lib/module-init-tools/weak-modules2
Requires(post): module-init-tools >= 3.4
# This Requires is wrong, because the post/postun scripts have a
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
# But, there is no way to tell rpm or yast to schedule the installation
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
# packages to install/update. Likewise, this is true for mkinitrd.
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
Requires(post): perl-Bootloader >= 0.4.15
%if %build_vanilla
Requires(post): mkinitrd
%else
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
Requires(post): mkinitrd >= 2.7.1
%endif
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
# Do not install p-b and mkinitrd for the install check, the %post script is
# able to handle this
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
# Remove some packages that are installed automatically by the build system,
# but are not needed to build the kernel
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools m4 udev insserv
%ifarch ia64
# arch/ia64/scripts/unwcheck.py
BuildRequires: python
%endif
%ifarch s390 s390x
%if %build_vanilla && 0%{?suse_version} < 1130
BuildRequires: dwarfextract
%endif
%endif
%ifarch %arm
BuildRequires: u-boot-tools
%endif
%if %build_xen
%ifarch %ix86
%if %build_flavor != "ec2"
Provides: kernel-xenpae = %version
Obsoletes: kernel-xenpae < %version
%endif
%endif
#!BuildIgnore: xen
%endif
Provides: %name-nongpl = %version
Obsoletes: %name-nongpl < %version
%if %build_vanilla
# force bzip2 instead of lzma compression to allow install on older dist versions
%define _binary_payload w9.bzdio
%endif
# dead network if installed on SLES10, otherwise it will work (mostly)
Conflicts: sysfsutils < 2.0
Conflicts: apparmor-profiles <= 2.1
Conflicts: apparmor-parser < 2.3
# root-lvm only works with newer udevs
Conflicts: udev < 118
Conflicts: lvm2 < 2.02.33
# Interface to hv_kvp_daemon changed
Conflicts: hyper-v < 4
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source34: check-supported-list
Source35: group-source-files.pl
Source37: README.SUSE
Source38: README.KSYMS
Source39: config-options.changes.txt
Source40: source-timestamp
Source44: find-provides
Source45: split-modules
Source46: modversions
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source51: mkspec
Source52: kernel-source%variant.changes
Source53: kernel-source.spec.in
Source54: kernel-binary.spec.in
Source55: kernel-syms.spec.in
Source56: kernel-docs.spec.in
Source60: config.sh
Source61: compute-PATCHVERSION.sh
Source62: old-packages.conf
Source63: arch-symbols
Source64: package-descriptions
Source65: kernel-spec-macros
Source66: configtool.pl
Source67: log.sh
Source68: host-memcpy-hack.h
Source69: try-disable-staging-driver
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
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source120: kabi.tar.bz2
Source121: sysctl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
%define kmp_target_cpu %_target_cpu
%ifarch %ix86
# Only i386/default supports i586, mark other flavors' packages as i686
%if ! %build_default
BuildArch: i686
# KMPs are always built as i586, because rpm does not allow to build
# subpackages for different architectures. Therefore, we change the
# /usr/src/linux-obj/<arch> symlink to i586.
%define kmp_target_cpu i586
%endif
%endif
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 120
NoSource: 121
# The following KMPs have been integrated into the kernel package,
# grouped by the last product that contained them.
# sles10 / 10.3
Obsoletes: iwlwifi-kmp-%build_flavor
Obsoletes: ipw3945-kmp-%build_flavor
# sles10 / 11.0
Obsoletes: uvcvideo-kmp-%build_flavor
# 11.0
Obsoletes: atl2-kmp-%build_flavor
Obsoletes: wlan-ng-kmp-%build_flavor
Obsoletes: et131x-kmp-%build_flavor
Obsoletes: ivtv-kmp-%build_flavor
Obsoletes: at76_usb-kmp-%build_flavor
Obsoletes: pcc-acpi-kmp-%build_flavor
Obsoletes: btusb-kmp-%build_flavor
# sle11-ga
Obsoletes: enic-kmp-%build_flavor
Obsoletes: fnic-kmp-%build_flavor
Obsoletes: brocade-bfa-kmp-%build_flavor
Obsoletes: kvm-kmp-%build_flavor
Obsoletes: perfmon-kmp-%build_flavor
Obsoletes: iwlagn-2-6-27-kmp-%build_flavor
Obsoletes: msi-wmi-kmp-%build_flavor
# sle11
Obsoletes: ocfs2-kmp-%build_flavor
# 11.1
Obsoletes: quickcam-kmp-%build_flavor < 0.6.7
# Provide the exported symbols as "ksym(symbol) = hash"
%define __find_provides %_sourcedir/find-provides %name
# Will modules not listed in supported.conf abort the kernel build (0/1)?
%define supported_modules_check 0
%description
The Linux kernel for Xen paravirtualization.
This kernel can be used both as the domain0 ("xen0") and as an
unprivileged ("xenU") kernel.
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
echo "The %name-%version.nosrc.rpm package does not contain the" \
"complete sources. Please install kernel-source-%version.src.rpm."
exit 1
fi
SYMBOLS=
if test -e %_sourcedir/extra-symbols; then
SYMBOLS=$(cat %_sourcedir/extra-symbols)
echo "extra symbol(s):" $SYMBOLS
fi
# Unpack all sources and patches
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120 -a 121
mkdir -p %kernel_build_dir
supported_conf() {
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
sed 's,.*/,,; s,\.ko$,,' | sort -u
}
# Generate the list of modules to be marked as supported
{ supported_conf base
supported_conf --default=0 external | sed 's/$/ external/'
} > %kernel_build_dir/Module.supported
supported_conf --default=0 base >%kernel_build_dir/Module.base
cd linux-%srcversion
%_sourcedir/apply-patches \
%if %{build_vanilla}
--vanilla \
%endif
%_sourcedir/series.conf .. $SYMBOLS
cd %kernel_build_dir
# Override the timestamp 'uname -v' reports with the source timestamp and
# the commit hash.
date=$(head -n 1 %_sourcedir/source-timestamp)
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
cat > .kernel-binary.spec.buildenv <<EOF
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
export KBUILD_VERBOSE=0
export KBUILD_SYMTYPES=1
export KBUILD_OVERRIDE=1
export KBUILD_BUILD_USER=geeko
export KBUILD_BUILD_HOST=buildhost
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
EOF
source .kernel-binary.spec.buildenv
if [ -f %_sourcedir/localversion ] ; then
cat %_sourcedir/localversion > localversion
fi
if test -e ../config.addon/%cpu_arch_flavor; then
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
# the top of the specfile
%_sourcedir/configtool.pl ../config{,.addon}/%cpu_arch_flavor >.config
else
cp ../config/%cpu_arch_flavor .config
fi
%build_src_dir/scripts/config \
--set-str CONFIG_LOCALVERSION %release_num-%build_flavor \
--enable CONFIG_SUSE_KERNEL \
%if 0%{?__debug_package:1}
--enable CONFIG_DEBUG_INFO \
--disable CONFIG_DEBUG_INFO_REDUCED
%else
--disable CONFIG_DEBUG_INFO
%endif
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
yes '' | make oldconfig $MAKE_ARGS
else
cp .config .config.orig
make silentoldconfig $MAKE_ARGS < /dev/null
%_sourcedir/check-for-config-changes .config.orig .config
rm .config.orig
fi
make prepare $MAKE_ARGS
make scripts $MAKE_ARGS
krel=$(make -s kernelrelease $MAKE_ARGS)
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
exit 1
fi
make clean $MAKE_ARGS
rm -f source
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
%build
cd %kernel_build_dir
source .kernel-binary.spec.buildenv
# create *.symref files in the tree
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
%_sourcedir/modversions --unpack . < $_
fi
# The %{_smp_mflags} macro is defined to a number, make will spawn that many jobs.
# There are several ways how to define it:
# If you are using the build script:
# build --jobs=N kernel-$flavor.spec
# With plain rpmbuild:
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
# To spawn as many jobs as there are cpu cores:
# rpmbuild -ba --define "%_smp_mflags -j 0$(grep -Ec 'cpu[0-9]' /proc/stat)" \
# kernel-$flavor.spec
# You can also set this permanently in ~/.rpmmacros:
# %_smp_mflags -j 0%(grep -Ec 'cpu[0-9]' /proc/stat)
%if %CONFIG_KMSG_IDS == "y"
chmod +x ../linux-%srcversion/scripts/kmsg-doc
MAKE_ARGS="$MAKE_ARGS D=2"
%endif
while true; do
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
| tee buildlog
if test "${PIPESTATUS[0]}" -eq 0; then
break
fi
# In the linux-next and vanilla branches, we try harder to build a
# package.
if test 0%vanilla_only -gt 0 &&
%_sourcedir/try-disable-staging-driver buildlog; then
echo "Retrying make"
else
exit 1
fi
done
%install
%if %CONFIG_EFI_STUB == "y"
# sign the kernel in the buildservice
%ifarch x86_64
# XXX: only do it on x86_64, as the repackaging changes kernel-pae
# from i686 to i586
export BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
%endif
%endif
# 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-*'
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
# kernel-devel package is installed. Don't check for stale symlinks
# in the brp-symlink check:
export NO_BRP_STALE_LINK_ERROR=yes
cd %kernel_build_dir
mkdir -p %buildroot/boot
# (Could strip out non-public symbols.)
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
add_vmlinux()
{
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor compressed=false
if test $1 == "--compressed"; then
compressed=true
fi
cp vmlinux %buildroot/$vmlinux
>%my_builddir/vmlinux.debug.files
%if 0%{?__debug_package:1}
if $compressed; then
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
mkdir -p $(dirname %buildroot/$vmlinux_debug)
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
-l vmlinux.sourcefiles %buildroot/$vmlinux
# FIXME: create and package build-id symlinks
objcopy --only-keep-debug \
%buildroot/$vmlinux \
%buildroot/$vmlinux_debug || :
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
--strip-debug \
%buildroot/$vmlinux || :
mkdir -p %buildroot/usr/src/debug
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
else
# make vmlinux executable so that find-debuginfo.sh picks it up
# (TODO: fix find-debuginfo.sh instead)
chmod +x %buildroot/$vmlinux
fi
%endif
if $compressed; then
gzip -n -9 %buildroot/$vmlinux
chmod a-x %buildroot/$vmlinux.gz
fi
}
%if %build_kdump
add_vmlinux
image=vmlinux
%else
# architecture specifics
%ifarch %ix86 x86_64
add_vmlinux --compressed
image=bzImage
%if %build_xen
test -f arch/x86/boot/$image || image=vmlinuz
%endif
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch alpha
add_vmlinux --compressed
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch ppc ppc64
add_vmlinux
image=vmlinux
%endif
%ifarch ia64
add_vmlinux --compressed
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinuz
%endif
%ifarch s390 s390x
add_vmlinux --compressed
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
image=image
if test -e arch/s390/boot/kerntypes.o; then
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
elif test -x "$(which dwarfextract 2>/dev/null)"; then
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
fi
%if %CONFIG_KMSG_IDS == "y"
mkdir -p %buildroot/usr/share/man/man9
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
%endif
%endif
%ifarch sparc64
add_vmlinux --compressed
image=zImage
cp -p arch/sparc/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
image=vmlinux
%endif
%ifarch %arm
add_vmlinux --compressed
case "%build_flavor" in
default)
image=zImage
;;
*)
# quickly compile uImage so we have something to boot from
make %{?_smp_mflags} uImage $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
image=uImage
;;
esac
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
%ifarch aarch64
add_vmlinux --compressed
image=Image
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
%endif
# end of build_kdump
%endif
for sub in '-base' '' '-extra'; do
case "$sub" in
'-base' | '') base_package=1 ;;
*) base_package=0 ;;
esac
for script in preun postun pre post devel-pre devel-post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
-e "s:@IMAGE@:$image:g" \
-e "s:@FLAVOR""@:%build_flavor:g" \
-e "s:@SUBPACKAGE@:%name$sub:g" \
-e "s:@BASE_PACKAGE@:$base_package:g" \
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
done
done
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
# keep this -suffix list in sync with post.sh and postun.sh
suffix=-%build_flavor
%endif
ln -s $image$suffix %buildroot/boot/$image$suffix
ln -s initrd$suffix %buildroot/boot/initrd$suffix
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
if [ -f "$file" ]; then
cat "$file"
fi
done | sed '1i # Generated file - do not edit.' >$sysctl_file
if [ ! -s $sysctl_file ]; then
rm $sysctl_file
fi
%if %install_vdso
# Install the unstripped vdso's that are linked in the kernel image
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
%endif
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
if ! %_sourcedir/check-supported-list \
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
%if %supported_modules_check
exit 1
%endif
echo "Consistency check error: please update supported.conf."
fi
%ifarch s390 s390x
if test -e arch/s390/boot/kerntypes.o; then
:
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
find %buildroot -name "*.ko" > kofiles.list
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
fi
%endif
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
# so that kernel-devel + kernel-%build_flavor is sufficient for building
# modules that have modversions as well.
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
# Table of types used in exported symbols (for modversion debugging).
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
else
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
fi
# Some architecture's $(uname -m) output is different from the ARCH
# parameter that needs to be passed to kbuild. Create symlinks from
# $(uname -m) to the ARCH directory.
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
fi
# We were building in %my_builddir/linux-%srcversion, but the sources will
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
# build symlink.
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
ln -s %src_install_dir \
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
# Abort if there are any undefined symbols
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
exit 1
fi
%if %split_base
%_sourcedir/split-modules -d %buildroot \
-o %my_builddir \
-b %kernel_build_dir/Module.base \
%if ! %supported_modules_check
-i \
%endif
-s %kernel_build_dir/Module.supported
%if ! %split_extra
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
%endif
%else
( cd %buildroot
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
) > %my_builddir/base-modules
%endif
res=0
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
# check for kabi changes
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
Module.symvers || res=$?
fi
if [ $res -ne 0 ]; then
# %ignore_kabi_badness is defined in the Kernel:* projects in the
# OBS to be able to build the KOTD in spite of kabi errors
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
"directory to build this kernel even though its badness is" \
"higher than allowed for an official kernel."
exit 1
fi
fi
# arch/powerpc/lib/crtsavres.o is required for building external
# modules on powerpc
if [ -f %kernel_build_dir/arch/powerpc/lib/crtsavres.o ]; then
echo arch/powerpc/lib/crtsavres.o >> %my_builddir/obj-files
fi
tar -cf - -T %my_builddir/obj-files | \
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
# bnc#507084
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
while read f; do
case "$(file -b "$f")" in
ELF\ *\ executable*)
strip "$f"
esac
done
# Replace the absolute with a relative path
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
%rpm_install_dir/%cpu_arch_flavor/Makefile
fi
add_dirs_to_filelist() {
sed -rn '
# print file name
p
# remove filelist macros
s:%%[a-z]+(\([^)]+\))? ?::g
# add %%dir prefix
s:^:%%dir :
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
}
# Collect the file lists.
shopt -s nullglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f" >> %my_builddir/kernel-devel.files
done
{ cd %buildroot
find boot \
\( -type l -o -name 'initrd-*' \) -printf '%%%%ghost /%%p\n' -o \
-type f -name 'vmlinux-*' -printf '%%%%attr(0644, root, root) /%%p\n' -o \
-type f -printf '/%%p\n'
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
# the file gets removed when uninstalling the kernel.
echo '%%ghost /boot/initrd-%kernelrelease-%build_flavor-kdump'
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-%build_flavor-kdump
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -printf '/%%p\n'
cat %my_builddir/base-modules
fi
test -d lib/firmware/%kernelrelease-%build_flavor && \
find lib/firmware/%kernelrelease-%build_flavor \
-type d -o \
-printf '/%%p\n'
if [ -e .%_docdir/%name ]; then
echo "%%doc %_docdir/%name"
fi
} | sort -u >%my_builddir/tmp
cat %my_builddir/tmp %my_builddir/kernel-devel.files | sort | uniq -u | \
add_dirs_to_filelist >%my_builddir/kernel-base.files
rm %my_builddir/tmp
%if %split_base
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
> %my_builddir/kernel-main.files
%endif
%if %split_extra
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
%endif
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%preun -f preun.sh
%postun -f postun.sh
%pre -f pre.sh
%post -f post.sh
%if %split_base
%files -f kernel-main.files
%defattr(-, root, root)
%else
%files -f kernel-base.files
%defattr(-, root, root)
%endif
%package base
Summary: The Xen Kernel - base modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: kernel-base = %version-%source_rel
Conflicts: %name = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description base
The Linux kernel for Xen paravirtualization.
This kernel can be used both as the domain0 ("xen0") and as an
unprivileged ("xenU") kernel.
This package contains only the base modules, required in all installs.
%source_timestamp
%preun base -f preun-base.sh
%postun base -f postun-base.sh
%pre base -f pre-base.sh
%post base -f post-base.sh
%if %split_base
%files base -f kernel-base.files
%defattr(-, root, root)
%endif
%package extra
Summary: The Xen Kernel - Unsupported kernel modules
Group: System/Kernel
Url: http://www.kernel.org/
Provides: multiversion(kernel)
Provides: %name-extra_%_target_cpu = %version-%release
Provides: kernel-extra = %version-%source_rel
Requires: %{name}_%_target_cpu = %version-%release
Requires(pre): coreutils awk
Requires(post): module-init-tools
Requires(post): perl-Bootloader
Requires(post): mkinitrd
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
%ifarch %ix86
Conflicts: libc.so.6()(64bit)
%endif
%description extra
The Linux kernel for Xen paravirtualization.
This kernel can be used both as the domain0 ("xen0") and as an
unprivileged ("xenU") kernel.
This package contains additional modules not supported by Novell.
%source_timestamp
%preun extra -f preun-extra.sh
%postun extra -f postun-extra.sh
%pre extra -f pre-extra.sh
%post extra -f post-extra.sh
%if %split_extra
%files extra -f kernel-extra.files
%defattr(-, root, root)
%endif
%if %CONFIG_KMSG_IDS == "y"
%package man
Summary: The collection of man pages generated by the kmsg script.
Group: System/Kernel
%description man
This package includes the man pages that have been generated from the
kmsg message documentation comments.
%source_timestamp
%files man
%defattr(-,root,root)
/usr/share/man/man9/*
%endif
%package devel
Summary: Development files necessary for building kernel modules
Group: Development/Sources
Provides: multiversion(kernel)
Provides: %name-devel = %version-%source_rel
Requires: kernel-devel%variant = %version-%source_rel
Supplements: packageand(%name:kernel-devel%variant)
PreReq: coreutils
%description devel
This package contains files necessary for building kernel modules (and
kernel module packages) against the %build_flavor flavor of the kernel.
%source_timestamp
%if %CONFIG_MODULES == "y"
%pre devel -f devel-pre.sh
%post devel -f devel-post.sh
%files devel -f kernel-devel.files
%defattr(-,root,root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
%dir /usr/src/linux-obj
%dir /usr/src/linux-obj/%cpu_arch
%ghost /usr/src/linux-obj/%cpu_arch_flavor
%obj_install_dir/%cpu_arch_flavor
%if %kmp_target_cpu != %cpu_arch
%obj_install_dir/%kmp_target_cpu
/usr/src/linux-obj/%kmp_target_cpu
%endif
%endif
%package devel-debuginfo
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
Summary: Debug information for package %name-devel
Group: Development/Debug
%description devel-debuginfo
Debug information for package %name-devel
%source_timestamp
%files devel-debuginfo -f vmlinux.debug.files
%changelog

165739
kernel-zfcpdump.changes Normal file

File diff suppressed because it is too large Load Diff

2028
kernel-zfcpdump.spec Normal file

File diff suppressed because it is too large Load Diff

72
klp-symbols Normal file
View File

@ -0,0 +1,72 @@
#!/bin/bash
set -e
export LC_COLLATE=C
usage()
{
echo "Tool to generate list of symbols that are used to build kernel livepatches"
echo
echo "Usage: ${0##*/} kernel_build_dir klp_symbols"
echo " kernel_build_dir Directory where to find the built kernel binaries"
echo " klp_symbols Output file with the list of symbols"
}
if test "$1" == "-h" -o "$1" == "--help" -o $# -ne 2 ; then
usage >&2
exit 1
fi
KLP_DATA_VERSION="0.1"
KERNEL_BUILD_DIR="$1"
KLP_SYMBOLS="$2"
VMLINUX="$KERNEL_BUILD_DIR/vmlinux"
MODVER_DIR="$KERNEL_BUILD_DIR/.tmp_versions"
if ! test -f "$VMLINUX" ; then
echo "Error: Cannot open file: $VMLINUX" >&2
exit 1
fi
if ! test -d "$MODVER_DIR" ; then
# kernel >= 5.3 has *.mod in the build tree
mod_cnt=$(find "$KERNEL_BUILD_DIR" -name '*.mod' | wc -l)
if [ $mod_cnt -eq 0 ]; then
echo "Error: Directory does not exist: $MODVER_DIR" >&2
exit 1
fi
MODVER_DIR="$KERNEL_BUILD_DIR"
fi
get_symbols()
{
nm -f posix "$1" | grep -v '\( [UN] \)\|\(\.L\|__crc_\)' | cut -d\ -f1
}
echo "klp-convert-symbol-data.$KLP_DATA_VERSION" > "$KLP_SYMBOLS"
echo "*vmlinux" >> "$KLP_SYMBOLS"
get_symbols "$VMLINUX" >> "$KLP_SYMBOLS"
find "$MODVER_DIR" -iname '*.mod' | sort | while read KMOD ; do
if [ "$MODVER_DIR" = "$KERNEL_BUILD_DIR" ]; then
# kernel >= 5.3, just replace the suffix
KO_FILE="${KMOD%.mod}.ko"
else
# kernel <= 5.2, read .ko path and file from .mod file
KO_FILE="$(head -n1 $KMOD)"
fi
# obtain module name and its object file by processing .ko file name
NO_SUFFIX="$(basename -s .ko $KO_FILE)"
KMOD_NAME="$(echo $NO_SUFFIX | sed 's/-/_/g')"
OBJ_FILE="$(dirname $KO_FILE)/$NO_SUFFIX.o"
# write module name to Symbols file
echo "*$KMOD_NAME" >> "$KLP_SYMBOLS"
# extract symbols from object file and write them to Symbols file
get_symbols "$OBJ_FILE" >> "$KLP_SYMBOLS"
done
exit 0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fce774b5313e73949cb35f128e91e7b2ccd7fa2438abc5cff69267e504395a45
size 84623657

19
linux-6.11.tar.sign Normal file
View 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.11/ v6.11
Comment: git version 2.46.0
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmbnG3wACgkQONu9yGCS
aT4cvQ/+MdK0eh5jD1zfFZDtViJa3yCDCYziJ9G7lKFVdqGlJHlZ2VE8Yz3Ml7b5
1wxYUAe6ByBm7ixpAtd+W7IMKSwmOGC0pgtrwYRahN9/dg2R2veHHjZ9+TYE50pS
jUrBF/gJSautDWqckIdrYmYTaewjySUcA+k+6J4jUwTS86RYSYdGveL0HzzpuvQC
wfc1ssVdVcUQb4tVbn9jLaQFrmW3VjPDPiEx5v2dW9rl8H9ytRpQTjv581XrgqNm
jIjch73fw6ndy8F6/IJSTwOMbS4c2H/9jJDl6DhdKiBVOccuPmC1fNVOKngK5HBJ
bR0AztPSioe8VZ6gTsQ/JyQno+q81itP3L9/n+FwtFBrm0lqXgxKpup8jgSav0bB
IP6FOH0sZP2nvHHBSY9FmBhrRE1HGCWJMRt5vQDm4fa5mlSFQ3l6lE8WypVhfQVL
2awy2/8XQ5MWeWtuA+z+630HwpiHZVW87VyBEwHBm/obZ1OSHaayvZcG2B0Mv7x9
zg5SOZVvRdTdRHPGGEKYNdYYG9JQk6BHeBsgAt7Oq36vrq293pAqLjDsjZ25H8vF
hSe+WA8hBF1syDS/hdJ9VzLhKaIgIGolOntfMyhpWFFbVbZp6tcw/8tWWU0/5jYv
+PNiPobjrE5JYofyFuoqb/JFY+nJRQhcp6cHrD2mRmzEnoMvcGw=
=qNYu
-----END PGP SIGNATURE-----

3
linux-6.11.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55d2c6c025ebc27810c748d66325dd5bc601e8d32f8581d9e77673529bdacb2e
size 146900704

BIN
linux.keyring Normal file

Binary file not shown.

2
log.sh
View File

@ -1,4 +1,4 @@
#! /bin/sh #! /bin/bash
# log.sh - Automate insertion of patches into a kernel rpm tree managed # log.sh - Automate insertion of patches into a kernel rpm tree managed
# with series.conf # with series.conf

Some files were not shown because too many files have changed in this diff Show More