[pve-devel] [PATCH qemu 1/2] Provides a qemu-system-x86 virtual package

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Oct 4 16:10:16 CEST 2017


On 10/04/2017 03:53 PM, Emmanuel Kasper wrote:
> This allows adding additional debian packages on pve hosts
> which depends on those.
> 
> The following install paths were tested:
> 
>  * install of proxmox-ve on debian systems with standard package
>  set:  works as expected
> 
>  * install of proxmox-ve on debian having the debian qemu package
>  installed: refused by the package manager as expected, until
>  qemu, qemu-system-x86, libspice-server1 are deinstalled
> 
>  * manual install of qemu-system-x86 after proxmox-ve
>  is installed: refused by the package manager as expected, until
>  proxmox-ve and dependencies are removed
> 
>  * install of packages depending on qemu-system-x86
>  having proxmox-ve installed: thoses packages are installed as
>  expected, no conflict
> ---
>  debian/control | 5 ++++-
>  debian/rules   | 8 ++++++--
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/debian/control b/debian/control
> index 68ba534..c0ade16 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -51,10 +51,13 @@ Conflicts: kvm,
>             pve-qemu-kvm-2.6.18,
>             qemu,
>             qemu-kvm,
> +           qemu-system-x86,
>             qemu-utils,
> -Provides: qemu-utils,
> +Provides: qemu-system-x86,
> +          qemu-utils,
>  Replaces: pve-kvm,
>            pve-qemu-kvm-2.6.18,
> +          qemu-system-x86,
>            qemu-utils,
>  Description: Full virtualization on x86 hardware
>   Using KVM, one can run multiple virtual PCs, each running unmodified Linux or
> diff --git a/debian/rules b/debian/rules
> index 98637c7..5664fee 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -86,8 +86,12 @@ install: build
>  	# Add here commands to install the package into debian/pve-kvm.
>  	$(MAKE) DESTDIR=$(destdir) install
>  
> -	mv $(destdir)/usr/bin/qemu-system-$(ARCH) $(destdir)/usr/bin/kvm
> -	mv $(destdir)/usr/share/man/man1/qemu.1 $(destdir)/usr/share/man/man1/kvm.1
> +	dh_link usr/bin/qemu-system-$(ARCH) usr/bin/kvm
> +	# qemu-system-i386 and qemu-system-x86_64 provides the same hardware emulation
> +ifeq ($(ARCH),x86_64)
> +	dh_link usr/bin/qemu-system-$(ARCH) usr/bin/qemu-system-i386
> +endif
> +	dh_link usr/share/man/man1/qemu.1  usr/share/man/man1/kvm.1

What about adding a 'debian/pve-qemu-kvm.links' file with the following
content:
usr/bin/qemu-system-x86_64 usr/bin/kvm
usr/bin/qemu-system-x86_64 usr/bin/qemu-system-i386
usr/share/man/man1/qemu.1  usr/share/man/man1/kvm.1

We currently support only x86_64 so this should be OK, if we add another
architecture we either just add the other links too or (preferred) add a
new package with the same package source - e.g., pve-qemu-aarch64.

But it looks also OK like this, AFAIS. I just find the declarative syntax
nicer and used it here as I'm currently replacing the OVMF blobs with a own
package and added links for backward compatibility in my proposed way.

Also, maybe a bit much or out of this series scope, but could we not
obsolete our install override in debian/rules by using dh_link,
dh_install and dh_clean files for the respective package?

cheers,
Thomas

>  
>  	# Install the userspace utilities
>  	install -s -m 0755 vma $(destdir)/usr/bin/
> 




More information about the pve-devel mailing list