Bug 1312541 - Error message during update of a mock rawhide chroot
Error message during update of a mock rawhide chroot
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: fedora-release (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Stephen Gallagher
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-27 01:41 EST by Mattias Ellert
Modified: 2016-03-29 08:13 EDT (History)
6 users (show)

See Also:
Fixed In Version: fedora-release-24-0.16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-29 08:13:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mattias Ellert 2016-02-27 01:41:49 EST
Description of problem:

mock --root fedora-rawhide-x86_64 --update

  Cleanup     : glibc-2.22.90-36.fc24.x86_64                              59/59 
/usr/sbin/convert-to-edition: line 163: grub2-mkconfig: command not found
This system has been converted to non-edition
  Verifying   : system-python-libs-3.5.1-6.fc25.x86_64                     1/59 

There is no grub in a mock chroot.

Version-Release number of selected component (if applicable):

  Upgrading   : fedora-release-25-0.1.noarch                              20/59 


The /usr/sbin/convert-to-edition also uses the $RPM_BUILD_ROOT environment variable twice:

$ grep RPM /usr/sbin/convert-to-edition
# part of an RPM scriptlet.
    ln -sf ./os.release.d/issue-fedora $RPM_BUILD_ROOT/usr/lib/issue
    ln -sf ./os.release.d/issue-fedora $RPM_BUILD_ROOT/usr/lib/issue

This doesn't make sense.
Comment 1 Stephen Gallagher 2016-02-29 08:42:18 EST
(In reply to Mattias Ellert from comment #0)
> Description of problem:
> 
> mock --root fedora-rawhide-x86_64 --update
> 
>   Cleanup     : glibc-2.22.90-36.fc24.x86_64                             
> 59/59 
> /usr/sbin/convert-to-edition: line 163: grub2-mkconfig: command not found
> This system has been converted to non-edition
>   Verifying   : system-python-libs-3.5.1-6.fc25.x86_64                    
> 1/59 
> 
> There is no grub in a mock chroot.

Right, that's not surprising in the mock chroot, but it's needed in real installs in order to make sure that the boot loader shows the correct edition.


> 
> Version-Release number of selected component (if applicable):
> 
>   Upgrading   : fedora-release-25-0.1.noarch                             
> 20/59 
> 
> 
> The /usr/sbin/convert-to-edition also uses the $RPM_BUILD_ROOT environment
> variable twice:
> 
> $ grep RPM /usr/sbin/convert-to-edition
> # part of an RPM scriptlet.
>     ln -sf ./os.release.d/issue-fedora $RPM_BUILD_ROOT/usr/lib/issue
>     ln -sf ./os.release.d/issue-fedora $RPM_BUILD_ROOT/usr/lib/issue
> 
> This doesn't make sense.

You're right. I'm not sure what happened there. Probably a copy-and-paste error and I forgot to change those spots.

Previously, this stuff was handled in the %post script directly, but I moved it all to a script at Dennis's request and must have missed converting that variable in a couple places (and not tested that path...)
Comment 2 Stephen Gallagher 2016-02-29 09:11:13 EST
(In reply to Stephen Gallagher from comment #1)
> (In reply to Mattias Ellert from comment #0)
> > Description of problem:
> > 
> > mock --root fedora-rawhide-x86_64 --update
> > 
> >   Cleanup     : glibc-2.22.90-36.fc24.x86_64                             
> > 59/59 
> > /usr/sbin/convert-to-edition: line 163: grub2-mkconfig: command not found
> > This system has been converted to non-edition
> >   Verifying   : system-python-libs-3.5.1-6.fc25.x86_64                    
> > 1/59 
> > 
> > There is no grub in a mock chroot.
> 
> Right, that's not surprising in the mock chroot, but it's needed in real
> installs in order to make sure that the boot loader shows the correct
> edition.
> 
> 

For mock and ARMv7 systems, however, this won't be available. Peter Robinson suggested replacing this with grubby, which I'm now looking into. I'll also conditionalize it for mock to avoid the warning.


> > 
> > Version-Release number of selected component (if applicable):
> > 
> >   Upgrading   : fedora-release-25-0.1.noarch                             
> > 20/59 
> > 
> > 
> > The /usr/sbin/convert-to-edition also uses the $RPM_BUILD_ROOT environment
> > variable twice:
> > 
> > $ grep RPM /usr/sbin/convert-to-edition
> > # part of an RPM scriptlet.
> >     ln -sf ./os.release.d/issue-fedora $RPM_BUILD_ROOT/usr/lib/issue
> >     ln -sf ./os.release.d/issue-fedora $RPM_BUILD_ROOT/usr/lib/issue
> > 
> > This doesn't make sense.
> 
> You're right. I'm not sure what happened there. Probably a copy-and-paste
> error and I forgot to change those spots.
> 
> Previously, this stuff was handled in the %post script directly, but I moved
> it all to a script at Dennis's request and must have missed converting that
> variable in a couple places (and not tested that path...)

Well, the plus side here is that $RPM_BUILD_ROOT is guaranteed not to be set at this point, so while it's incorrect to have it there, it still ends up resolving to the right location, so no harm done. I'll still remove it, of course.
Comment 3 Stephen Gallagher 2016-02-29 10:18:10 EST
OK, after further investigation, the full solution here is going to be fairly complicated, so for the short-term we're only going to support updating the bootloader on GRUB2 systems (and we'll just skip that piece for non-GRUB2 systems). Non-GRUB2 systems will get their bootloader automatically updated on the next kernel installation.

Pull requests have been submitted for fedora-release:
* https://pagure.io/fedora-release/pull-request/28 (Fedora 24)
* https://pagure.io/fedora-release/pull-request/27 (Rawhide/Fedora 25)
Comment 4 Mike McCune 2016-03-28 19:33:48 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions

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