Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
d15e9d09
Commit
d15e9d09
authored
May 07, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm install: implement correct install kernel module support
parent
111f75c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
2 deletions
+105
-2
epm-install
bin/epm-install
+11
-2
epm-install-alt
bin/epm-install-alt
+94
-0
No files found.
bin/epm-install
View file @
d15e9d09
...
...
@@ -502,8 +502,17 @@ epm_install()
update_repo_if_needed
fi
# FIXME: see to_remove below
epm_install_names
$names
||
return
case
"
$BASEDISTRNAME
"
in
"alt"
)
load_helper epm-install-alt
epm_install_alt_names
$names
||
return
;;
*
)
# FIXME: see to_remove below
epm_install_names
$names
||
return
;;
esac
# save files before install and repack
if
[
-n
"
$download_only
"
]
&&
[
-n
"
$files
"
]
;
then
...
...
bin/epm-install-alt
View file @
d15e9d09
...
...
@@ -83,3 +83,97 @@ epm_install_files_alt()
local
replacepkgs
=
"
$(
__epm_get_replacepkgs
$files
)
"
sudocmd rpm
-Uvh
$replacepkgs
$(
subst_option dryrun
--test
)
$force
$noscripts
$nodeps
$files
&&
save_installed_packages
$files
}
get_current_kernel_flavour
()
{
rrel
=
$(
uname
-r
)
rflv
=
${
rrel
#*-
}
rflv
=
${
rflv
%-*
}
echo
"
$rflv
"
}
# std-def 1.2.3-alt1 -> 1.2.3-std-def-alt1
make_kernel_release
()
{
echo
"
$2
"
|
sed
-e
"s|-|-
$1
-|"
}
# return latest installed kernel in a form like 5.15.109-un-def-alt1
get_latest_kernel_rel
()
{
local
kernel_flavour
=
"
$1
"
# current
rrel
=
$(
uname
-r
)
# latest
# copied and modified from update-kernel
# get the maximum available kernel package version
kmaxver
=
while
read
version
do
comparever
=
"
$(
rpmevrcmp
"
$kmaxver
"
"
$version
"
)
"
[
"
$comparever
"
-lt
0
]
&&
kmaxver
=
"
$version
"
||
:
done
<<<
"
$(
epm print version-release
for
package kernel-image-
$kernel_flavour
)
"
[
-z
"
$kmaxver
"
]
&&
echo
"
$rrel
"
&&
return
make_kernel_release
"
$kernel_flavour
"
"
$kmaxver
"
}
# install <module-name>-std-def
epm_install_alt_kernel_module
()
{
[
-n
"
$1
"
]
||
return
0
local
kflist
=
''
local
kmplist
=
''
local
kmf km kf
for
kmf
in
$*
;
do
km
=
"
$(
echo
"
$kmf
"
|
cut
-d-
-f1
)
"
kf
=
"
$(
echo
"
$kmf
"
|
cut
-d-
-f2
,3
)
"
# use current flavour as default
[
"
$km
"
=
"
$kf
"
]
&&
kf
=
"
$(
get_current_kernel_flavour
)
"
kvf
=
"
$(
get_latest_kernel_rel
$kf
)
"
#kmplist="$kmplist kernel-modules-$km-$kf"
# install kernel module for latest installed kernel
kmplist
=
"
$kmplist
kernel-modules-
$km
-
$kvf
"
kflist
=
"
$kflist
$kf
"
done
# firstly, update all needed kernels (by flavour)
for
kf
in
$(
estrlist
uniq
$kflist
)
;
do
epm update-kernel
-t
$kf
||
exit
done
# secondly, install module(s)
epm_install_names
$kmplist
}
epm_install_alt_names
()
{
local
kmlist
=
''
local
installnames
=
''
while
[
-n
"
$1
"
]
;
do
local
pkgname
pkgname
=
"
$1
"
if
echo
"
$pkgname
"
|
grep
-v
"#"
|
grep
-q
"^kernel-modules*-"
;
then
# virtualbox[-std-def]
local
kmn
=
"
$(
echo
$pkgname
|
sed
-e
's|kernel-modules*-||'
)
"
local
kf1
=
"
$(
echo
"
$kmn
"
|
cut
-d-
-f2
)
"
local
kf2
=
"
$(
echo
"
$kmn
"
|
cut
-d-
-f4
)
"
# pass install with full pkgnames
if
[
"
$kf1
"
!=
"
$kf2
"
]
&&
[
-n
"
$kf2
"
]
||
echo
"
$kf1
"
|
grep
-q
"^[0-9]"
;
then
installnames
=
"
$installnames
$pkgname
"
else
kmlist
=
"
$kmlist
$kmn
"
fi
else
installnames
=
"
$installnames
$pkgname
"
fi
shift
done
epm_install_names
$installnames
||
return
epm_install_alt_kernel_module
$kmlist
||
return
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment