mirror of
https://abf.rosa.ru/djam/auto-krokodil.git
synced 2025-02-24 02:52:59 +00:00
add rpmlint policy to avoid odd warnings
This commit is contained in:
parent
c500bf870b
commit
745d2896f9
4 changed files with 79 additions and 4 deletions
2
auto-krokodil-rpmlint.conf
Normal file
2
auto-krokodil-rpmlint.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# kernel modules are put here and then symlinked to from /lib/modules by alternatives(8)
|
||||||
|
addFilter("W: arch-dependent-file-in-usr-share /usr/share/auto-krokodil/kmods/.*")
|
|
@ -3,7 +3,7 @@ Name: auto-krokodil
|
||||||
Group: System/Kernel and hardware
|
Group: System/Kernel and hardware
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
Url: https://abf.io/import/auto-krokodil
|
Url: https://abf.io/import/auto-krokodil
|
||||||
Version: 0.21
|
Version: 0.22
|
||||||
Release: 1
|
Release: 1
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%ifarch %{ix86} %{x86_64}
|
%ifarch %{ix86} %{x86_64}
|
||||||
|
@ -16,6 +16,7 @@ Source10: krokodil-rpm-provides.php
|
||||||
Source11: krokodilnvidia.attr
|
Source11: krokodilnvidia.attr
|
||||||
# rpm macros
|
# rpm macros
|
||||||
Source12: macros.krokodil
|
Source12: macros.krokodil
|
||||||
|
Source13: auto-krokodil-rpmlint.conf
|
||||||
|
|
||||||
# Test data, to run tests:
|
# Test data, to run tests:
|
||||||
# - build and install auto-krokodil-rpm-generators from this spec
|
# - build and install auto-krokodil-rpm-generators from this spec
|
||||||
|
@ -74,6 +75,8 @@ Generators of RPM provides for proprietary Nvidia drivers
|
||||||
Summary: RPM macros for packaging of binary kernel modules for Nvidia drivers
|
Summary: RPM macros for packaging of binary kernel modules for Nvidia drivers
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
Requires: gawk
|
Requires: gawk
|
||||||
|
# pull rpmlint policy when installing BuildRequires
|
||||||
|
Requires: (%{name}-rpmlint if rpmlint)
|
||||||
|
|
||||||
%description rpm-macros
|
%description rpm-macros
|
||||||
RPM macros for packaging of binary kernel modules for Nvidia drivers
|
RPM macros for packaging of binary kernel modules for Nvidia drivers
|
||||||
|
@ -83,6 +86,18 @@ RPM macros for packaging of binary kernel modules for Nvidia drivers
|
||||||
|
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
|
|
||||||
|
%package rpmlint
|
||||||
|
Summary: rpmlint policy for krokodil-packaged kernel modules
|
||||||
|
Requires: rpmlint
|
||||||
|
|
||||||
|
%description rpmlint
|
||||||
|
rpmlint policy for krokodil-packaged kernel modules
|
||||||
|
|
||||||
|
%files rpmlint
|
||||||
|
%{_datadir}/rpmlint/config.d/auto-krokodil-rpmlint.conf
|
||||||
|
|
||||||
|
#----------------------------------------
|
||||||
|
|
||||||
%package legacy-converter
|
%package legacy-converter
|
||||||
Summary: Convert JSON from newer Nvidia driver to an older one
|
Summary: Convert JSON from newer Nvidia driver to an older one
|
||||||
Requires: /usr/bin/php
|
Requires: /usr/bin/php
|
||||||
|
@ -137,6 +152,9 @@ ln -s kroko-cli %{buildroot}%{_bindir}/%{name}-cli
|
||||||
|
|
||||||
%install_macro krokodil %{SOURCE12}
|
%install_macro krokodil %{SOURCE12}
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/rpmlint/config.d
|
||||||
|
install -m0644 %{SOURCE13} %{buildroot}%{_datadir}/rpmlint/config.d
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
|
||||||
bash -x %{SOURCE24}
|
bash -x %{SOURCE24}
|
||||||
|
|
48
kroko-gui.sh
Executable file
48
kroko-gui.sh
Executable file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set -a
|
||||||
|
|
||||||
|
if test -f kroko-cli.sh
|
||||||
|
then
|
||||||
|
SOURCING=1 . kroko-cli.sh
|
||||||
|
else
|
||||||
|
SOURCING=1 . kroko-cli
|
||||||
|
fi
|
||||||
|
|
||||||
|
COMMON_ZENITY_ARGS="--window-icon=geany --title=kroko-gui"
|
||||||
|
|
||||||
|
_zenity(){
|
||||||
|
zenity $COMMON_ZENITY_ARGS "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# if use _zenity() here, PID is incorrect (probably subshell's PID is taken)
|
||||||
|
zenity $COMMON_ZENITY_ARGS --progress --pulsate --text=$"Selecting the best NVIDIA driver…" &
|
||||||
|
zenity_pid=$!
|
||||||
|
|
||||||
|
if o="$(_cli_get_gpus)"
|
||||||
|
then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
rc=$?
|
||||||
|
kill $zenity_pid
|
||||||
|
case $rc in
|
||||||
|
$EXIT_ENOGPU )
|
||||||
|
_zenity --error --text=$"No NVIDIA GPUs found""!"
|
||||||
|
exit $EXIT_ENOGPU
|
||||||
|
;;
|
||||||
|
$EXIT_ENODRIVER )
|
||||||
|
_zenity --error --text=$"No suitable drivers found""!"
|
||||||
|
exit $EXIT_ENODRIVER
|
||||||
|
;;
|
||||||
|
$EXIT_ENOCOMMONDRIVER )
|
||||||
|
_zenity --error --text=$"This computer has multiple NVIDIA GPUs".$"A driver which would work with all of them has not been found".
|
||||||
|
exit $EXIT_ENOCOMMONDRIVER
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
_zenity --error --text=$"An unknown error occured".$"Something went wrong""!".
|
||||||
|
exit $EXIT_ENOCOMMONDRIVER
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
#echo "$o" | _select_best_driver
|
||||||
|
|
|
@ -90,14 +90,21 @@ update-alternatives --remove \\
|
||||||
if [ -d /lib/modules/%{-p*} ]; then %{_sbindir}/depmod -a %{-p*} || : ; fi
|
if [ -d /lib/modules/%{-p*} ]; then %{_sbindir}/depmod -a %{-p*} || : ; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# "Requires" in kernel package
|
# Dependencies in kernel package
|
||||||
|
# Dependencies are soft ("Recommends" insted of "Requires") to do not
|
||||||
|
# fail if an Nvidia kernel module cannot be installed for one
|
||||||
|
# of the installed kernels which is not the newest one
|
||||||
%kroko_req_modules_in_kernel(j:n:p:) \
|
%kroko_req_modules_in_kernel(j:n:p:) \
|
||||||
%{expand: \
|
%{expand: \
|
||||||
Requires: (kmod-nvidia%{-j*}-kabi(%{-p*}) if nvidia%{-j*}) \
|
Recommends: (kmod-nvidia%{-j*}-kabi(%{-p*}) if nvidia%{-j*}) \
|
||||||
%{nil} \
|
%{nil} \
|
||||||
}
|
}
|
||||||
|
|
||||||
# "Requires" in nvidiaXXX package
|
# Dependencies in nvidiaXXX package
|
||||||
|
# "Requires", not "Recommends" here despite "Recommends" above
|
||||||
|
# to have strong dependencies at least here and avoid accidently
|
||||||
|
# and silently leaving users without Nvidia kernel modules
|
||||||
|
# (force installing a binary module for at least the latest kernel)
|
||||||
%kroko_req_modules_in_nvidia(k:f:j:n:) \
|
%kroko_req_modules_in_nvidia(k:f:j:n:) \
|
||||||
%{expand: \
|
%{expand: \
|
||||||
# e.g.: (kmod-nvdia-5.10-generic(390.13) if kernel-5.10-generic)
|
# e.g.: (kmod-nvdia-5.10-generic(390.13) if kernel-5.10-generic)
|
||||||
|
|
Loading…
Add table
Reference in a new issue