diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..f3cbec8 --- /dev/null +++ b/.packit.yaml @@ -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 diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..d8f2d59 --- /dev/null +++ b/README.packit @@ -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. diff --git a/kdumpctl b/kdumpctl index 7e561fd..53636a1 100755 --- a/kdumpctl +++ b/kdumpctl @@ -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 ;; diff --git a/kexec-tools-2.0.26-makedumpfile-Fix-wrong-exclusion-of-slab-pages-on-Linux-6.2.patch b/kexec-tools-2.0.26-makedumpfile-Fix-wrong-exclusion-of-slab-pages-on-Linux-6.2.patch deleted file mode 100644 index 5d91bc2..0000000 --- a/kexec-tools-2.0.26-makedumpfile-Fix-wrong-exclusion-of-slab-pages-on-Linux-6.2.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 5f17bdd2128998a3eeeb4521d136a192222fadb6 Mon Sep 17 00:00:00 2001 -From: Kazuhito Hagio -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 ---- - 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 - diff --git a/kexec-tools.spec b/kexec-tools.spec index ff8b496..d62863b 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -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 - 2.0.29-1 +- Update to version 2.0.29 + +* Wed Dec 13 2023 Coiby Xu - 2.0.27-4 +- Let %post scriptlet always exits with the zero exit status + +* Wed Nov 15 2023 Coiby Xu - 2.0.27-3 +- update to makedumpfile-1.7.4 + +* Wed Oct 18 2023 Coiby Xu - 2.0.27-2 +- Only try to reset crashkernel when kdump.service is enabled + +* Fri Sep 08 2023 Coiby Xu - 2.0.27-1 +- kexec-tools 2.0.27 (Simon Horman) + * Thu Jul 20 2023 Fedora Release Engineering - 2.0.26-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index d684233..85f0956 100644 --- a/sources +++ b/sources @@ -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