Accepting request 966401 from home:jbohac:branches:Kernel:kdump

- pull sources directly from git using obs_scm
- fix bsc#1190299, bsc#1186272
- add support for Zstandard compression algorithm

OBS-URL: https://build.opensuse.org/request/show/966401
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=224
This commit is contained in:
Petr Tesařík 2022-04-01 11:30:04 +00:00 committed by Git OBS Bridge
parent cc910fb119
commit 15e87934df
9 changed files with 31 additions and 106 deletions

16
_service Normal file
View File

@ -0,0 +1,16 @@
<services>
<service name="obs_scm">
<param name="url">https://github.com/openSUSE/kdump</param>
<param name="scm">git</param>
<param name="revision">master</param>
<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.g%h</param>
<param name="versionrewrite-pattern">v([^+]*\+git[1-9].*)|v([^+]*)\+git0.*</param>
<param name="versionrewrite-replacement">\1\2</param>
</service>
<service name="tar" mode="buildtime" />
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="buildtime" />
</services>

View File

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

View File

@ -0,0 +1,4 @@
name: kdump
version: 1.0.2+git8.g51e8c4d
mtime: 1647592467
commit: 51e8c4d31eea9f1695922c7e43bd668f433f0611

View File

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

View File

@ -1,36 +0,0 @@
From: Petr Tesarik <ptesarik@suse.com>
Date: Tue Feb 1 22:25:59 2022 +0100
Subject: calibrate: Fix network interface naming
Upstream: merged
Git-commit: 75a44901b54ba853497d63c01bef77b251436e0a
The init scripts may rename the network interface unless it is
given an explicit name by MAC address. If that happens, network
initialization fails, because the "eth0" interface is missing.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
calibrate/run-qemu.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- a/calibrate/run-qemu.py
+++ b/calibrate/run-qemu.py
@@ -217,8 +217,15 @@ def run_qemu(bindir, params, initrd, elf
model = 'virtio'
else:
model = 'e1000e'
- extra_qemu_args.extend(('-nic', 'user,model={}'.format(model)))
- extra_kernel_args.extend(('bootdev=eth0', 'ip=eth0:dhcp'))
+ mac = '12:34:56:78:9A:BC'
+ extra_qemu_args.extend((
+ '-nic', 'user,mac={},model={}'.format(mac, model)
+ ))
+ extra_kernel_args.extend((
+ 'ifname=kdump0:{}'.format(mac),
+ 'bootdev=kdump0',
+ 'ip=kdump0:dhcp'
+ ))
# Other arch-specific arguments
if arch == 'aarch64':

View File

@ -1,37 +0,0 @@
From: Petr Tesarik <ptesarik@suse.com>
Date: Tue Feb 1 18:47:25 2022 +0100
Subject: calibrate: Explicitly include af_packet in the test initrd
Upstream: merged
Git-commit: 00edd1457aa19eebe78c8c36ef013f72af262584
DHCP clients need protocol family PF_PACKET. If it is built as a
module, then the dependency is not automatically added by dracut's
kernel-network-modules unless af_packet is loaded in the host.
This breaks OBS build, because that is done inside a VM with no
network.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
calibrate/run-qemu.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/calibrate/run-qemu.py
+++ b/calibrate/run-qemu.py
@@ -82,11 +82,12 @@ class build_initrd(object):
'/usr/bin'))
if params['NET']:
+ netdrivers = [ 'af_packet' ]
if params['ARCH'].startswith('s390'):
- net_driver = 'virtio-net'
+ netdrivers.append('virtio-net')
else:
- net_driver = 'e1000e'
- extra_args = ('--add-drivers', net_driver)
+ netdrivers.append('e1000e')
+ extra_args = ('--add-drivers', ' '.join(netdrivers))
else:
extra_args = ()
args = (

View File

@ -1,23 +0,0 @@
From: Petr Tesarik <ptesarik@suse.com>
Date: Tue Feb 1 23:14:01 2022 +0100
Subject: calibrate.conf: Add dependency on kdumptool
Upstream: merged
Git-commit: 4641d2bc0468fe733c18b6f9c81f1bb6402c520e
The run-qemu.py script invokes kdumptool to find a suitable kernel,
so kdumptool must be built before this script runs.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
diff --git a/calibrate/CMakeLists.txt b/calibrate/CMakeLists.txt
index 7d8b4fc..57344ae 100644
--- a/calibrate/CMakeLists.txt
+++ b/calibrate/CMakeLists.txt
@@ -38,6 +38,7 @@ ADD_CUSTOM_COMMAND(
VERBATIM
DEPENDS
${dracut_targets}
+ kdumptool
dummy.conf
dummy-net.conf
trackrss

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Mar 31 15:14:17 UTC 2022 - Jiri Bohac <jbohac@suse.com>
- pull sources directly from git using obs_scm
- fix bsc#1190299, bsc#1186272
- add support for Zstandard compression algorithm
-------------------------------------------------------------------
Tue Feb 8 16:14:52 UTC 2022 - Petr Tesařík <ptesarik@suse.com>

View File

@ -55,12 +55,9 @@ Summary: Script for kdump
License: GPL-2.0-or-later
Group: System/Kernel
URL: https://github.com/openSUSE/kdump
Source: %{name}-%{version}.tar.bz2
Source: %{name}-%{version}.tar.xz
Source1: %{name}-calibrate.tar.bz2
Source2: %{name}-rpmlintrc
Patch1: %{name}-calibrate-include-af_packet.patch
Patch2: %{name}-calibrate-fix-nic-naming.patch
Patch3: %{name}-calibrate.conf-depends-on-kdumptool.patch
BuildRequires: asciidoc
BuildRequires: cmake >= 3.7
BuildRequires: gcc-c++
@ -133,9 +130,6 @@ after a crash dump has occured.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%setup -q -D -T -a 1
%build