Skip to content

Commit

Permalink
fix: change inputs to rpmrebuild
Browse files Browse the repository at this point in the history
rpmrebuild updated from 2.17 to 2.20 in Fedora repos, changing the
function function which checks if a package is installed.

This fixes the inputs to that command.
  • Loading branch information
bsherman committed Jan 18, 2025
1 parent 699f1fe commit f0ff8e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dual-sign-zfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ if [[ "${DUAL_SIGN}" == "true" ]]; then
/tmp/dual-sign-check.sh "${KERNEL}" "${module}" "${PUBLIC_CHAIN}"
fi
done
rpmrebuild --additional=--buildroot=/tmp/buildroot --batch /var/cache/rpms/kmods/zfs/kmod-zfs-*.rpm

find /var/cache/rpms/kmods/zfs -type f -name "\kmod-*.rpm" | grep -v debug | grep -v devel
RPMPATH=$(find /var/cache/rpms/kmods/zfs -type f -name "\kmod-*.rpm" | grep -v debug | grep -v devel)
RPM=$(basename $( echo ${RPMPATH} | sed 's/\.rpm//' ))

Check warning on line 38 in dual-sign-zfs.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

dual-sign-zfs.sh#L38

Double quote to prevent globbing and word splitting.

Check notice on line 38 in dual-sign-zfs.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

dual-sign-zfs.sh#L38

See if you can use ${variable//search/replace} instead.
rpmrebuild --additional=--buildroot=/tmp/buildroot --batch ${RPM}

Check warning on line 39 in dual-sign-zfs.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

dual-sign-zfs.sh#L39

Double quote to prevent globbing and word splitting.
rm -rf /usr/lib/modules/"${KERNEL}"/extra
dnf reinstall -y /root/rpmbuild/RPMS/"$(uname -m)"/kmod-*-"${KERNEL}"-*.rpm
for module in /usr/lib/modules/"${KERNEL}"/extra/*/*.ko*; do
Expand Down
6 changes: 5 additions & 1 deletion dual-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ if [[ "${DUAL_SIGN}" == "true" ]]; then
/tmp/dual-sign-check.sh "${KERNEL}" "${module}" "${PUBLIC_CHAIN}"
fi
done

rpm -qa |grep kmod

find /var/cache/akmods -type f -name "\kmod-*.rpm"
for RPM in $(find /var/cache/akmods/ -type f -name \kmod-*.rpm); do
for RPMPATH in $(find /var/cache/akmods/ -type f -name \kmod-*.rpm); do
RPM=$(basename $( echo ${RPMPATH} | sed 's/\.rpm//' ))

Check warning on line 37 in dual-sign.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

dual-sign.sh#L37

Double quote to prevent globbing and word splitting.

Check notice on line 37 in dual-sign.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

dual-sign.sh#L37

See if you can use ${variable//search/replace} instead.
mkdir -p /tmp/buildroot
cp -r /{usr,lib} /tmp/buildroot
rpmrebuild --additional=--buildroot=/tmp/buildroot --batch "$RPM"
Expand Down

0 comments on commit f0ff8e8

Please sign in to comment.