[meta-virtualization] [meta-virtualization~][PATCH] inittab: fix hypervisor console

Bruce Ashfield bruce.ashfield at gmail.com
Thu Mar 29 14:14:10 PDT 2018


On Thu, Mar 29, 2018 at 4:06 PM, Bhargava Sreekantappa Gayathri
<BSREEKAN at xilinx.com> wrote:
>
>> -----Original Message-----
>> From: Bruce Ashfield [mailto:bruce.ashfield at gmail.com]
>> Sent: Thursday, March 29, 2018 5:08 AM
>> To: Bhargava Sreekantappa Gayathri <BSREEKAN at xilinx.com>
>> Cc: meta-virtualization at yoctoproject.org; Cyril Chemparathy
>> <cyrilc at xilinx.com>; Manjukumar Harthikote Matha <MANJUKUM at xilinx.com>
>> Subject: Re: [meta-virtualization] [meta-virtualization~][PATCH] inittab: fix
>> hypervisor console
>>
>> When I apply the patch to meta-virt master, I get:
>>
>> error: patch failed: recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend:1
>> error: removal patch leaves file contents
>> error: recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend: patch does not apply
>>
>> While I could just remove the bbappend manually, that error implies that
>> whatever you are testing is not the same as the current master branch.
>>
>> So can you rebase and resend the patch as a v2 ?
>
> Hi Bruce,
>
> I have tried the patch on the master and it applies. I even tried the patch that I downloaded from the mailing list and it seems to work for me. This the latest master I have tried my patch on: 73f4778. Please let me know if I am missing anything.

I've applied a few patches in my day, and this definitely does not apply.

I'm doing the same workflow that I've done for 10 years, export the
mbox, apply it via git am

---------------

yow-bashfiel-d4 [/home/bruc...ualization]> git am -s hv.mbox
Applying: inittab: fix hypervisor console
error: patch failed: recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend:1
error: recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend: patch does not apply
Patch failed at 0001 inittab: fix hypervisor console
The copy of the patch that failed is found in:
   /home/bruce/poky/meta-virtualization/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

yow-bashfiel-d4 [/home/bruc...ualization]> git apply --reject
.git/rebase-apply/patch
Checking patch conf/distro/include/virt_console.inc...
Checking patch conf/layer.conf...
Checking patch recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend...
error: while searching for:
do_install_append() {
       if echo "${DISTRO_FEATURES}" | grep -q 'xen'; then
               echo "" >> ${D}${sysconfdir}/inittab
               echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >>
${D}${sysconfdir}/inittab
       fi
}

error: patch failed: recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend:1
error: removal patch leaves file contents
error: recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend: patch does not apply
Applied patch conf/distro/include/virt_console.inc cleanly.
Applied patch conf/layer.conf cleanly.

---------

So your mailer, or something is mangling the patch to the point where it won't
apply.

Cheers,

Bruce



>
> Thanks,
> Bhargav
>>
>> Bruce
>>
>>
>> On Mon, Mar 26, 2018 at 5:44 PM, Bhargava Sreekantappa Gayathri
>> <bhargava.sreekantappa-gayathri at xilinx.com> wrote:
>> > From: Cyril Chemparathy <cyril.chemparathy at xilinx.com>
>> >
>> > This commit switches over to using existing SERIAL_CONSOLES mechanism
>> > for hvc0 inittab entry generation.  This then results in
>> > /bin/start_getty wrapper being used, which avoids the getty failure
>> > seen when running a xen capable rootfs natively on linux.
>> >
>> > Signed-off-by: Cyril Chemparathy <cyril.chemparathy at xilinx.com>
>> > Signed-off-by: Manjukumar Matha
>> > <manjukumar.harthikote-matha at xilinx.com>
>> > Signed-off-by: Bhargava Sreekantappa Gayathri
>> > <bhargava.sreekantappa-gayathri at xilinx.com>
>> > ---
>> >  conf/distro/include/virt_console.inc                | 1 +
>> >  conf/layer.conf                                     | 3 +++
>> >  recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend | 6 ------
>> >  3 files changed, 4 insertions(+), 6 deletions(-)  create mode 100644
>> > conf/distro/include/virt_console.inc
>> >  delete mode 100644
>> > recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
>> >
>> > diff --git a/conf/distro/include/virt_console.inc
>> > b/conf/distro/include/virt_console.inc
>> > new file mode 100644
>> > index 0000000..4d56806
>> > --- /dev/null
>> > +++ b/conf/distro/include/virt_console.inc
>> > @@ -0,0 +1 @@
>> > +SERIAL_CONSOLES_append = "${@bb.utils.contains('DISTRO_FEATURES',
>> 'xen', ' 115200;hvc0', '', d)}"
>> > diff --git a/conf/layer.conf b/conf/layer.conf index f71c117..461c73a
>> > 100644
>> > --- a/conf/layer.conf
>> > +++ b/conf/layer.conf
>> > @@ -20,6 +20,9 @@ LAYERDEPENDS_virtualization-layer = "core networking-
>> layer"
>> >  # Override security flags
>> >  require conf/distro/include/virt_security_flags.inc
>> >
>> > +# Add hypervisor console
>> > +require conf/distro/include/virt_console.inc
>> > +
>> >  PREFERRED_PROVIDER_virtual/runc ?= "runc-docker"
>> >  PREFERRED_PROVIDER_virtual/containerd ?= "containerd-docker"
>> >
>> > diff --git a/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
>> > b/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
>> > deleted file mode 100644
>> > index 1b89aec..0000000
>> > --- a/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
>> > +++ /dev/null
>> > @@ -1,6 +0,0 @@
>> > -do_install_append() {
>> > -       if echo "${DISTRO_FEATURES}" | grep -q 'xen'; then
>> > -               echo "" >> ${D}${sysconfdir}/inittab
>> > -               echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >>
>> ${D}${sysconfdir}/inittab
>> > -       fi
>> > -}
>> > --
>> > 2.7.4
>> >
>> > This email and any attachments are intended for the sole use of the named
>> recipient(s) and contain(s) confidential information that may be proprietary,
>> privileged or copyrighted under applicable law. If you are not the intended
>> recipient, do not read, copy, or forward this email message or any attachments.
>> Delete this email message and any attachments immediately.
>> > --
>> > _______________________________________________
>> > meta-virtualization mailing list
>> > meta-virtualization at yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await thee at
>> its end"



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


More information about the meta-virtualization mailing list