提交 c3b1c51e 编写于 作者: D Daniel P. Berrange

libvirt.spec.in: use explicit --with-xxx for all features

Rather than letting the configure script auto-detect features
we expect, use --with-xxx to explicitly mandate them. This
ensures that we get an error upfront when running configure,
rather than a failure later during build or RPM file packaging
time.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 4cc7c987
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
# Advertise OVMF and AAVMF from nightly firmware repo # Advertise OVMF and AAVMF from nightly firmware repo
%if 0%{?fedora} %if 0%{?fedora}
%define with_loader_nvram --with-loader-nvram="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw" %define arg_loader_nvram --with-loader-nvram="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
%endif %endif
...@@ -944,110 +944,154 @@ rm -f $PATCHLIST ...@@ -944,110 +944,154 @@ rm -f $PATCHLIST
rm -rf .git rm -rf .git
%build %build
%if ! %{with_xen} %if %{with_xen}
%define _without_xen --without-xen %define arg_xen --with-xen
%else
%define arg_xen --without-xen
%endif %endif
%if ! %{with_qemu} %if %{with_qemu}
%define _without_qemu --without-qemu %define arg_qemu --with-qemu
%else
%define arg_qemu --without-qemu
%endif %endif
%if ! %{with_openvz} %if %{with_openvz}
%define _without_openvz --without-openvz %define arg_openvz --with-openvz
%else
%define arg_openvz --without-openvz
%endif %endif
%if ! %{with_lxc} %if %{with_lxc}
%define _without_lxc --without-lxc %define arg_lxc --with-lxc
%else
%define arg_lxc --without-lxc
%endif %endif
%if ! %{with_vbox} %if %{with_vbox}
%define _without_vbox --without-vbox %define arg_vbox --with-vbox
%else
%define arg_vbox --without-vbox
%endif %endif
%if ! %{with_libxl} %if %{with_libxl}
%define _without_libxl --without-libxl %define arg_libxl --with-libxl
%else
%define arg_libxl --without-libxl
%endif %endif
%if ! %{with_phyp} %if %{with_phyp}
%define _without_phyp --without-phyp %define arg_phyp --with-phyp
%else
%define arg_phyp --without-phyp
%endif %endif
%if ! %{with_esx} %if %{with_esx}
%define _without_esx --without-esx %define arg_esx --with-esx
%else
%define arg_esx --without-esx
%endif %endif
%if ! %{with_hyperv} %if %{with_hyperv}
%define _without_hyperv --without-hyperv %define arg_hyperv --with-hyperv
%else
%define arg_hyperv --without-hyperv
%endif %endif
%if ! %{with_vmware} %if %{with_vmware}
%define _without_vmware --without-vmware %define arg_vmware --with-vmware
%else
%define arg_vmware --without-vmware
%endif %endif
%if ! %{with_uml} %if %{with_uml}
%define _without_uml --without-uml %define arg_uml --with-uml
%else
%define arg_uml --without-uml
%endif %endif
%if ! %{with_storage_rbd} %if %{with_storage_rbd}
%define _without_storage_rbd --without-storage-rbd %define arg_storage_rbd --with-storage-rbd
%else
%define arg_storage_rbd --without-storage-rbd
%endif %endif
%if ! %{with_storage_sheepdog} %if %{with_storage_sheepdog}
%define _without_storage_sheepdog --without-storage-sheepdog %define arg_storage_sheepdog --with-storage-sheepdog
%else
%define arg_storage_sheepdog --without-storage-sheepdog
%endif %endif
%if ! %{with_storage_gluster} %if %{with_storage_gluster}
%define _without_storage_gluster --without-storage-gluster %define arg_storage_gluster --with-storage-gluster
%else
%define arg_storage_gluster --without-storage-gluster
%endif %endif
%if ! %{with_numactl} %if %{with_numactl}
%define _without_numactl --without-numactl %define arg_numactl --with-numactl
%else
%define arg_numactl --without-numactl
%endif %endif
%if ! %{with_numad} %if %{with_numad}
%define _without_numad --without-numad %define arg_numad --with-numad
%else
%define arg_numad --without-numad
%endif %endif
%if ! %{with_fuse} %if %{with_fuse}
%define _without_fuse --without-fuse %define arg_fuse --with-fuse
%else
%define arg_fuse --without-fuse
%endif %endif
%if ! %{with_sanlock} %if %{with_sanlock}
%define _without_sanlock --without-sanlock %define arg_sanlock --with-sanlock
%else
%define arg_sanlock --without-sanlock
%endif %endif
%if %{with_firewalld} %if %{with_firewalld}
%define _with_firewalld --with-firewalld %define arg_firewalld --with-firewalld
%else
%define arg_firewalld --without-firewalld
%endif %endif
%if ! %{with_wireshark} %if %{with_wireshark}
%define _without_wireshark --without-wireshark-dissector %define arg_wireshark --with-wireshark-dissector
%else
%define arg_wireshark --without-wireshark-dissector
%endif %endif
%if ! %{with_systemd_daemon} %if %{with_systemd_daemon}
%define _without_systemd_daemon --without-systemd-daemon %define arg_systemd_daemon --with-systemd-daemon
%else
%define arg_systemd_daemon --without-systemd-daemon
%endif %endif
%if ! %{with_pm_utils} %if %{with_pm_utils}
%define _without_pm_utils --without-pm-utils %define arg_pm_utils --with-pm-utils
%else
%define arg_pm_utils --without-pm-utils
%endif %endif
%define when %(date +"%%F-%%T") %define when %(date +"%%F-%%T")
%define where %(hostname) %define where %(hostname)
%define who %{?packager}%{!?packager:Unknown} %define who %{?packager}%{!?packager:Unknown}
%define with_packager --with-packager="%{who}, %{when}, %{where}" %define arg_packager --with-packager="%{who}, %{when}, %{where}"
%define with_packager_version --with-packager-version="%{release}" %define arg_packager_version --with-packager-version="%{release}"
%if %{with_systemd} %if %{with_systemd}
%define with_init_script --with-init-script=systemd %define arg_init_script --with-init-script=systemd
%else %else
%define with_init_script --with-init-script=redhat %define arg_init_script --with-init-script=redhat
%endif %endif
%if 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?fedora} || 0%{?rhel} >= 7
%define with_selinux_mount --with-selinux-mount="/sys/fs/selinux" %define arg_selinux_mount --with-selinux-mount="/sys/fs/selinux"
%else %else
%define with_selinux_mount --with-selinux-mount="/selinux" %define arg_selinux_mount --with-selinux-mount="/selinux"
%endif %endif
# place macros above and build commands below this comment # place macros above and build commands below this comment
...@@ -1057,21 +1101,21 @@ rm -rf .git ...@@ -1057,21 +1101,21 @@ rm -rf .git
%endif %endif
rm -f po/stamp-po rm -f po/stamp-po
%configure %{?_without_xen} \ %configure %{?arg_xen} \
%{?_without_qemu} \ %{?arg_qemu} \
%{?_without_openvz} \ %{?arg_openvz} \
%{?_without_lxc} \ %{?arg_lxc} \
%{?_without_vbox} \ %{?arg_vbox} \
%{?_without_libxl} \ %{?arg_libxl} \
--with-sasl \ --with-sasl \
--with-avahi \ --with-avahi \
--with-polkit \ --with-polkit \
--with-libvirtd \ --with-libvirtd \
%{?_without_uml} \ %{?arg_uml} \
%{?_without_phyp} \ %{?arg_phyp} \
%{?_without_esx} \ %{?arg_esx} \
%{?_without_hyperv} \ %{?arg_hyperv} \
%{?_without_vmware} \ %{?arg_vmware} \
--without-xenapi \ --without-xenapi \
--without-vz \ --without-vz \
--without-bhyve \ --without-bhyve \
...@@ -1082,39 +1126,39 @@ rm -f po/stamp-po ...@@ -1082,39 +1126,39 @@ rm -f po/stamp-po
--with-storage-iscsi \ --with-storage-iscsi \
--with-storage-disk \ --with-storage-disk \
--with-storage-mpath \ --with-storage-mpath \
%{?_without_storage_rbd} \ %{?arg_storage_rbd} \
%{?_without_storage_sheepdog} \ %{?arg_storage_sheepdog} \
%{?_without_storage_gluster} \ %{?arg_storage_gluster} \
%{?_without_numactl} \ %{?arg_numactl} \
%{?_without_numad} \ %{?arg_numad} \
--with-capng \ --with-capng \
%{?_without_fuse} \ %{?arg_fuse} \
--with-netcf \ --with-netcf \
--with-selinux \ --with-selinux \
%{?_with_selinux_mount} \ %{?arg_selinux_mount} \
--without-apparmor \ --without-apparmor \
--without-hal \ --without-hal \
--with-udev \ --with-udev \
--with-yajl \ --with-yajl \
%{?_without_sanlock} \ %{?arg_sanlock} \
--with-libpcap \ --with-libpcap \
--with-macvtap \ --with-macvtap \
--with-audit \ --with-audit \
--with-dtrace \ --with-dtrace \
--with-driver-modules \ --with-driver-modules \
%{?_with_firewalld} \ %{?arg_firewalld} \
%{?_without_wireshark} \ %{?arg_wireshark} \
%{?_without_systemd_daemon} \ %{?arg_systemd_daemon} \
%{?_without_pm_utils} \ %{?arg_pm_utils} \
--with-nss-plugin \ --with-nss-plugin \
%{with_packager} \ %{arg_packager} \
%{with_packager_version} \ %{arg_packager_version} \
--with-qemu-user=%{qemu_user} \ --with-qemu-user=%{qemu_user} \
--with-qemu-group=%{qemu_group} \ --with-qemu-group=%{qemu_group} \
%{?with_loader_nvram} \ %{?arg_loader_nvram} \
%{?enable_werror} \ %{?enable_werror} \
--enable-expensive-tests \ --enable-expensive-tests \
%{with_init_script} %{arg_init_script}
make %{?_smp_mflags} make %{?_smp_mflags}
gzip -9 ChangeLog gzip -9 ChangeLog
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册