]> git.pld-linux.org Git - packages/xen.git/blobdiff - xen.spec
Use the %%{systemdtmpfilesdir} macro
[packages/xen.git] / xen.spec
index 7b2f03d58afd05c8e949d7f84b929fa61df67ba9..7cc0a647f55825fef6490abb2e5f18fbd464e7d9 100644 (file)
--- a/xen.spec
+++ b/xen.spec
@@ -1,28 +1,36 @@
 #
 # TODO:
-#  - most of the qemu config options aren't detected (NPTL, vde, fdt)
 #  - check if other tools/libs are not usable in domU, move them to -guest
 #    packages if so
 #  - pass bconds to qemu configure script (tricky, as the script is called from
 #    Xen Makefiles)
+#  - fix %doc - some files are installed in docdir both by make install and %d,
+#    other are installed once
+#  - now the build dependencies are insane (because of what qemu can use)
+#    we should make them optional or get rid of them all properly
 #
 #
 # Conditional build:
-%bcond_with    opengl          # enable OpenGL support in Xen qemu
-%bcond_without sdl             # disable SDL support in Xen tools
-%bcond_without bluetooth       # disable bluetooth support in Xen tools
-%bcond_without brlapi          # disable brlapi support in Xen tools
+%bcond_without opengl          # disable OpenGL support in Xen qemu
+%bcond_without sdl             # disable SDL support in Xen qemu
+%bcond_without bluetooth       # disable bluetooth support in Xen qemu
+%bcond_without brlapi          # disable brlapi support in Xen qemu
 %bcond_without ocaml           # build Ocaml libraries for Xen tools
-#
+%bcond_without efi             # build the EFI hypervisor
+
+%ifnarch %{x8664}
+%undefine      with_efi
+%endif
+
 # from Config.mk:
 %define        seabios_version         1.6.3.2
-#
+
 %define        xen_extfiles_url        http://xenbits.xensource.com/xen-extfiles
 Summary:       Xen - a virtual machine monitor
 Summary(pl.UTF-8):     Xen - monitor maszyny wirtualnej
 Name:          xen
 Version:       4.2.0
-Release:       0.1
+Release:       2
 License:       GPL v2, interface parts on BSD-like
 Group:         Applications/System
 Source0:       http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
@@ -64,6 +72,7 @@ Source52:     xenstored.init
 Source53:      xen-watchdog.init
 Source54:      xendomains.init
 Source55:      xen.logrotate
+Source56:      xen.tmpfiles
 Patch0:                %{name}-python_scripts.patch
 Patch1:                %{name}-symbols.patch
 Patch2:                %{name}-curses.patch
@@ -76,39 +85,69 @@ Patch7:             xen-net-disable-iptables-on-bridge.patch
 Patch8:                xen-configure-xend.patch
 Patch9:                xen-initscript.patch
 Patch10:       xen-quemu-softloat-c99.patch
+Patch11:       xen-qemu.patch
+Patch12:       xen-scripts-locking.patch
 URL:           http://www.xen.org/products/xenhyp.html
 %{?with_opengl:BuildRequires:  OpenGL-devel}
-%{?with_sdl:BuildRequires:     SDL-devel}
+%{?with_sdl:BuildRequires:     SDL-devel >= 1.2.1}
+%ifarch %{ix86} %{x8664}
 BuildRequires: acpica
 BuildRequires: bcc
+%endif
 %{?with_bluetooth:BuildRequires:       bluez-libs-devel}
 %{?with_brlapi:BuildRequires:  brlapi-devel}
+%{?with_efi:BuildRequires:     binutils >= 3:2.23.51.0.3-2}
+BuildRequires: bzip2-devel
+BuildRequires: ceph-devel
 BuildRequires: curl-devel
+BuildRequires: cyrus-sasl-devel >= 2
 BuildRequires: e2fsprogs-devel
 BuildRequires: gcc >= 5:3.4
 BuildRequires: gettext-devel
+BuildRequires: glib2-devel >= 1:2.12
 BuildRequires: gnutls-devel
 BuildRequires: latex2html >= 2008
+BuildRequires: libaio-devel
+BuildRequires: libiscsi-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libuuid-devel
+BuildRequires: lzo-devel >= 2
 BuildRequires: ncurses-devel
 %if %{with ocaml}
 BuildRequires: ocaml >= 3.04-7
 BuildRequires: ocaml-findlib
 %endif
+BuildRequires: nss-devel >= 3.12.8
+BuildRequires: openssl-devel
 BuildRequires: pciutils-devel
+BuildRequires: perl-base
 BuildRequires: pkgconfig
 BuildRequires: python-devel
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.647
+BuildRequires: spice-protocol >= 0.6.0
+BuildRequires: spice-server-devel >= 0.6.0
 BuildRequires: texi2html
 BuildRequires: texlive-dvips
 BuildRequires: texlive-latex-psnfss
 BuildRequires: texlive-xetex
+BuildRequires: usbredir-devel
+BuildRequires: vde2-devel
 BuildRequires: which
+# for xfsctl (<xfs/xfs.h>)
+BuildRequires: xfsprogs-devel
 BuildRequires: xorg-lib-libX11-devel
 BuildRequires: xorg-lib-libXext-devel
 BuildRequires: xz-devel
 BuildRequires: yajl-devel
 BuildRequires: zlib-devel
+# FIXME: see qemu configure comments on top of spec
+%{!?with_opengl:BuildConflicts:        OpenGL-devel}
+%{!?with_sdl:BuildConflicts:   SDL-devel}
+%{!?with_sdl:BuildConflicts:   SDL-devel}
+%{!?with_bluetooth:BuildConflicts:     bluez-libs-devel}
+%{!?with_brlapi:BuildConflicts:        brlapi-devel}
 Requires(post,preun):  /sbin/chkconfig
 Requires(post,preun,postun):   systemd-units >= 38
 Requires:      %{name}-libs = %{version}-%{release}
@@ -177,6 +216,7 @@ Narzędzia Xena dla maszyn wirtualnych dom0 i domU.
 Summary:       Xen libraries
 Summary(pl.UTF-8):     Biblioteki Xena
 Group:         Libraries
+Requires:      %{name}-libs-guest = %{version}-%{release}
 
 %description libs
 Xen libraries.
@@ -269,7 +309,6 @@ Summary:    Xen Python modules
 Summary(pl.UTF-8):     Moduły Pythona dla Xena
 Group:         Libraries
 Requires:      %{name}-libs = %{version}-%{release}
-Requires:      %{name}-xen-guest = %{version}-%{release}
 Conflicts:     xen < 3.2.1-0.3
 
 %description -n python-xen
@@ -304,6 +343,20 @@ This package provides bash-completion for Xen (xl).
 %description -n bash-completion-%{name} -l pl.UTF-8
 Ten pakiet zapewnia bashowe dopełnianie poleceń dla Xena (xl).
 
+%package efi
+Summary:       Xen hypervisor binary for EFI
+Summary(pl.UTF-8):     Hipernadzorca Xen dla EFI
+Group:         Applications/System
+Requires:      %{name}-libs-guest = %{version}-%{release}
+
+%description efi
+Xen hypervisor EFI binary, which can be booted directly from (U)EFI
+firmware without help from any additional bootloader.
+
+%description efi -l pl.UTF-8
+Nadzorca Xen w postaci, która może być uruchomiona wprost z firmware
+(U)EFI, bez potrzeby oddzielnego bootloadera.
+
 %prep
 %setup -q -a 16
 %patch0 -p1
@@ -317,6 +370,8 @@ Ten pakiet zapewnia bashowe dopełnianie poleceń dla Xena (xl).
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
+%patch12 -p1
 
 # stubdom sources
 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
@@ -329,10 +384,16 @@ echo GIT=/bin/false >> Config.mk
 export CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
 export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
 
+# NOTE:
+# - there is a quoting bug (in tools/driver/Makefile) that causes
+#   openssl is used instead of gcrypt; that's OK, openssl is obligatory
+#   anyway (see configure), gcrypt is optional
+# - prevent libiconv from being detected (not needed with glibc)
 cd tools
 %configure \
-       --disable-debug \
-       CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
+       CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" \
+       ac_cv_lib_iconv_libiconv_open=no \
+       --disable-debug
 cd ..
 
 %{__make} dist-xen dist-tools dist-docs \
@@ -348,12 +409,13 @@ unset CXXFLAGS
 %{__make} -j1 dist-stubdom \
        %{!?with_ocaml:OCAML_TOOLS=n} \
        CC="%{__cc}" \
-       CXX="%{__cxx}"
+       CXX="%{__cxx}" \
+       V=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{xen/examples,modules-load.d,logrotate.d} \
-       $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,%{systemdunitdir},/var/log/xen/console}
+       $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir},/var/log/xen/console}
 
 %{__make} -j1 install-xen install-tools install-stubdom install-docs \
        %{!?with_ocaml:OCAML_TOOLS=n} \
@@ -373,9 +435,9 @@ install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service
 install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled
 install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service
 install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored
-install %{SOURCE38} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xenstored.conf
+install %{SOURCE38} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xenstored.conf
 install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service
-install %{SOURCE40} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xend.conf
+install %{SOURCE40} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xend.conf
 install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service
 install %{SOURCE42} $RPM_BUILD_ROOT/etc/modules-load.d/xen-dom0.conf
 # sysvinit scripts
@@ -386,6 +448,7 @@ install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored
 install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog
 install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
 install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen
+install %{SOURCE56} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xen.conf
 
 mv $RPM_BUILD_ROOT/etc/xen/{x{m,l}example*,examples}
 
@@ -565,6 +628,7 @@ fi
 %{_sharedstatedir}/xenstored
 %dir /var/run/xenstored
 %{systemdtmpfilesdir}/xenstored.conf
+%{systemdtmpfilesdir}/xen.conf
 %dir %attr(0700,root,root) /var/log/xen
 %dir %attr(0700,root,root) /var/log/xen/console
 %{_datadir}/qemu-xen
@@ -740,3 +804,10 @@ fi
 %files -n bash-completion-%{name}
 %defattr(644,root,root,755)
 /etc/bash_completion.d/xl.sh
+
+%if %{with efi}
+%files efi
+%defattr(644,root,root,755)
+%dir %{_libdir}/efi
+%{_libdir}/efi/*.efi
+%endif
This page took 0.409221 seconds and 4 git commands to generate.