Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grubby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
staging
rpms
grubby
Commits
66b7b31c
Commit
66b7b31c
authored
4 years ago
by
Rocky Automation
Browse files
Options
Downloads
Patches
Plain Diff
import grubby-8.40-38.el8
parent
d91127cf
No related branches found
Branches containing commit
Tags
imports/r8/grubby-8.40-38.el8
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SOURCES/grubby-bls
+13
-13
13 additions, 13 deletions
SOURCES/grubby-bls
SPECS/grubby.spec
+11
-1
11 additions, 1 deletion
SPECS/grubby.spec
with
24 additions
and
14 deletions
SOURCES/grubby-bls
+
13
−
13
View file @
66b7b31c
...
...
@@ -92,7 +92,7 @@ get_bls_values() {
bls
=
"
${
bls
%.conf
}
"
bls
=
"
${
bls
##*/
}
"
echo
"
${
bls
}
"
done
| /usr/libexec/grubby/rpm-sort
-c
rpmnvrcmp |
tac
)
)
||
:
done
| /usr/libexec/grubby/rpm-sort
-c
rpmnvrcmp
2>/dev/null
|
tac
)
)
||
:
for
bls
in
"
${
files
[@]
}
"
;
do
blspath
=
"
${
blsdir
}
/
${
bls
}
.conf"
...
...
@@ -224,10 +224,10 @@ has_kernelopts()
local opts=(
${
args
}
)
for opt in
${
opts
[*]
}
; do
[[
$opt
= "
\
$kernelopts
" ]] &&
return 0
[[
$opt
= "
\
$kernelopts
" ]] &&
echo "
true
"
done
return 1
echo "
false
"
}
get_bls_args() {
...
...
@@ -504,11 +504,11 @@ update_bls_fragment() {
local
old_args
=
"
$(
get_bls_args
"
$i
"
)
"
local
new_args
=
"
$(
update_args
"
${
old_args
}
"
"
${
remove_args
}
"
"
${
add_args
}
"
)
"
if
[[
$param
!=
"ALL"
||
!
"
$(
has_kernelopts
"
$i
"
)
"
]]
;
then
if
[[
$param
!=
"ALL"
||
"
$(
has_kernelopts
"
$i
"
)
"
=
"false"
]]
;
then
set_bls_value
"
${
bls_file
[
$i
]
}
"
"options"
"
${
new_args
}
"
fi
if
[[
$bootloader
=
grub2
&&
!
"
$(
has_kernelopts
"
$i
"
)
"
&&
$opts
=
$new_args
]]
;
then
if
[[
$bootloader
=
grub2
&&
"
$(
has_kernelopts
"
$i
"
)
"
=
"false"
&&
$opts
=
$new_args
]]
;
then
set_bls_value
"
${
bls_file
[
$i
]
}
"
"options"
"
\$
kernelopts"
fi
fi
...
...
@@ -568,7 +568,7 @@ remove_var_prefix() {
update_grubcfg
()
{
if
[[
$arch
=
'ppc64'
||
$arch
=
'ppc64le'
]]
;
then
grub2-mkconfig
-
o
/boot/grub2/grub.cfg
>
& /dev/null
grub2-mkconfig
-
-no-grubenv-update
-o
"
${
grub_config
}
"
>
& /dev/null
fi
}
...
...
@@ -591,7 +591,6 @@ Usage: grubby [OPTION...]
--initrd=initrd-path initrd image for the new kernel
-i, --extra-initrd=initrd-path auxiliary initrd image for things other than the new kernel
--make-default make the newly added entry the default boot entry
-o, --output-file=path path to output updated config file ("-" for stdout)
--remove-args=STRING remove kernel arguments
--remove-kernel=kernel-path remove all entries for the specified kernel
--set-default=kernel-path make the first entry referencing the specified kernel the default
...
...
@@ -607,9 +606,9 @@ Help options:
EOF
}
OPTS
=
"
$(
getopt
-o
c:i:
o:
b:?
--long
help
,add-kernel:,args:,bad-image-okay,
\
OPTS
=
"
$(
getopt
-o
c:i:b:?
--long
help
,add-kernel:,args:,bad-image-okay,
\
config-file:,copy-default,default-kernel,default-index,default-title,env:,
\
grub2,info:,initrd:,extra-initrd:,make-default,
output-file:,
remove-args:,
\
grub2,info:,initrd:,extra-initrd:,make-default,remove-args:,
\
remove-kernel:,set-default:,set-default-index:,title:,update-kernel:,zipl,
\
bls-directory:,add-kernel:,add-multiboot:,mbargs:,mounts:,boot-filesystem:,
\
bootloader-probe,debug,devtree,devtreedir:,elilo,efi,extlinux,grub,lilo,
\
...
...
@@ -637,6 +636,7 @@ while [ ${#} -gt 0 ]; do
bad_image
=
true
;;
--config-file
|
-c
)
grub_config
=
"
${
2
}
"
zipl_config
=
"
${
2
}
"
shift
;;
...
...
@@ -674,10 +674,6 @@ while [ ${#} -gt 0 ]; do
--make-default
)
make_default
=
true
;;
--output-file
|
-o
)
output_file
=
"
${
2
}
"
shift
;;
--remove-args
)
remove_args
=
"
${
2
}
"
shift
...
...
@@ -750,6 +746,10 @@ if [[ -z $zipl_config ]]; then
zipl_config
=
"/etc/zipl.conf"
fi
if
[[
-z
$grub_config
]]
;
then
grub_config
=
"/boot/grub2/grub.cfg"
fi
get_bls_values
default_index
=
"
$(
get_default_index
)
"
...
...
This diff is collapsed.
Click to expand it.
SPECS/grubby.spec
+
11
−
1
View file @
66b7b31c
Name: grubby
Version: 8.40
Release: 3
7
%{?dist}
Release: 3
8
%{?dist}
Summary: Command line tool for updating BootLoaderSpec files
License: GPLv2+
URL: https://github.com/rhinstaller/grubby
...
...
@@ -166,6 +166,16 @@ current boot environment.
%{_mandir}/man8/*.8*
%changelog
* Thu Nov 28 2019 Javier Martinez Canillas <javierm@redhat.com> - 8.40-38
- grubby-bls: don't print rpm-sort error messages
Resolves: rhbz#1731924
- grubby-bls: remove -o option and support -c for ppc64le grub config
Resolves: rhbz#1758598
- grubby-bls: fix logic to check if the kernelopts var is defined in a BLS
Resolves: rhbz#1726514
- grubby-bls: don't update grubenv when generating grub.cfg for ppc64le
Related: rhbz#1726514
* Mon May 20 2019 Javier Martinez Canillas <javierm@redhat.com> - 8.40-37
- grubby-bls: unset default entry if is the one being removed
Resolves: rhbz#1668329
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment