mirror of
https://github.com/dynup/kpatch
synced 2025-01-02 18:52:02 +00:00
kpatch-build: get Fedora .config from configs dir
In recent versions of Fedora, when building from a source RPM, kpatch-build fails because it can't find the .config file. Get the file from the canonical location: the configs subdirectory. This also works with older versions of Fedora and RHEL, and ensures we always have the right config file for the arch we're building for. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
parent
d04f5723bc
commit
a310e9e82e
@ -595,6 +595,8 @@ else
|
||||
|
||||
echo "$ARCHVERSION" > "$VERSIONFILE" || die
|
||||
|
||||
[[ -z "$CONFIGFILE" ]] && CONFIGFILE="$SRCDIR/configs/kernel$ALT-$KVER-$ARCH.config"
|
||||
|
||||
elif [[ "$DISTRO" = ubuntu ]] || [[ "$DISTRO" = debian ]]; then
|
||||
|
||||
echo "Debian/Ubuntu distribution detected"
|
||||
@ -623,7 +625,7 @@ else
|
||||
# Download source deb pkg
|
||||
(dget -u "$url/${pkgname}/${dscname}" 2>&1) | logger || die "dget: Could not fetch/unpack $url/${pkgname}/${dscname}"
|
||||
mv "${pkgname}-$KVER" "$SRCDIR" || die
|
||||
cp "/boot/config-${ARCHVERSION}" "$SRCDIR/.config" || die
|
||||
[[ -z "$CONFIGFILE" ]] && CONFIGFILE="/boot/config-${ARCHVERSION}"
|
||||
if [[ "$ARCHVERSION" == *-* ]]; then
|
||||
echo "-${ARCHVERSION#*-}" > "$SRCDIR/localversion" || die
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user