Compare commits

...
Sign in to create a new pull request.

11 commits

Author SHA1 Message Date
Coiby Xu
cc35a0317e Enable pull_from_upstream, koji_build and bodhi_update packit jobs
We can propose a release in Fedora using packit automatically by following [1],

1. a pull request will be created automatically against dist-git when there is a new release [2]

2. a koji build will be triggered when the PR gets merged [3]

3. a new update in Fedora Bodhi will be created after a successful Koji build [4]

[1] https://packit.dev/docs/fedora-releases-guide/dist-git-onboarding
[2] https://packit.dev/docs/configuration/downstream/pull_from_upstream
[3] https://packit.dev/docs/configuration/downstream/koji_build
[4] https://packit.dev/docs/configuration/downstream/bodhi_update

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-08-07 14:15:03 +08:00
Packit
0e43736472 Update to 2.0.29 upstream release
Upstream tag: v2.0.29
Upstream commit: 992c419f

Commit authored by Packit automation (https://packit.dev/)
2024-08-07 01:13:04 +00:00
Coiby Xu
ce57665bf5 Use https for kexec-tools source url
This may help resolve the following packit failure [1],
	2024-08-06 08:26:12.523 base_git.py       ERROR  Failed to download source from http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.29.tar.xz: ReadTimeout(ReadTimeoutError("HTTPConnectionPool(host='kernel.org', port=80): Read timed out. (read timeout=30)"))

[1] https://dashboard.packit.dev/results/pull-from-upstream/9926

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-08-06 16:27:43 +08:00
Coiby Xu
1a8cfca8a9 Release 2.0.27-4
Signed-off-by: Coiby Xu <coxu@redhat.com>
2023-12-13 15:30:43 +08:00
Coiby Xu
aab3d8dfa8 Let %post scriptlet always exits with the zero exit status
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2247940

Currently, CoreOS image fails to be built. This is because since commit
00c37d8c ("spec: Drop special handling for IA64 machines"), the last
command is now servicelog_notify and it fails to run in such
invocation environment. Thus the %post scriptlet returns a non-zero
exit code which breaks package installation,

    Running scriptlet: kexec-tools-2.0.27-4.fc40.ppc64le
    /proc/ is not mounted. This is not a supported mode of operation. Please fix your invocation environment to mount /proc/ and /sys/ properly. Proceeding anyway. Your mileage may vary.
    servicelog_notify: is not supported on the Unknown platform
    warning: %post(kexec-tools-2.0.27-4.fc40.ppc64le) scriptlet failed, exit status 1
    Error in POSTIN scriptlet in rpm package kexec-tools

Quoting [1],
> Non-zero exit codes from scriptlets can break installs/upgrades/erases
> such that no further actions will be taken for that package in a
> transaction (see Ordering), which may for example prevent an old version
> of a package from being erased on upgrades, ...
>
> All scriptlets MUST exit with the zero exit status. Because RPM in its
> default configuration does not execute shell scriptlets with the -e
> argument to the shell, excluding explicit exit calls (frowned upon with
> a non-zero argument!), the exit status of the last command in a
> scriptlet determines its exit status...
>
> Usually the most important bit is to apply this to the last command
> executed in a scriptlet, or to add a separate command such as plain “:”
> or “exit 0” as the last one in a scriptlet.

Following the above suggestion, add a separate command ":" as the last
one to the %post scriptlet.

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/

Reported-by: Colin Walters <walters@redhat.com>
Cc: Dusty Mabe <dustymabe@redhat.com>
Cc: Philipp Rudo <prudo@redhat.com>
Fixes: 00c37d8c ("spec: Drop special handling for IA64 machines")
Signed-off-by: Coiby Xu <coxu@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
2023-12-13 15:30:13 +08:00
Coiby Xu
801b5385b4 Add missing makedumpfile src
Signed-off-by: Coiby Xu <coxu@redhat.com>
2023-11-15 09:38:11 +08:00
Coiby Xu
5bfe6e82cf Release 2.0.27-3
Previous commit missed kexec-tools.spec.

Signed-off-by: Coiby Xu <coxu@redhat.com>
2023-11-15 09:31:01 +08:00
Coiby Xu
877eea8885 Release 2.0.27-3
Signed-off-by: Coiby Xu <coxu@redhat.com>
2023-11-15 09:27:35 +08:00
Coiby Xu
d2d8e09bd3 Release 2.0.27-2
Signed-off-by: Coiby Xu <coxu@redhat.com>
2023-10-18 10:05:50 +08:00
Coiby Xu
c369618b22 Only try to reset crashkernel when kdump.service is enabled
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2243068

Currently, when kexec-tools is installed, the kernel will automatically
have the crashkernel parameter set up. In the case where users only want
the kexec reboot feature, this is not what users want as a 1G-RAM system
will lose 192M memory. Considering Fedora's systemd preset policy has
kdump.service disabled and RHEL' has kdump.service enabled, this patch
makes kexec-tools only reset crashkernel when kdump.service is enabled.

Reported-by: Chris Murphy <bugzilla@colorremedies.com>
Cc: Philipp Rudo <prudo@redhat.com>
Cc: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
2023-10-18 10:04:29 +08:00
Coiby Xu
2b1090e7a0 [packit] 2.0.27 upstream release
Upstream tag: v2.0.27
Upstream commit: 17590eed
2023-09-08 15:27:26 +08:00
6 changed files with 66 additions and 92 deletions

35
.packit.yaml Normal file
View file

@ -0,0 +1,35 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
upstream_project_url: https://github.com/horms/kexec-tools.git
packit_instances: ["prod", "stg"]
specfile_path: kexec-tools.spec
# add or remove files that should be synced
files_to_sync:
- kexec-tools.spec
- .packit.yaml
# name in upstream package repository or registry (e.g. in PyPI)
upstream_package_name: kexec-tools
# downstream (Fedora) RPM package name
downstream_package_name: kexec-tools
upstream_tag_template: v{version}
jobs:
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-all
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-all
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-all

3
README.packit Normal file
View file

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.100.0.post1.dev9+gfafec1bd.

View file

@ -1757,6 +1757,10 @@ reset_crashkernel_for_installed_kernel()
_update_crashkernel "$_installed_kernel"
}
_should_reset_crashkernel() {
[[ $(kdump_get_conf_val auto_reset_crashkernel) != no ]] && systemctl is-enabled kdump &> /dev/null
}
main()
{
# Determine if the dump mode is kdump or fadump
@ -1825,12 +1829,12 @@ main()
reset_crashkernel "$@"
;;
_reset-crashkernel-after-update)
if [[ $(kdump_get_conf_val auto_reset_crashkernel) != no ]]; then
if _should_reset_crashkernel; then
reset_crashkernel_after_update
fi
;;
_reset-crashkernel-for-installed_kernel)
if [[ $(kdump_get_conf_val auto_reset_crashkernel) != no ]]; then
if _should_reset_crashkernel; then
reset_crashkernel_for_installed_kernel "$2"
fi
;;

View file

@ -1,81 +0,0 @@
From 5f17bdd2128998a3eeeb4521d136a192222fadb6 Mon Sep 17 00:00:00 2001
From: Kazuhito Hagio <k-hagio-ab@nec.com>
Date: Wed, 21 Dec 2022 11:06:39 +0900
Subject: [PATCH] [PATCH] Fix wrong exclusion of slab pages on Linux 6.2-rc1
* Required for kernel 6.2
Kernel commit 130d4df57390 ("mm/sl[au]b: rearrange struct slab fields to
allow larger rcu_head"), which is contained in Linux 6.2-rc1 and later,
made the offset of slab.slabs equal to page.mapping's one. As a result,
"makedumpfile -d 8", which should exclude user data, excludes some slab
pages wrongly because isAnon() returns true when slab.slabs is an odd
number. With such dumpfiles, crash can fail to start session with an
error like this:
# crash vmlinux dumpfile
...
crash: page excluded: kernel virtual address: ffff8fa047ac2fe8 type: "xa_node shift"
Make isAnon() check that the page is not slab to fix this.
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
---
makedumpfile.c | 6 +++---
makedumpfile.h | 9 +++------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/makedumpfile-1.7.2/makedumpfile.c b/makedumpfile-1.7.2/makedumpfile.c
index ff821eb..f403683 100644
--- a/makedumpfile-1.7.2/makedumpfile.c
+++ b/makedumpfile-1.7.2/makedumpfile.c
@@ -6502,7 +6502,7 @@ __exclude_unnecessary_pages(unsigned long mem_map,
*/
else if ((info->dump_level & DL_EXCLUDE_CACHE)
&& is_cache_page(flags)
- && !isPrivate(flags) && !isAnon(mapping)) {
+ && !isPrivate(flags) && !isAnon(mapping, flags)) {
pfn_counter = &pfn_cache;
}
/*
@@ -6510,7 +6510,7 @@ __exclude_unnecessary_pages(unsigned long mem_map,
*/
else if ((info->dump_level & DL_EXCLUDE_CACHE_PRI)
&& is_cache_page(flags)
- && !isAnon(mapping)) {
+ && !isAnon(mapping, flags)) {
if (isPrivate(flags))
pfn_counter = &pfn_cache_private;
else
@@ -6522,7 +6522,7 @@ __exclude_unnecessary_pages(unsigned long mem_map,
* - hugetlbfs pages
*/
else if ((info->dump_level & DL_EXCLUDE_USER_DATA)
- && (isAnon(mapping) || isHugetlb(compound_dtor))) {
+ && (isAnon(mapping, flags) || isHugetlb(compound_dtor))) {
pfn_counter = &pfn_user;
}
/*
diff --git a/makedumpfile-1.7.2/makedumpfile.h b/makedumpfile-1.7.2/makedumpfile.h
index 70a1a91..21dec7d 100644
--- a/makedumpfile-1.7.2/makedumpfile.h
+++ b/makedumpfile-1.7.2/makedumpfile.h
@@ -161,12 +161,9 @@ test_bit(int nr, unsigned long addr)
#define isSwapBacked(flags) test_bit(NUMBER(PG_swapbacked), flags)
#define isHWPOISON(flags) (test_bit(NUMBER(PG_hwpoison), flags) \
&& (NUMBER(PG_hwpoison) != NOT_FOUND_NUMBER))
-
-static inline int
-isAnon(unsigned long mapping)
-{
- return ((unsigned long)mapping & PAGE_MAPPING_ANON) != 0;
-}
+#define isSlab(flags) test_bit(NUMBER(PG_slab), flags)
+#define isAnon(mapping, flags) (((unsigned long)mapping & PAGE_MAPPING_ANON) != 0 \
+ && !isSlab(flags))
#define PTOB(X) (((unsigned long long)(X)) << PAGESHIFT())
#define BTOP(X) (((unsigned long long)(X)) >> PAGESHIFT())
--
2.39.0

View file

@ -1,15 +1,15 @@
%global eppic_ver e8844d3793471163ae4a56d8f95897be9e5bd554
%global eppic_shortver %(c=%{eppic_ver}; echo ${c:0:7})
%global mkdf_ver 1.7.2
%global mkdf_ver 1.7.4
%global mkdf_shortver %(c=%{mkdf_ver}; echo ${c:0:7})
Name: kexec-tools
Version: 2.0.26
Release: 8%{?dist}
Version: 2.0.29
Release: 1%{?dist}
License: GPL-2.0-only
Summary: The kexec/kdump userspace component
Source0: http://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
Source0: https://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
Source1: kdumpctl
Source3: gen-kdump-sysconfig.sh
Source4: gen-kdump-conf.sh
@ -108,7 +108,6 @@ Requires: systemd-udev%{?_isa}
#
# Patches 601 onward are generic patches
#
Patch601: kexec-tools-2.0.26-makedumpfile-Fix-wrong-exclusion-of-slab-pages-on-Linux-6.2.patch
%description
kexec-tools provides /sbin/kexec binary that facilitates a new
@ -124,8 +123,6 @@ mkdir -p -m755 kcp
tar -z -x -v -f %{SOURCE9}
tar -z -x -v -f %{SOURCE19}
%patch601 -p1
%ifarch ppc
%define archdef ARCH=ppc
%endif
@ -271,6 +268,7 @@ touch /etc/kdump.conf
servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh 2>/dev/null
servicelog_notify --add --command=/usr/lib/kdump/kdump-migrate-action.sh --match='refcode="#MIGRATE" and serviceable=0' --type=EVENT --method=pairs_stdin >/dev/null
%endif
:
# This portion of the script is temporary. Its only here
# to fix up broken boxes that require special settings
@ -396,6 +394,21 @@ fi
%endif
%changelog
* Wed Aug 07 2024 Packit <hello@packit.dev> - 2.0.29-1
- Update to version 2.0.29
* Wed Dec 13 2023 Coiby Xu <coxu@redhat.com> - 2.0.27-4
- Let %post scriptlet always exits with the zero exit status
* Wed Nov 15 2023 Coiby Xu <coxu@redhat.com> - 2.0.27-3
- update to makedumpfile-1.7.4
* Wed Oct 18 2023 Coiby Xu <coxu@redhat.com> - 2.0.27-2
- Only try to reset crashkernel when kdump.service is enabled
* Fri Sep 08 2023 Coiby Xu <coxu@redhat.com> - 2.0.27-1
- kexec-tools 2.0.27 (Simon Horman)
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.26-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View file

@ -1,3 +1,3 @@
SHA512 (kexec-tools-2.0.29.tar.xz) = 4c9e0b3df47b240f0eac2c31e8b515465f626ce043f64daa32b0b032d7132e54dada5d70875dab256345f66cf94a25dc3c160a9009ba60addd8dcb1e5205f5ca
SHA512 (makedumpfile-1.7.4.tar.gz) = 6c3455b711bd4e120173ee07fcc5ff708ae6d34eaee0f4c135eca7ee0e0475b4d391429c23cf68e848b156ee3edeab956e693a390d67ccc634c43224c7129a96
SHA512 (eppic-e8844d3.tar.gz) = d86b9f90c57e694107272d8f71b87f66a30743b9530480fb6f665026bbada4c6b0205a83e40b5383663a945681cfbfcf1ee79469fc219ddf679473c4b2290763
SHA512 (kexec-tools-2.0.26.tar.xz) = afecb64f50a0a2e553712d7e6e4d48e0dc745e4140983a33a10cce931e6aeddaff9c4a3385fbaf7ab9ff7b3b905d932fbce1e0e37aa2c35d5c1e61277140dee9
SHA512 (makedumpfile-1.7.2.tar.gz) = 324e303dd5f507703f66e2bd5dc9d24f9f50ba797be70c05702008ba77078f61ffcc884796ddf9ab737de1d124c3a9d881ab5ce4f3f459690ec00055af25ea9e