termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.91k stars 2.97k forks source link

Thread: Is it worth adding metapackages for QEMU, OVMF and SWTPM. And let OVMF and SWTPM as QEMU dependcy #19259

Open codenamedpkt opened 6 months ago

codenamedpkt commented 6 months ago

Why is it worth to add this package?

As we have qemu and the termux official QEMU UEFI firmware, ovmf. However, it could only boots up x86-64 systems with this.

We planed reimagining new qemu and its depends will be master version of the software plus not only ovmf insteading edk2. See below for these source package information described below:

qemu

qemu-block-extra
extra block backend modules for qemu-system and qemu-utils
qemu-guest-agent
Guest-side qemu-system agent
qemu-system
QEMU full system emulation binaries
qemu-system-arm
QEMU full system emulation binaries (arm)
qemu-system-common
QEMU full system emulation binaries (common files)
qemu-system-data
QEMU full system emulation (data files)
qemu-system-gui
QEMU full system emulation binaries (user interface and audio support)
qemu-system-mips
QEMU full system emulation binaries (mips)
qemu-system-misc
QEMU full system emulation binaries (miscellaneous)
qemu-system-modules-opengl
QEMU full system emulation binaries (OpenGL modules)
qemu-system-modules-spice
QEMU full system emulation binaries (spice modules)
qemu-system-ppc
QEMU full system emulation binaries (ppc)
qemu-system-s390x
QEMU full system emulation binaries (s390x)
qemu-system-sparc
QEMU full system emulation binaries (sparc)
qemu-system-x86
QEMU full system emulation binaries (x86)
qemu-system-x86-xen
QEMU full system emulation binaries (x86)
qemu-system-xen
QEMU full system emulation (Xen helper package)
qemu-user
QEMU user mode emulation binaries
qemu-user-binfmt
QEMU user mode binfmt registration for qemu-user
qemu-user-static
QEMU user mode emulation binaries (static version)
qemu-utils
QEMU utilities

edk2

efi-shell-aa64
UEFI Shell for 64-bit ARM architecture
efi-shell-arm
UEFI Shell for 32-bit ARM architecture
efi-shell-ia32
UEFI Shell for 32-bit x86 architecture
efi-shell-riscv64
UEFI Shell for 64-bit RISC-V architecture
efi-shell-x64
UEFI Shell for 64-bit x86 architecture
ovmf
UEFI firmware for 64-bit x86 virtual machines
ovmf-ia32
UEFI firmware for 32-bit x86 virtual machines
qemu-efi-aarch64
UEFI firmware for 64-bit ARM virtual machines
qemu-efi-arm
UEFI firmware for 32-bit ARM virtual machines
qemu-efi-riscv64
UEFI firmware for RISCV64 virtual machines

swtpm

swtpm
Libtpms-based TPM emulator
swtpm-tools
Tools for the TPM emulator

With the new ability considering qemu system and user headless removal with avoiding confused is the best freaking really much.

Home page URL

No response

Source code URLs

qemu edk2 swtpm

Packaging policy acknowledgement

Additional information

https://packages.ubuntu.com/source/noble/qemu https://packages.ubuntu.com/source/noble/edk2 https://packages.ubuntu.com/source/noble/swtpm

TomJo2000 commented 6 months ago

So you are suggesting to split out 2 very complicated into 20+ moderately complicated packages. I don't personally see the benefit but I'm not opposed to splitting out QEMU on principle.

I guess it just isn't very clear to me what you suggest we do about it.

QEMU and OVMF are large and complex packages. I don't think divide and conquer will work here.

codenamedpkt commented 6 months ago

So you are suggesting to split out 2 very complicated into 20+ moderately complicated packages. I don't personally see the benefit but I'm not opposed to splitting out QEMU on principle.

I guess it just isn't very clear to me what you suggest we do about it.

QEMU and OVMF are large and complex packages. I don't think divide and conquer will work here.

Update: We found swtpm but only installs core swtpm package, not installing swtpm-tools.

Logs:

nala install --update swtpm -y                                                                                                                                                                                 ─╯
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-main stable InRelease
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://its-pointless.github.io/files/24 termux InRelease
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-root root InRelease
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-x11 x11 InRelease
Fetched 0 Bytes in 5s (0 bytes/s)
=====================================================================================================================================================================================================================
 Installing
=====================================================================================================================================================================================================================
  Package:                                                               Version:                                                                                                                             Size:
  libseccomp                                                             2.5.5-3                                                                                                                              70 KB
  libtpms                                                                0.9.6                                                                                                                               302 KB
  swtpm                                                                  0.8.1                                                                                                                               128 KB

=====================================================================================================================================================================================================================
 Summary
=====================================================================================================================================================================================================================
 Install 3 Packages

 Total download size  500 KB
 Disk space required  1.9 MB

╭─ Downloading… ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Total Packages: 3/3                                                                                                                                                                                               │
│ Last Completed: libtpms_0.9.6_aarch64.deb                                                                                                                                                                         │
│ Time Remaining: 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 499.9/499.9 KB • 1.1 MB/s │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Unpacking:  libseccomp (2.5.5-3)
Unpacking:  libtpms (0.9.6)
Unpacking:  swtpm (0.8.1)
Setting up: libtpms (0.9.6)
Setting up: libseccomp (2.5.5-3)
Setting up: swtpm (0.8.1)
Processing: triggers for man (1.14.6-1)
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│✔ Running dpkg … ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 0:00:00 • 7/7│
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Finished Successfully

@TomJo2000, When we see user needs installing qemu, we have to input the qemu related packages one by one by running nala, apt or pkg install. With confusing deciding install headless version of qemu or not. Not some good sense and irritate to users have no coding knowledge.

We need to reimagine with one of meta package, by inputting qemu and edk2 only, installs the packages mentioned on the request form.

As now, users installing qemu and edk2 binaries, will cause following installation error:

nala install --update edk2 -y                                                                                                                                                                                   
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-main stable InRelease
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://its-pointless.github.io/files/24 termux InRelease
Updated:   https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-root root InRelease [14 KB]
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-x11 x11 InRelease
Updated:   https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-root root/stable aarch64 Packages [19 KB]
Fetched 33 KB in 5s (6.7 KB/s)
Error: edk2 not found
nala install --update qemu -y                                                                                                                                                                                  
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-main stable InRelease
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://its-pointless.github.io/files/24 termux InRelease
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-root root InRelease
No Change: https://download-legacy.mrpoons-studio.workers.dev/https://packages-cf.termux.dev/apt/termux-x11 x11 InRelease
Fetched 0 Bytes in 5s (0 bytes/s)
Error: qemu not found

As right now our official Termux QEMU UEFI firmware which comes by Kraxel, are not updated long long time ago freaking really much. That means with unstoppable update, we are taking risk with current firmware once user installs and runs their QEMU VM with UEFI support, no secure boot without CSM and TPM 2.0 support provided. Means you cannot install-running Windows 11 23H2, and upcoming Windows 12. A huge bug there.

And we make meta package qemu, edk2 and swtpm, first users easies remembering while installing packages; next, once users install qemu, edk2 and swtpm will depends to qemu and installs together. So no need worrying which one of qemu package should installed and get 3 major benefits: UEFI, new, updated secure boot mechanism who has UEFI boot without CSM (compatibility secure module, which makes users boots system up less secure), and TPM 2.0 support. And no need inputting long long of qemu package names. User wants use QEMU, simply text nala/apt/pkg install --update qemu -y and it goes further.

licy183 commented 6 months ago

IIRC I've switched the ovmf binary source from kraxel to fedora, see termux/termux-packages@7a5be6f7c5259893c76fa0bca561c85b054c6472. But this package haven't been bumped anymore since then.

I have no objection to splitting packages, but it seems adding some meta-packages is enough. Actually Termux doesn't split many packages out like other distro does. This will make it hard for maintainers to maintain packages.

codenamedpkt commented 6 months ago

IIRC I've switched the ovmf binary source from kraxel to fedora, see 7a5be6f. But this package haven't been bumped anymore since then.

I have no objection to splitting packages, but it seems adding some meta-packages is enough. Actually Termux doesn't split many packages out like other distro does. This will make it hard for maintainers to maintain packages.

@licy183, Use this guy here, this'es latest.

twaik commented 6 months ago

We do not mistaking again and again! We need nightlies of edk2, not fedora and kraxel source

Who are "we"? You never commited to termux and not part of the team. @licy183 is competent enough to decide what package source he should use in project and he does not need advices or critics in that. Also we prefer stable and reliable versions, not nightlies.

codenamedpkt commented 6 months ago

We do not mistaking again and again! We need nightlies of edk2, not fedora and kraxel source

Who are "we"? You never commited to termux and not part of the team. @licy183 is competent enough to decide what package source he should use in project and he does not need advices or critics in that. Also we prefer stable and reliable versions, not nightlies.

@licy183 @twaik, Update: I regret for my undesirable speech for you needed compiling and host edk2 by own. And we modified the comment above.

Latest links here. Please take pull request.

codenamedpkt commented 6 months ago

How about making ovmf, aka edk2, and swtpm, 2 metas, as qemu dependencies? So users installing QEMU no need input edk2 and swtpm and installs edk2, swtpm and swtpm-tools. What do you think?

And yes for downloading QEMU source, we recommend here.

twaik commented 6 months ago

Pull requests are always welcome.

codenamedpkt commented 6 months ago

I made pull request #19264, go ahead and approved.

Regret for your long wait.

twaik commented 6 months ago

I made pull request #19262, go ahead and approved.

Commit in this pull request does not meet contribution guidelines.

TomJo2000 commented 6 months ago

19262 does not currently meet our contribution guidelines in its current state as twaik has already pointed out over there.

codenamedpkt commented 6 months ago

Can you point me mistakes? As I read the guideline I copy-pasted and modified where need to fill.

twaik commented 6 months ago

See commit description. It is still "Update build.sh".

sylirre commented 6 months ago

Had to delete two last comments (from me ad TomJo2000) as outdated/irrelevant because someone (1Q23LYC45 ?) decided to take his words back.