From 86906c1835ceb3ad0ec0be06f37f90cb349f03c5 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Mon, 9 Jun 2025 23:33:44 +0200 Subject: [PATCH] dracut-057-90.git20250609 Resolves: RHEL-92584 --- 0087.patch | 241 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 0088.patch | 23 +++++ 0089.patch | 33 +++++++ dracut.spec | 8 +- 4 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 0087.patch create mode 100644 0088.patch create mode 100644 0089.patch diff --git a/0087.patch b/0087.patch new file mode 100644 index 0000000..35fe628 --- /dev/null +++ b/0087.patch @@ -0,0 +1,241 @@ +From 844ce987255eddd9cc36b3e2c6070e9a82403750 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Mon, 9 Jun 2025 22:32:14 +0200 +Subject: [PATCH] chore: sync backport tool with rawhide + +--- + .distro/backport_fix.sh | 225 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 225 insertions(+) + +diff --git a/.distro/backport_fix.sh b/.distro/backport_fix.sh +new file mode 100755 +index 00000000..50e4c233 +--- /dev/null ++++ b/.distro/backport_fix.sh +@@ -0,0 +1,225 @@ ++#!/usr/bin/zsh ++# ++# .distro/backport_fix.sh [options] DISTRO_VERSION JIRA_ISSUE DRACUT_PR [COMMIT_COUNT [COMMITS_ORIGIN_REPO]] ++# ++ ++set -xe ++zsh -n "$0" ++ ++[[ -z "$EDITOR" ]] && EDITOR=nano ++ ++: "OPT: continue after solving cherry-pick conflict" ++[[ "$1" == "-c" ]] && { ++ { ++ shift ||: ++ } 2>/dev/null ++ CON=y ++ : ++} || CON= ++ ++: "OPT: delete conflicting branch" ++[[ "$1" == "-d" ]] && { ++ { ++ shift ||: ++ } 2>/dev/null ++ DEL=y ++ : ++} || DEL= ++ ++: "OPT: Fedora distro" ++[[ "$1" == "-f" ]] && { ++ { ++ shift ||: ++ } 2>/dev/null ++ FED=y ++ : ++} || FED= ++ ++: "OPT: local changes only" ++[[ "$1" == "-l" ]] && { ++ { ++ shift ||: ++ } 2>/dev/null ++ LOC=y ++ ++} || LOC= ++ ++: "OPT: expect ref (commit-ish to get commits from) instead of PR #" ++[[ "$1" == "-r" ]] && { ++ { ++ shift ||: ++ } 2>/dev/null ++ REF=y ++ ++} || REF= ++ ++: "OPT: skip already applied commits" ++[[ "$1" == "-s" ]] && { ++ SKI="$2" ++ { ++ shift 2 ||: ++ } 2>/dev/null ++ : ++} || SKI=0 ++ ++: 'No more opts (check order)' ++{ ++ [[ -n "$1" ]] && [[ "${1:0:1}" == "-" ]] && exit 4 ++ ++} 2>/dev/null ++ ++{ echo ; } 2>/dev/null ++ ++: 'DISTRO version #' ++rv="${1}" ++{ ++ [[ -n "$rv" ]] ++ shift ++} 2>/dev/null ++ ++: 'Jira issue #' ++bn="${1}" ++{ ++ [[ -n "$bn" ]] ++ shift ||: ++} 2>/dev/null ++ ++: 'Dracut pull request or REF' ++pr="${1}" ++{ ++ [[ -n "${pr}" ]] ++ shift ||: ++} 2>/dev/null ++ ++: 'Commit count' ++cc="${1:-1}" ++{ ++ [[ -n "$cc" ]] ++ shift ||: ++} 2>/dev/null ++ ++: 'Commits origin repo' ++or="${1:-upstream-ng}" ++{ ++ [[ -n "$or" ]] ++ shift ||: ++} 2>/dev/null ++ ++: 'No extra arg' ++{ ++ [[ -z "$1" ]] ++ ++} 2>/dev/null ++ ++{ echo ; } 2>/dev/null ++ ++[[ -z "$FED" ]] && dist=rhel || dist=fedora ++ ++remote="${dist}-${rv}" ++ ++[[ -z "$REF" ]] && rf="pr${pr}" || rf="${or}/${pr}" ++ ++{ echo ; } 2>/dev/null ++ ++[[ -z "$CON" ]] && { ++ : "Create ${remote}-fix-${bn}?" ++ read '?-->continue?' ++ ++ gitt ++ gitc "${remote}" ++ ++ [[ -n "$DEL" ]] && gitbd "${remote}-fix-${bn}" ||: ++ ++ gitp "${remote}" ++ ++ gitcb "${remote}-fix-${bn}" ++ ++ gitrh "${remote}/main" ++ ++ [[ -z "$REF" ]] && gitf "${or}" "refs/pull/${pr}/head:${rf}" ++} ++ ++: "List Commits" ++cis="$(gitl1 "${rf}" "-${cc}" --reverse | cut -d' ' -f1)" ++[[ -n "${cis}" ]] ++ ++com="\nCherry-picked commits:\n${cis}\n" ++ ++com="${com}\nResolves: RHEL-${bn}\n" ++ ++echo -e "${com}" ++ ++read '?-->continue?' ++ ++i=0 ++echo "${cis}" \ ++| while read ci; do ++ [[ -n "${ci}" ]] || continue ++ ++ i=$(($i+1)) ++ ++ [[ $i -le $SKI ]] && continue ++ ++ gityx "${ci}" || { ++ ++ mod="$(gits | grep '^\s*both modified: ')" ||: ++ ++ [[ -z "$mod" ]] || { ++ ++ mod="$(echo "$mod" | tr -s ' ' | cut -d' ' -f3)" ++ ++ ls -d $mod ++ ++ $EDITOR $mod ++ ++ gita $mod ++ ++ gitdh ++ ++ gits ++ ++ exit 2 ++ } ++ ++ gits | grep -q '^nothing to commit' \ ++ && { ++ gits | grep 'git cherry-pick --skip' ++ ++ gity --skip ++ : ++ } || { ++ ++ gits ++ ++ exit 3 ++ } ++ } ++ done ++ ++read '?-->continue?' ++ ++[[ -z "$CON" ]] && { ++ [[ ${cc} -gt 1 ]] && { ++ ++ gitei HEAD~${cc} ++ : ++ } || { ++ ++ gitia --amend ++ } ++ : ++} || { ++ gits | grep -q '^\s*both modified: ' \ ++ && gita `gits | grep '^\s*both modified: ' | tr -s ' ' | cut -d' ' -f3` ++ ++ gityc ||: ++} ++ ++gitl ||: ++gitlp ||: ++ ++[[ -z "$LOC" ]] || exit 0 ++ ++gituu "${remote}" ++ ++gh pr create -f -a '@me' -R "redhat-plumbers/dracut-rhel${rv}" + diff --git a/0088.patch b/0088.patch new file mode 100644 index 0000000..283ebb7 --- /dev/null +++ b/0088.patch @@ -0,0 +1,23 @@ +From 5dcc483cbe28534671aa12f4f651d85267911a72 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Mon, 9 Jun 2025 22:52:21 +0200 +Subject: [PATCH] ci: switch differential-shellcheck to ubuntu-latest + +--- + .github/workflows/differential-shellcheck.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml +index 63a022bf..20e10c17 100644 +--- a/.github/workflows/differential-shellcheck.yml ++++ b/.github/workflows/differential-shellcheck.yml +@@ -5,7 +5,7 @@ on: + + jobs: + test: +- runs-on: ubuntu-20.04 ++ runs-on: ubuntu-latest + + steps: + - name: Repository checkout + diff --git a/0089.patch b/0089.patch new file mode 100644 index 0000000..c6fe976 --- /dev/null +++ b/0089.patch @@ -0,0 +1,33 @@ +From 6d0f4d436f54ac07eb3ffcc8879b8f8477506a00 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Tue, 20 May 2025 09:31:52 +0200 +Subject: [PATCH] fix(dracut.sh): don't pass empty string as dir + +That causes dropindirs_sort() to look for .conf files in / due to +expansion: + + for d in "$@"; do + for i in "$d/"*"$suffix"; do + +Fixes #1275 + +(cherry picked from commit 000cfa0c278c0858e81c8dd2ff7231f069f0afb1) + +Resolves: RHEL-92584 +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index dcdeaf5f..43bc2ad0 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -962,7 +962,7 @@ if [[ -f $conffile ]]; then + fi + + # source our config dir +-for f in $(dropindirs_sort ".conf" "$confdir" "$add_confdir" "$dracutbasedir/dracut.conf.d"); do ++for f in $(dropindirs_sort ".conf" "$confdir" ${add_confdir:+"$add_confdir"} "$dracutbasedir/dracut.conf.d"); do + check_conf_file "$f" + # shellcheck disable=SC1090 + [[ -e $f ]] && . "$f" diff --git a/dracut.spec b/dracut.spec index 709b869..1f1e1e1 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 87.git20250311 +%define dist_free_release 90.git20250609 Name: dracut Version: 057 @@ -115,6 +115,9 @@ Patch83: 0083.patch Patch84: 0084.patch Patch85: 0085.patch Patch86: 0086.patch +Patch87: 0087.patch +Patch88: 0088.patch +Patch89: 0089.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -571,6 +574,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Mon Jun 09 2025 Pavel Valena - 057-90.git20250609 +- fix(dracut.sh): don't pass empty string as dir + * Tue Mar 11 2025 Pavel Valena - 057-87.git20250311 - fix(rescue): create hmac file for rescue kernel