All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Andryuk <jandryuk@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	 Ian Jackson <iwj@xenproject.org>, Julien Grall <julien@xen.org>,
	 Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wl@xen.org>,  xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] xen: Create EFI_VENDOR directory
Date: Tue, 23 Mar 2021 08:34:08 -0400	[thread overview]
Message-ID: <CAKf6xpvGit4YiuTfGuX2iZ1qPi-a+oNK2bassUxGd8qJADEXyQ@mail.gmail.com> (raw)
In-Reply-To: <9b071192-a443-4bdc-8dac-107bbd4a0481@suse.com>

On Tue, Mar 23, 2021 at 3:23 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 22.03.2021 18:08, Andrew Cooper wrote:
> > On 22/03/2021 15:15, Jan Beulich wrote:
> >> On 22.03.2021 15:59, Andrew Cooper wrote:
> >>> On 22/03/2021 14:52, Jan Beulich wrote:
> >>>> On 22.03.2021 14:33, Jason Andryuk wrote:
> >>>>> make install-xen fails when EFI_VENDOR is set (=fedora) with:
> >>>>> install: cannot create regular file '/home/user/xen/dist/install/boot/efi/efi/fedora/xen-4.15.0-rc.efi': No such file or directory
> >>>>>
> >>>>> Create the EFI_VENDOR directory so xen.efi can be installed within.
> >>>>>
> >>>>> This removes the need for Fedora and Qubes xen.spec files to manually
> >>>>> create the directory in advance.
> >>>> While I'm not strictly against, I'd like to point out that it was
> >>>> deliberate to not create this directory here. I also didn't expect
> >>>> anyone's xen.spec to do so. Instead I'd expect the distro to create
> >>>> it during OS installation. If this was a bad assumption, I'd prefer
> >>>> if the commit message here could point out why such an expectation
> >>>> won't hold in general.
> >>> This reasoning is broken for anything other `make install DESTDIR=/` on
> >>> a live system.
> >>>
> >>> It is incompatible with how RPM, deb, etc packages work.
> >> I'm afraid I don't understand, for both of your statements. If distro
> >> installation put in place the designated directory, there wouldn't be
> >> any live system lacking it, and there wouldn't be any concern in the
> >> packaging of any software.
> >>
> >> To take a perhaps too extreme example - packages typically expect e.g.
> >> /usr to exist as well, don't they?
> >
> > No.  A buildroot starts out fully empty, by design.
> >
> > The packaging environment (usually a chroot) invokes `make install
> > DESTDIR=/path/to/staging/root` so you don't interfere with any of the
> > tools inside the environment, and the resulting tar/cpio has the
> > buildroot stripped out of paths.
> >
> > The failure being discussed here is the build within the packaging
> > environment, not the metadata which forms the final package.  Installing
> > a deb/rpm/etc will make directories as applicable.
>
> Ah, I see. But then this _still_ isn't the right thing to do. In fact,
> the package build and installation shouldn't put xen.efi in the EFI
> partition _at all_. The build system doing so is for developers only,
> so they don't need to invoke boot loader configuration every time they
> rebuild and re-install. Hence the packaging build shouldn't set
> EFI_VENDOR in the first place. There it instead should be a subsequent
> boot loader re-configuration which picks up xen.efi from its install
> location (under $(EFI_DIR)) and places it on the EFI partition.

On Fedora, RPMs drop EFI binaries directly into /boot/efi/EFI/fedora/.
grub, shim, fwupdate and xen are all packaged that way.  It seems
reasonable to have those important binaries tracked by the package
manager.

Does SuSE populate EFI_VENDOR from EFI_DIR when some boot loader
script is called?

I think Xen's population of EFI_VENDOR is sensible and fine.  Plus
it's *used*.  I don't see why it needs to be removed.  I was just
trying to fix a bug.

Regards,
Jason


  reply	other threads:[~2021-03-23 12:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 13:33 [PATCH] xen: Create EFI_VENDOR directory Jason Andryuk
2021-03-22 13:38 ` for-4.15 " Andrew Cooper
2021-03-22 14:01 ` Ian Jackson
2021-03-22 14:52 ` Jan Beulich
2021-03-22 14:59   ` Andrew Cooper
2021-03-22 15:15     ` Jan Beulich
2021-03-22 15:36       ` Jason Andryuk
2021-03-22 16:53         ` Jan Beulich
2021-03-22 17:08       ` Andrew Cooper
2021-03-23  7:23         ` Jan Beulich
2021-03-23 12:34           ` Jason Andryuk [this message]
2021-03-23 13:36             ` Jan Beulich
2021-03-23 13:41               ` Ian Jackson
2021-03-23 15:31                 ` Jan Beulich
2021-03-23 15:58                 ` Michael Young
2021-03-23 17:32                   ` Roman Shaposhnik
2021-03-23 17:30               ` Roman Shaposhnik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKf6xpvGit4YiuTfGuX2iZ1qPi-a+oNK2bassUxGd8qJADEXyQ@mail.gmail.com \
    --to=jandryuk@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.