Bug 271602 - OCI arm64 image has /qemu in root
Summary: OCI arm64 image has /qemu in root
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Ed Maste
URL: https://reviews.freebsd.org/D40257
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-24 08:50 UTC by Dave Cottlehuber
Modified: 2024-01-22 14:34 UTC (History)
2 users (show)

See Also:
emaste: mfc-stable13+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Cottlehuber freebsd_committer freebsd_triage 2023-05-24 08:50:54 UTC
This is from the arm64 13.1-testing image in OCI.

Ed: I guess this is an artefact of how you built the image vs my native arm64 build?

root@ephemeral28:/usr/home/freebsd # file /qemu
/qemu: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.0 (1300139), FreeBSD-style, stripped
root@ephemeral28:/usr/home/freebsd #

I'll open a case at Oracle to see if I can bring some more assistance to get new releases uploaded.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2023-05-24 15:39:29 UTC
release/tools/ec2.conf includes:

        if ! [ -z "${QEMUSTATIC}" ]; then
                rm -f ${DESTDIR}/${EMULATOR}
        fi

release/tools/vmimage.subr does this in vm_extra_pre_umount() but it gets overridden
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-05-24 17:12:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ae60012e46ecfe59a3506b903e685b6a3347807b

commit ae60012e46ecfe59a3506b903e685b6a3347807b
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-05-24 15:45:29 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-05-24 17:11:07 +0000

    release/oci.conf: add missing vm_extra_pre_umount() steps

    vm.subr's default vm_extra_pre_umount removes /qemu and
    /etc/resolv.conf.  When vm_extra_pre_umount is overridden these steps
    need to be performed in the cloud-specific conf file.

    PR:             271602
    Reviewed by:    dch, lwhsu
    Event:          Kitchener-Waterloo Hackathon 202305
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D40257

 release/tools/oci.conf | 5 +++++
 1 file changed, 5 insertions(+)
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2023-12-27 16:53:25 UTC
^Triage: set flag for possible mfc-stable13.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-01-22 14:34:14 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1614823a499aa7a46aa8ab4ed06a6d1b71e0bdd9

commit 1614823a499aa7a46aa8ab4ed06a6d1b71e0bdd9
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-05-24 15:45:29 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-01-22 14:33:06 +0000

    release/oci.conf: add missing vm_extra_pre_umount() steps

    vm.subr's default vm_extra_pre_umount removes /qemu and
    /etc/resolv.conf.  When vm_extra_pre_umount is overridden these steps
    need to be performed in the cloud-specific conf file.

    PR:             271602
    Reviewed by:    dch, lwhsu
    Event:          Kitchener-Waterloo Hackathon 202305
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D40257

    (cherry picked from commit ae60012e46ecfe59a3506b903e685b6a3347807b)

 release/tools/oci.conf | 5 +++++
 1 file changed, 5 insertions(+)