Re: [libvirt PATCH] rpm: merge mingw sub-packages into native spec
On Tue, Aug 09, 2022 at 02:05:10PM +0200, Pavel Hrdina wrote: > On Tue, Aug 09, 2022 at 12:59:36PM +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 09, 2022 at 01:56:43PM +0200, Pavel Hrdina wrote: > > > On Tue, Aug 09, 2022 at 12:54:09PM +0100, Daniel P. Berrangé wrote: > > > > On Tue, Aug 09, 2022 at 01:52:33PM +0200, Pavel Hrdina wrote: > > > > > On Mon, Aug 08, 2022 at 01:22:17PM -0400, Daniel P. Berrangé wrote: > > > > > > One specfile containing both native and mingw builds is the > > > > > > new best practice for Fedora. This reduces the maint burden > > > > > > and ensures the mingw packages don't fall behind. > > > > > > > > > > > > Signed-off-by: Daniel P. Berrangé > > > > > > --- > > > > > > .gitlab-ci.yml| 2 +- > > > > > > libvirt.spec.in | 287 > > > > > > meson.build | 17 +-- > > > > > > mingw-libvirt.spec.in | 327 > > > > > > -- > > > > > > 4 files changed, 293 insertions(+), 340 deletions(-) > > > > > > delete mode 100644 mingw-libvirt.spec.in > > > > > > > > > > The patch looks good but there are some changes not mentioned > > > > > directly. > > > > > > > > > > With this patch we will build MinGW packages by default on Fedora. Not > > > > > sure if that is desirable. I would rather have it the other way around > > > > > if it works for Fedora best practice. > > > > > > > > Fedora has shipped the native & mingw builds for years now. This just > > > > merges them into one spec. There's no change in what we actually build > > > > from Fedora POV. Or am I misunderstanding what you mean ? > > > > > > From Fedora POV everything is probably the same but for everybody else > > > this might be regression that would require using the --define as we > > > need to do for gitlab-ci. > > > > IMHO if a contributor using the upstream spec to build RPMs, they need > > to just deal with whatever the current packaging has defined. Ultimately > > you can still do 'dnf builddep' to get the list of deps installeds, > > including the mingw ones now. > > I just wanted to point it out as it was not mentioned in the commit > message and might not be obvious from the code itself. Since I don't > have a strong opinion about this change > > Reviewed-by: Pavel Hrdina I'll add a line to the commit message mentioning that RPM builds now need extra BRs to be installed. With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
Re: [libvirt PATCH] rpm: merge mingw sub-packages into native spec
On Tue, Aug 09, 2022 at 12:59:36PM +0100, Daniel P. Berrangé wrote: > On Tue, Aug 09, 2022 at 01:56:43PM +0200, Pavel Hrdina wrote: > > On Tue, Aug 09, 2022 at 12:54:09PM +0100, Daniel P. Berrangé wrote: > > > On Tue, Aug 09, 2022 at 01:52:33PM +0200, Pavel Hrdina wrote: > > > > On Mon, Aug 08, 2022 at 01:22:17PM -0400, Daniel P. Berrangé wrote: > > > > > One specfile containing both native and mingw builds is the > > > > > new best practice for Fedora. This reduces the maint burden > > > > > and ensures the mingw packages don't fall behind. > > > > > > > > > > Signed-off-by: Daniel P. Berrangé > > > > > --- > > > > > .gitlab-ci.yml| 2 +- > > > > > libvirt.spec.in | 287 > > > > > meson.build | 17 +-- > > > > > mingw-libvirt.spec.in | 327 > > > > > -- > > > > > 4 files changed, 293 insertions(+), 340 deletions(-) > > > > > delete mode 100644 mingw-libvirt.spec.in > > > > > > > > The patch looks good but there are some changes not mentioned directly. > > > > > > > > With this patch we will build MinGW packages by default on Fedora. Not > > > > sure if that is desirable. I would rather have it the other way around > > > > if it works for Fedora best practice. > > > > > > Fedora has shipped the native & mingw builds for years now. This just > > > merges them into one spec. There's no change in what we actually build > > > from Fedora POV. Or am I misunderstanding what you mean ? > > > > From Fedora POV everything is probably the same but for everybody else > > this might be regression that would require using the --define as we > > need to do for gitlab-ci. > > IMHO if a contributor using the upstream spec to build RPMs, they need > to just deal with whatever the current packaging has defined. Ultimately > you can still do 'dnf builddep' to get the list of deps installeds, > including the mingw ones now. I just wanted to point it out as it was not mentioned in the commit message and might not be obvious from the code itself. Since I don't have a strong opinion about this change Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature
Re: [libvirt PATCH] rpm: merge mingw sub-packages into native spec
On Tue, Aug 09, 2022 at 01:56:43PM +0200, Pavel Hrdina wrote: > On Tue, Aug 09, 2022 at 12:54:09PM +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 09, 2022 at 01:52:33PM +0200, Pavel Hrdina wrote: > > > On Mon, Aug 08, 2022 at 01:22:17PM -0400, Daniel P. Berrangé wrote: > > > > One specfile containing both native and mingw builds is the > > > > new best practice for Fedora. This reduces the maint burden > > > > and ensures the mingw packages don't fall behind. > > > > > > > > Signed-off-by: Daniel P. Berrangé > > > > --- > > > > .gitlab-ci.yml| 2 +- > > > > libvirt.spec.in | 287 > > > > meson.build | 17 +-- > > > > mingw-libvirt.spec.in | 327 -- > > > > 4 files changed, 293 insertions(+), 340 deletions(-) > > > > delete mode 100644 mingw-libvirt.spec.in > > > > > > The patch looks good but there are some changes not mentioned directly. > > > > > > With this patch we will build MinGW packages by default on Fedora. Not > > > sure if that is desirable. I would rather have it the other way around > > > if it works for Fedora best practice. > > > > Fedora has shipped the native & mingw builds for years now. This just > > merges them into one spec. There's no change in what we actually build > > from Fedora POV. Or am I misunderstanding what you mean ? > > From Fedora POV everything is probably the same but for everybody else > this might be regression that would require using the --define as we > need to do for gitlab-ci. IMHO if a contributor using the upstream spec to build RPMs, they need to just deal with whatever the current packaging has defined. Ultimately you can still do 'dnf builddep' to get the list of deps installeds, including the mingw ones now. With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
Re: [libvirt PATCH] rpm: merge mingw sub-packages into native spec
On Tue, Aug 09, 2022 at 12:54:09PM +0100, Daniel P. Berrangé wrote: > On Tue, Aug 09, 2022 at 01:52:33PM +0200, Pavel Hrdina wrote: > > On Mon, Aug 08, 2022 at 01:22:17PM -0400, Daniel P. Berrangé wrote: > > > One specfile containing both native and mingw builds is the > > > new best practice for Fedora. This reduces the maint burden > > > and ensures the mingw packages don't fall behind. > > > > > > Signed-off-by: Daniel P. Berrangé > > > --- > > > .gitlab-ci.yml| 2 +- > > > libvirt.spec.in | 287 > > > meson.build | 17 +-- > > > mingw-libvirt.spec.in | 327 -- > > > 4 files changed, 293 insertions(+), 340 deletions(-) > > > delete mode 100644 mingw-libvirt.spec.in > > > > The patch looks good but there are some changes not mentioned directly. > > > > With this patch we will build MinGW packages by default on Fedora. Not > > sure if that is desirable. I would rather have it the other way around > > if it works for Fedora best practice. > > Fedora has shipped the native & mingw builds for years now. This just > merges them into one spec. There's no change in what we actually build > from Fedora POV. Or am I misunderstanding what you mean ? From Fedora POV everything is probably the same but for everybody else this might be regression that would require using the --define as we need to do for gitlab-ci. Pavel signature.asc Description: PGP signature
Re: [libvirt PATCH] rpm: merge mingw sub-packages into native spec
On Tue, Aug 09, 2022 at 01:52:33PM +0200, Pavel Hrdina wrote: > On Mon, Aug 08, 2022 at 01:22:17PM -0400, Daniel P. Berrangé wrote: > > One specfile containing both native and mingw builds is the > > new best practice for Fedora. This reduces the maint burden > > and ensures the mingw packages don't fall behind. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > .gitlab-ci.yml| 2 +- > > libvirt.spec.in | 287 > > meson.build | 17 +-- > > mingw-libvirt.spec.in | 327 -- > > 4 files changed, 293 insertions(+), 340 deletions(-) > > delete mode 100644 mingw-libvirt.spec.in > > The patch looks good but there are some changes not mentioned directly. > > With this patch we will build MinGW packages by default on Fedora. Not > sure if that is desirable. I would rather have it the other way around > if it works for Fedora best practice. Fedora has shipped the native & mingw builds for years now. This just merges them into one spec. There's no change in what we actually build from Fedora POV. Or am I misunderstanding what you mean ? With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
Re: [libvirt PATCH] rpm: merge mingw sub-packages into native spec
On Mon, Aug 08, 2022 at 01:22:17PM -0400, Daniel P. Berrangé wrote: > One specfile containing both native and mingw builds is the > new best practice for Fedora. This reduces the maint burden > and ensures the mingw packages don't fall behind. > > Signed-off-by: Daniel P. Berrangé > --- > .gitlab-ci.yml| 2 +- > libvirt.spec.in | 287 > meson.build | 17 +-- > mingw-libvirt.spec.in | 327 -- > 4 files changed, 293 insertions(+), 340 deletions(-) > delete mode 100644 mingw-libvirt.spec.in The patch looks good but there are some changes not mentioned directly. With this patch we will build MinGW packages by default on Fedora. Not sure if that is desirable. I would rather have it the other way around if it works for Fedora best practice. We also lose the ability to build only MinGW packages but I don't think that's a big deal. Pavel signature.asc Description: PGP signature
[libvirt PATCH] rpm: merge mingw sub-packages into native spec
One specfile containing both native and mingw builds is the new best practice for Fedora. This reduces the maint burden and ensures the mingw packages don't fall behind. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.yml| 2 +- libvirt.spec.in | 287 meson.build | 17 +-- mingw-libvirt.spec.in | 327 -- 4 files changed, 293 insertions(+), 340 deletions(-) delete mode 100644 mingw-libvirt.spec.in diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a8b89729f..39c5f8fb6d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ include: - meson dist -C build --no-tests - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip"; then -rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild/" -ta build/meson-dist/libvirt-*.tar.xz; +rpmbuild --clean --nodeps --define "_without_mingw 1" --define "_topdir $PWD/rpmbuild/" -ta build/meson-dist/libvirt-*.tar.xz; mv rpmbuild/RPMS/x86_64/ libvirt-rpms/; else meson compile -C build; diff --git a/libvirt.spec.in b/libvirt.spec.in index a238edf2aa..fe386bfef2 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -197,6 +197,10 @@ %define qemu_moddir %{_libdir}/qemu %define qemu_datadir %{_datadir}/qemu +%define with_mingw 0 +%if 0%{?fedora} +%define with_mingw 0%{!?_without_mingw:1} +%endif # RHEL releases provide stable tool chains and so it is safe to turn # compiler warning into errors without being worried about frequent @@ -393,6 +397,36 @@ BuildRequires: libtirpc-devel BuildRequires: firewalld-filesystem %endif +%if %{with_mingw} +BuildRequires: mingw32-filesystem +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils +BuildRequires: mingw32-glib2 >= 2.48 +BuildRequires: mingw32-libgpg-error +BuildRequires: mingw32-libgcrypt +BuildRequires: mingw32-gnutls +BuildRequires: mingw32-gettext +BuildRequires: mingw32-libxml2 +BuildRequires: mingw32-portablexdr +BuildRequires: mingw32-dlfcn +BuildRequires: mingw32-libssh2 +BuildRequires: mingw32-curl + +BuildRequires: mingw64-filesystem +BuildRequires: mingw64-gcc +BuildRequires: mingw64-binutils +BuildRequires: mingw64-glib2 >= 2.48 +BuildRequires: mingw64-libgpg-error +BuildRequires: mingw64-libgcrypt +BuildRequires: mingw64-gnutls +BuildRequires: mingw64-gettext +BuildRequires: mingw64-libxml2 +BuildRequires: mingw64-portablexdr +BuildRequires: mingw64-dlfcn +BuildRequires: mingw64-libssh2 +BuildRequires: mingw64-curl +%endif + %description Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). The main package includes @@ -948,6 +982,25 @@ Requires: libvirt-daemon-driver-network = %{version}-%{release} %description nss Libvirt plugin for NSS for translating domain names into IP addresses. +%if %{with_mingw} +%package -n mingw32-libvirt +Summary: %{summary} +Obsoletes: mingw32-libvirt-static < 7.0.0 +BuildArch: noarch + +%description -n mingw32-libvirt +MinGW Windows libvirt virtualization library. + +%package -n mingw64-libvirt +Summary: %{summary} +Obsoletes: mingw64-libvirt-static < 7.0.0 +BuildArch: noarch + +%description -n mingw64-libvirt +MinGW Windows libvirt virtualization library. + +%{?mingw_debug_package} +%endif %prep @@ -1191,6 +1244,84 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec) %meson_build +%if %{with_mingw} +%mingw_meson \ + --auto-features=enabled \ + -Ddriver_remote=enabled \ + -Ddriver_test=enabled \ + -Ddriver_esx=enabled \ + -Dcurl=enabled \ + -Ddocs=enabled \ + -Dapparmor=disabled \ + -Dapparmor_profiles=disabled \ + -Dattr=disabled \ + -Daudit=disabled \ + -Dbash_completion=disabled \ + -Dblkid=disabled \ + -Dcapng=disabled \ + -Ddriver_bhyve=disabled \ + -Ddriver_hyperv=disabled \ + -Ddriver_interface=disabled \ + -Ddriver_libvirtd=disabled \ + -Ddriver_libxl=disabled \ + -Ddriver_lxc=disabled \ + -Ddriver_network=disabled \ + -Ddriver_openvz=disabled \ + -Ddriver_qemu=disabled \ + -Ddriver_secrets=disabled \ + -Ddriver_vbox=disabled \ + -Ddriver_vmware=disabled \ + -Ddriver_vz=disabled \ + -Ddtrace=disabled \ + -Dexpensive_tests=enabled \ + -Dfirewalld=disabled \ + -Dfirewalld_zone=disabled \ + -Dfuse=disabled \ + -Dglusterfs=disabled \ + -Dhost_validate=disabled \ + -Dlibiscsi=disabled \ + -Dlibnl=disabled \ + -Dlibpcap=disabled \ + -Dlibssh2=disabled \ + -Dlibssh=disabled \ + -Dlogin_shell=disabled \ + -Dnetcf=disabled \ + -Dnls=disabled \ + -Dnss=disabled \ + -Dnumactl=disabled \ + -Dnumad=disabled \ + -Dopenwsman=disabled \ + -Dpciaccess=disabled \ + -Dpm_utils=disabled \ + -Dpolkit=disabled \ + -Dreadline=disabled \ + -Drpath=disabled \ + -Dsanlock=disabled \ + -Dsasl=disabled \ + -Dsecdriver_apparmor=disabled \ + -Dsecdriver_selinux=disabled \ + -Dselinux=disabled \ + -Dstorage_dir=disabled \ + -Dstorage_disk=disabled \ +