Bug 2281464 - Access rights for /boot/grub2/grub.cfg do not match rpm database
Summary: Access rights for /boot/grub2/grub.cfg do not match rpm database
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 40
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Leo Sandoval
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-19 07:14 UTC by Christoph Karl
Modified: 2024-06-01 02:19 UTC (History)
7 users (show)

Fixed In Version: grub2-2.06-123.fc40
Clone Of:
Environment:
Last Closed: 2024-06-01 02:19:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
kickstart file used (770 bytes, text/plain)
2024-05-23 03:42 UTC, Christoph Karl
no flags Details

Description Christoph Karl 2024-05-19 07:14:07 UTC
It seems that the file
/boot/grub2/grub.cfg
hat other access rights than in the rpm database (stemming from grub2.spec file) defined.

Reproducible: Always

Steps to Reproduce:
1. Fresh fc40 installation
2. rpm -Vq grub2-pc
.M.......  c /boot/grub2/grub.cfg

3.
Actual Results:  
rpm -Vqa is complaining about this file

Expected Results:  
no complains

Comment 1 Leo Sandoval 2024-05-21 20:11:39 UTC
(In reply to Christoph Karl from comment #0)
> It seems that the file
> /boot/grub2/grub.cfg
> hat other access rights than in the rpm database (stemming from grub2.spec
> file) defined.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Fresh fc40 installation

I launched a VM with this image http://download.eng.bos.redhat.com/released/fedora/F-40/Gold/Everything/x86_64/os/ then I installed grub2-pc

> 2. rpm -Vq grub2-pc
> .M.......  c /boot/grub2/grub.cfg

in my case there is no output

[root@fedora ~]# rpm -Vq grub2-pc

> 
> 3.
> Actual Results:  
> rpm -Vqa is complaining about this file
> 

[root@fedora ~]# rpm -Vqa
.M.......  c /etc/audit/rules.d/audit.rules
.....UG..  g /var/run/avahi-daemon
S.5....T.  c /etc/ssh/sshd_config


> Expected Results:  
> no complains

I recently worked on a similar issue (https://issues.redhat.com/browse/RHEL-16478) which I strongly believe is the same issue as the one discuss here and the fix has been ported to fedora-rawhide (not yet merged) https://src.fedoraproject.org/rpms/grub2/pull-request/84

Comment 2 Christoph Karl 2024-05-22 17:29:43 UTC
It's OK for me to wait for this pull request and I will check it after merge again.
Thank you for taking care.

Comment 3 Leo Sandoval 2024-05-22 18:04:39 UTC
(In reply to Christoph Karl from comment #2)
> It's OK for me to wait for this pull request and I will check it after merge
> again.

PR is targeted for rawhide, I believe this is fine for you.
Also, I am not sure why I am not seeing the same log as you, any idea why?

> Thank you for taking care.

Comment 4 Christoph Karl 2024-05-23 03:40:29 UTC
Just rerun once more.
I am using the following kickstart file: See attached.
virt-install \
  --name fedora40 \
  --vcpus 2 \
  --memory 4096 \
  --disk vol=m2ssd/fedora40 \
  --os-variant fedora39 \
  --network bridge=virbr0 \
  --mac=52:54:00:13:9d:9d \
  --graphics vnc,listen=127.0.0.1,port=5940 \
  --location /mnt/lager/ARCHIVE/DATEN-MD5/Fedora-Everything-netinst-x86_64-40-1.14.iso \
  --noautoconsole \
  --initrd-inject=./fedora40-ks.cfg \
  --extra-args "inst.ks=file:/fedora40-ks.cfg"

My output is:
[ckarl@fc40 ~]$ sudo rpm -Vaq
.....UG..  g /var/run/avahi-daemon
.M.......  c /etc/audit/rules.d/audit.rules
.M.......  c /boot/grub2/grub.cfg

Comment 5 Christoph Karl 2024-05-23 03:42:41 UTC
Created attachment 2034718 [details]
kickstart file used

Comment 6 Leo Sandoval 2024-05-27 17:12:39 UTC
(In reply to Christoph Karl from comment #4)
> Just rerun once more.
> I am using the following kickstart file: See attached.
> virt-install \
>   --name fedora40 \
>   --vcpus 2 \
>   --memory 4096 \
>   --disk vol=m2ssd/fedora40 \
>   --os-variant fedora39 \
>   --network bridge=virbr0 \
>   --mac=52:54:00:13:9d:9d \
>   --graphics vnc,listen=127.0.0.1,port=5940 \
>   --location
> /mnt/lager/ARCHIVE/DATEN-MD5/Fedora-Everything-netinst-x86_64-40-1.14.iso \
>   --noautoconsole \
>   --initrd-inject=./fedora40-ks.cfg \
>   --extra-args "inst.ks=file:/fedora40-ks.cfg"
> 
> My output is:
> [ckarl@fc40 ~]$ sudo rpm -Vaq
> .....UG..  g /var/run/avahi-daemon
> .M.......  c /etc/audit/rules.d/audit.rules
> .M.......  c /boot/grub2/grub.cfg

I was booting through UEFI and your boot is through BIOS and this is why your/mine output differed. 

I have now tested a VM with BIOS F40 with with this PR https://src.fedoraproject.org/rpms/grub2/pull-request/90 and I am not seeing anymore the problem reported. In case you want to try it yourself, here are the RPM files https://koji.fedoraproject.org/koji/taskinfo?taskID=118051103

Comment 7 Leo Sandoval 2024-05-27 17:45:16 UTC
(In reply to Leo Sandoval from comment #6)
> (In reply to Christoph Karl from comment #4)
> > Just rerun once more.
> > I am using the following kickstart file: See attached.
> > virt-install \
> >   --name fedora40 \
> >   --vcpus 2 \
> >   --memory 4096 \
> >   --disk vol=m2ssd/fedora40 \
> >   --os-variant fedora39 \
> >   --network bridge=virbr0 \
> >   --mac=52:54:00:13:9d:9d \
> >   --graphics vnc,listen=127.0.0.1,port=5940 \
> >   --location
> > /mnt/lager/ARCHIVE/DATEN-MD5/Fedora-Everything-netinst-x86_64-40-1.14.iso \
> >   --noautoconsole \
> >   --initrd-inject=./fedora40-ks.cfg \
> >   --extra-args "inst.ks=file:/fedora40-ks.cfg"
> > 
> > My output is:
> > [ckarl@fc40 ~]$ sudo rpm -Vaq
> > .....UG..  g /var/run/avahi-daemon
> > .M.......  c /etc/audit/rules.d/audit.rules
> > .M.......  c /boot/grub2/grub.cfg
> 
> I was booting through UEFI and your boot is through BIOS and this is why
> your/mine output differed. 
> 
> I have now tested a VM with BIOS F40 with with this PR
> https://src.fedoraproject.org/rpms/grub2/pull-request/90 and I am not seeing

I meant https://src.fedoraproject.org/rpms/grub2/pull-request/87 (I closed 88, 89 and 90 PRs; for some reason I created one PR (87) and 3 more were created..)

> anymore the problem reported. In case you want to try it yourself, here are
> the RPM files https://koji.fedoraproject.org/koji/taskinfo?taskID=118051103

Comment 8 Fedora Update System 2024-05-29 16:06:31 UTC
FEDORA-2024-a7983d1f0a (grub2-2.06-123.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-a7983d1f0a

Comment 9 Fedora Update System 2024-05-30 02:06:50 UTC
FEDORA-2024-a7983d1f0a has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-a7983d1f0a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-a7983d1f0a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Christoph Karl 2024-05-30 14:00:51 UTC
Works for me in fc40. Thank you

Comment 11 Fedora Update System 2024-06-01 02:19:51 UTC
FEDORA-2024-a7983d1f0a (grub2-2.06-123.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.