#3382 PR merged: Specify path to sbindir during RPM build

Labels: enhancement, fixed / solved / done, ReaR Project

lzaoral opened issue at 2025-01-22 08:38:

Pull Request Details:
  • Type: Bug Fix

  • Impact: Normal

  • How was this pull request tested? See CI results below.

  • Description of the changes in this pull request:

This fixes the build failure on Fedora 42+ related to the following Fedora change: https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

jsmeix commented at 2025-01-22 12:07:

Regarding the usual "by the way"

Codespell / codespell (pull_request) Failing

see
https://github.com/rear/rear/actions/runs/12904381101/job/35988571739?pr=3382
which contains

Error: ./usr/share/rear/restore/default/990_move_away_restored_files.sh:7: maily ==> mainly
Error: ./usr/share/rear/lib/layout-functions.sh:1005: carmel ==> caramel
Error: ./usr/share/rear/lib/mkrescue-functions.sh:97: Carmel ==> Caramel
Error: ./usr/share/rear/lib/mkrescue-functions.sh:97: carmel ==> caramel
Error: ./usr/share/rear/lib/mkrescue-functions.sh:100: carmel ==> caramel
Error: ./usr/share/rear/lib/mkrescue-functions.sh:103: carmel ==> caramel
Error: ./usr/share/rear/build/USB/default/800_enforce_usb_output.sh:20: ortherwise ==> otherwise

Therein only the first 'maily ==> mainly'
and the last 'ortherwise ==> otherwise' are valid.
The rest are false alarm as usual by this dumb and annoying
codespell bot.
It seems that bot has nothing to distinguish actual code
from human readable normal text and neither anything
to reasonably separate words in usual code because things
like |*carmel[/!][0-9]* or carmel/?p? or |carmel\
are obviously no words in normal text where spell checking
would make sense at all.
I wonder why it does not complain about 'umount ==> unmount'
so it seems codespell has perhaps some hardcoded list of
commonly known cases but it also seems such a hardcoded list
is all it has (in particular no reasoable algorithm).

The 'carmel/Carmel' cases are

# grep -i 'carmel' usr/share/rear/lib/*functions*

usr/share/rear/lib/layout-functions.sh:
        (*mmcblk[0-9]*|*nvme[0-9]*n[1-9]*|*rd[/!]c[0-9]*d[0-9]*|*cciss[/!]c[0-9]*d[0-9]*|*ida[/!]c[0-9]*d[0-9]*|*amiraid[/!]ar[0-9]*|*emd[/!][0-9]*|*ataraid[/!]d[0-9]*|*carmel[/!][0-9]*)

usr/share/rear/lib/mkrescue-functions.sh:
# Carmel 8-port SATA (carmel/?p?)
#DEVwP=`expr "${1}" : "\(\(cciss\|rd\|ida\)/c[0-9]\+d[0-9]\+p[0-9]\+\|amiraid/ar[0-9]\+p[0-9]\+\|ataraid/d[0-9]\+p[0-9]\+\|\(emd\|carmel\)/[0-9]\+p[0-9]\+\)"`
       *rd[/!]c[0-9]d[0-9]p*|*cciss[/!]c[0-9]d[0-9]p*|*ida[/!]c[0-9]d[0-9]p*|*amiraid[/!]ar[0-9]p*|*emd[/!][0-9]p*|*ataraid[/!]d[0-9]p*|*carmel[/!][0-9]p*)

I "just fixed"
'maily ==> mainly' via
https://github.com/rear/rear/commit/a008c162010c3fac1412227508ce49b87046f218
and
'ortherwise ==> otherwise' via
https://github.com/rear/rear/commit/c909777a56b7a5a739019dabffadc2108d4b15c0

jsmeix commented at 2025-01-22 12:08:

@pcahyna
please review and merge as you like

pcahyna commented at 2025-01-22 17:20:

@jsmeix is this change ok also for SUSE distros? We disabled SUSE builds in CI in this PR : https://github.com/rear/rear/pull/3252 (they could be useful in this case to check that the code still builds).

pcahyna commented at 2025-01-23 14:24:

thanks @jsmeix, merging!

jsmeix commented at 2025-01-24 13:08:

I can confirm it works now - at least in my case
https://github.com/rear/rear/pull/3379
where I clicked the "re-run failed check" a few minutes ago.
Now "All checks have passed" there.
@lzaoral
thank you for taking care and for your fix!


[Export of Github issue for rear/rear.]