Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944335 - app-containers/incus: missing dependency on sys-apps/gptfdisk
Summary: app-containers/incus: missing dependency on sys-apps/gptfdisk
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-21 16:28 UTC by Marc Schiffbauer
Modified: 2024-12-15 07:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer gentoo-dev 2024-11-21 16:28:16 UTC
=app-containers/incus-6.7 here

incusd tries to use the "sgdisk" tool, do do $things:

Nov 21 17:18:35 myhost incus[241023]: time="2024-11-21T17:18:35+01:00" level=warning msg="Skipped moving GPT alternative header to end of disk as sgdisk command not found" dev=/dev/zvol/zdata
/incus/images/b68ade925d0b2f2a1d63308581afbcc6df94a00d8a992b5bca8729e48a083688.block driver=zfs pool=default

So I would suggest to add sys-apps/gptfdisk (which contains sgdisk) to the dependencies.
Comment 1 Joonas Niilola gentoo-dev 2024-11-21 16:50:09 UTC
// moveGPTAltHeader moves the GPT alternative header to the end of the disk device supplied.
// If the device supplied is not detected as not being a GPT disk then no action is taken and nil is returned.
// If the required sgdisk command is not available a warning is logged, but no error is returned, as really it is
// the job of the VM quest to ensure the partitions are resized to the size of the disk (as Incus does not dictate
// what partition structure (if any) the disk should have. However we do attempt to move the GPT alternative
// header where possible so that the backup header is where it is expected in case of any corruption with the
// primary header.

Hmm this is another virtual machine support dep. Maybe it's time it's turned into a use flag with this many extra deps.
Comment 2 Marc Schiffbauer gentoo-dev 2024-11-22 07:27:27 UTC
I think thats a good idea as long as the USE is enabled by default
Comment 3 Joonas Niilola gentoo-dev 2024-11-23 07:29:08 UTC
I would like to do that, but I fear the dependencies are so heavy and qemu itself is not very user-friendly to emerge so most likely can't enable it by default.
Comment 4 Marc Schiffbauer gentoo-dev 2024-11-23 21:46:38 UTC
(In reply to Joonas Niilola from comment #3)
> I would like to do that, but I fear the dependencies are so heavy and qemu
> itself is not very user-friendly to emerge so most likely can't enable it by
> default.

Maybe I am missing something, but what do you thinkg is so heavy?

 * dependency graph for sys-apps/gptfdisk-1.0.10-r1
 `--  sys-apps/gptfdisk-1.0.10-r1  amd64 
   `--  dev-libs/popt-1.19-r1  (dev-libs/popt) amd64 
   `--  sys-libs/ncurses-6.4_p20240414  (sys-libs/ncurses) amd64  [unicode(+)]
   `--  sys-apps/util-linux-2.40.2  (sys-apps/util-linux) amd64 
   `--  virtual/pkgconfig-3  (virtual/pkgconfig) amd64
Comment 5 Joonas Niilola gentoo-dev 2024-11-24 06:35:43 UTC
'vm' use flag would need to pull
 - qemu
 - cdrtools
 - gptfdisk

and maybe virt-viewer or spice.
Comment 6 Marc Schiffbauer gentoo-dev 2024-11-25 11:51:40 UTC
(In reply to Joonas Niilola from comment #5)
> 'vm' use flag would need to pull
>  - qemu
>  - cdrtools
>  - gptfdisk
> 
> and maybe virt-viewer or spice.

Sounds like a good idea to me then. Sorry I thought you were talking about a USE for gptfdisk aloen ;)

I'd suggest naming the flag "qemu" though for consistency with other virtualization software:

app-emulation/libvirt[qemu] Support management of QEMU virtualisation (app-emulation/qemu)
Comment 7 Larry the Git Cow gentoo-dev 2024-12-15 07:23:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12e6e498ef9c722f38f4356f317050d50023eae8

commit 12e6e498ef9c722f38f4356f317050d50023eae8
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2024-12-15 07:18:00 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-12-15 07:23:19 +0000

    app-containers/incus: add 6.8
    
     - add 'qemu' use flag to pull all necessary dependencies to allow managing
       qemu-based virtual machines in incus,
     - add new env.d file to set INCUS_EDK2_PATH so OVMF files are found when using
       virtual machines,
     - allow selecting between iptables and nftables.
    
    All possible changes are synced to the LTS release upon new LTS version release.
    
    Closes: https://bugs.gentoo.org/944335
    Closes: https://bugs.gentoo.org/946184
    Closes: https://bugs.gentoo.org/945768
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-containers/incus/Manifest         |   2 +
 app-containers/incus/incus-6.8.ebuild | 228 ++++++++++++++++++++++++++++++++++
 app-containers/incus/metadata.xml     |   1 +
 3 files changed, 231 insertions(+)