]> git.pld-linux.org Git - packages/xen.git/blobdiff - xen.spec
- put xend udev config file into the -xend subpackage
[packages/xen.git] / xen.spec
index 1f797b16a89c608c46178864880bc7a6bdb34cc9..2561929bd838063d26219a72c4f203f9a7ec1b5c 100644 (file)
--- a/xen.spec
+++ b/xen.spec
@@ -1,37 +1,76 @@
 #
-# NOTE:
-# - this xen-3.3.0 kernel and userspace
-#   if you are looking for xen-3.0.2 (kernel.spec:LINUX_2_6_16), checkout
-#   this spec from XEN_3_0_2 branch
-# - you will also need dom0 enabled kernel
-#
 # TODO:
-# - pldized init scripts
-# - script for rc-boot
-# - %%build fails on i686
+#  - most of the qemu config options aren't detected (curses, NPTL, vde, fdt)
+#  - package the ocaml stuff
+#
 #
 # Conditional build:
-%bcond_with    pae             # build with PAE (HIGHMEM64G) support
-%bcond_with    hvm             # build with hvm (full virtualization) support
+%bcond_with    ocaml           # build Ocaml libraries for Xen tools
 #
-%define                major   3.4
-%define                minor   3
+%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:       %{major}.%{minor}
-Release:       0.1
+Version:       4.1.2
+Release:       2
 License:       GPL
 Group:         Applications/System
 Source0:       http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: f8d001eb9e08525c451d38deb93908b1
-Source1:       %{name}-xend.init
-Source2:       %{name}-xendomains.init
+# Source0-md5: 73561faf3c1b5e36ec5c089b5db848ad
+# used by stubdoms
+Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz
+# Source10-md5:        36cc57650cffda9a0269493be2a169bb
+Source11: %{xen_extfiles_url}/newlib-1.16.0.tar.gz
+# Source11-md5:        bf8f1f9e3ca83d732c00a79a6ef29bc4
+Source12: %{xen_extfiles_url}/zlib-1.2.3.tar.gz
+# Source12-md5:        debc62758716a169df9f62e6ab2bc634
+Source13: %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2
+# Source13-md5:        cec05e7785497c5e19da2f114b934ffd
+Source14: %{xen_extfiles_url}/grub-0.97.tar.gz
+# Source14-md5:        cd3f3eb54446be6003156158d51f4884
+Source15: %{xen_extfiles_url}/ipxe-git-v1.0.0.tar.gz
+# Source15-md5:        fb7df96781d337899066d82059346885
+Source30:      proc-xen.mount
+Source31:      var-lib-xenstored.mount
+Source32:      blktapctrl.service
+Source33:      blktapctrl.sysconfig
+Source34:      xenconsoled.service
+Source35:      xenconsoled.sysconfig
+Source36:      xenstored.service
+Source37:      xenstored.sysconfig
+Source38:      xenstored.tmpfiles
+Source39:      xend.service
+Source40:      xend.tmpfiles
+Source41:      xen-watchdog.service
+Source42:      xen-dom0-modules-load.conf
+# sysvinit scripts
+Source50:      xend.init
+Source51:      xenconsoled.init
+Source52:      xenstored.init
+Source53:      xen-watchdog.init
+Source54:      xendomains.init
+Source55:      xen.logrotate
 Patch0:                %{name}-python_scripts.patch
-Patch1:                %{name}-gcc.patch
+Patch1:                %{name}-symbols.patch
+Patch2:                %{name}-curses.patch
+Patch3:                %{name}-xz.patch
+Patch4:                pygrubfix.patch
+Patch5:                pygrubfix2.patch
+Patch6:                qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch
+Patch7:                xen-4.1-testing.23190.patch
+Patch8:                xend.catchbt.patch
+Patch9:                xend.empty.xml.patch
+Patch10:       xend-pci-loop.patch
+Patch11:       xen-dumpdir.patch
+Patch12:       xen-net-disable-iptables-on-bridge.patch
+Patch13:       xen-configure-xend.patch
+Patch14:       xen-initscript.patch
+# stubdom patch
+Patch100:      grub-ext4-support.patch
 URL:           http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
 BuildRequires: SDL-devel
-%{?with_hvm:BuildRequires:     bcc}
+BuildRequires: acpica
+BuildRequires: bcc
 BuildRequires: curl-devel
 BuildRequires: e2fsprogs-devel
 BuildRequires: gcc >= 5:3.4
@@ -39,11 +78,17 @@ BuildRequires:      gettext-devel
 BuildRequires: latex2html
 BuildRequires: libidn-devel
 BuildRequires: ncurses-devel
+%if %{with ocaml}
+BuildRequires: ocaml >= 3.04-7
+BuildRequires: ocaml-findlib
+%requires_eq   ocaml-runtime
+%endif
+BuildRequires: pciutils-devel
 BuildRequires: pkgconfig
 BuildRequires: python-devel
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.268
-BuildRequires: texlive-dvips
+BuildRequires: rpmbuild(macros) >= 1.647
+#BuildRequires:        texlive-dvips
 #BuildRequires:        texlive-latex-data
 BuildRequires: texlive-latex-psnfss
 BuildRequires: transfig
@@ -57,25 +102,22 @@ Requires:  coreutils
 Requires:      diffutils
 Requires:      gawk
 Requires:      iptables
-Requires:      kernel(xen0)
 Requires:      losetup
 Requires:      net-tools
 Requires:      python-%{name} = %{version}-%{release}
 Requires:      rc-scripts
 Requires:      sed
+Requires:      systemd-units >= 38
 Requires:      util-linux
 Requires:      which
 Obsoletes:     xen-doc
+Obsoletes:     xen-udev
 ExclusiveArch: %{ix86} %{x8664}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # some PPC/SPARC boot image in ELF format
 %define         _noautostrip    .*%{_datadir}/xen/qemu/openbios-.*
 
-%ifnarch i686 athlon pentium3 pentium4
-%undefine      with_pae
-%endif
-
 %description
 This package contains the Xen hypervisor and Xen tools, needed to run
 virtual machines on x86 systems, together with the kernel-xen*
@@ -137,27 +179,17 @@ Static xen libraries.
 %description static -l pl.UTF-8
 Statyczne biblioteki xena.
 
-%package hotplug
-Summary:       xen hotplug scripts
-Summary(pl.UTF-8):     Skrypty hotplug dla xena
-Group:         Applications/System
-
-%description hotplug
-xen hotplug scripts.
-
-%description hotplug -l pl.UTF-8
-Skrypty hotplug dla xena.
-
-%package udev
-Summary:       xen udev scripts
-Summary(pl.UTF-8):     Skrypty udev dla xena
-Group:         Applications/System
+%package xend
+Summary:       xend daemon
+Summary(pl.UTF-8):     Demon xend
+Group:         Daemons
+Requires:      systemd-units >= 38
 
-%description udev
-xen udev scripts.
+%description xend
+xend daemon.
 
-%description udev -l pl.UTF-8
-Skrypty udev dla xena.
+%description xend -l pl.UTF-8
+Demon xend.
 
 %package -n python-xen
 Summary:       xen Python modules
@@ -171,115 +203,218 @@ xen Python modules.
 %description -n python-xen -l pl.UTF-8
 ModuĊ‚y Pythona dla xena.
 
+%package -n bash-completion-%{name}
+Summary:    bash-completion for xen
+Group:      Applications/Shells
+Requires:   %{name} = %{version}-%{release}
+Requires:   bash-completion
+
+%description -n bash-completion-%{name}
+This package provides bash-completion for xen.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
-
-find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+
+%{__rm} -v tools/check/*.orig
+
+# stubdom sources
+ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
+ln -s %{PATCH100} stubdom/grub.patches/99grub-ext4-support.patch
+ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz
 
 %build
-CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
-CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
-%{__make} -j1 xen tools \
-       %{?with_pae:XEN_TARGET_X86_PAE=y} \
+export CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
+export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
+
+%{__make} dist-xen dist-tools dist-docs \
+       %{!?with_ocaml:OCAML_TOOLS=n} \
+       prefix=%{_prefix} \
+       CC="%{__cc}" \
+       CXX="%{__cxx}"
+
+unset CFLAGS
+unset CXXFLAGS
+%{__make} -j1 dist-stubdom \
+       %{!?with_ocaml:OCAML_TOOLS=n} \
        CC="%{__cc}" \
        CXX="%{__cxx}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
-
-%{__make} install-xen install-tools install-docs \
-       CC="%{__cc}" \
-       CXX="%{__cxx}" \
-       %{?with_pae:XEN_TARGET_X86_PAE=y} \
-       DESTDIR=$RPM_BUILD_ROOT \
-       XEN_PYTHON_NATIVE_INSTALL=1
+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}
 
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
+%{__make} -j1 install-xen install-tools install-stubdom install-docs \
+       %{!?with_ocaml:OCAML_TOOLS=n} \
+       prefix=%{_prefix} \
+       DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
-install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
+%if "%{_lib}" == "lib64"
+ln -s %{_prefix}/lib/%{name}/bin/qemu-dm $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/qemu-dm
+%endif
 
-cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
-cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
+install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount
+install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount
+install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service
+install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl
+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 %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service
+install %{SOURCE40} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/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
+%{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/*
+install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
+install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled
+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
+
+mv $RPM_BUILD_ROOT/etc/xen/{xmexample*,examples}
+
+cp -p tools/blktap/README{,.blktap}
+cp -p tools/xenmon/README{,.xenmon}
 
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 
 %py_postclean
-# remove unneeded files
-rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
-rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
-rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html
-rm -rf $RPM_BUILD_ROOT/''etc/init.d
-rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
-rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
-# # strip - Unable to recognise the format of the input file
-# rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc32
-# rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc64
 
-
-# conflict with qemu
-rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1
-rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1
+# remove unneeded files
+%{__rm} $RPM_BUILD_ROOT/boot/xen-4.1.gz
+%{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
+%{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/sbin/chkconfig --add xend
+/sbin/chkconfig --add xen-watchdog
+/sbin/chkconfig --add xenconsoled
+/sbin/chkconfig --add xenstored
 /sbin/chkconfig --add xendomains
+%systemd_post xen-watchdog.service xenconsoled.service xenstored.service
 
 %preun
 if [ "$1" = "0" ]; then
-       %service xend stop
-       /sbin/chkconfig --del xend
-
        %service xendomains stop
        /sbin/chkconfig --del xendomains
+
+       %service xenconsoled stop
+       /sbin/chkconfig --del xenconsoled
+
+       %service xenstored stop
+       /sbin/chkconfig --del xenstored
+
+       %service xen-watchdog stop
+       /sbin/chkconfig --del xen-watchdog
 fi
+%systemd_preun xen-watchdog.service xenconsoled.service xenstored.service
+
+%postun
+%systemd_reload
+
+%post xend
+/sbin/chkconfig --add xend
+%systemd_post xend.service
+
+%preun xend
+if [ "$1" = "0" ]; then
+       %service xend stop
+       /sbin/chkconfig --del xend
+fi
+%systemd_preun xend.service
+
+%postun xend
+%systemd_reload
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc COPYING README docs/misc/*
+%doc COPYING README* docs/misc/* 
 %doc docs/html/*
+%doc tools/blktap/README.blktap tools/xenmon/README.xenmon
+%doc tools/ioemu-dir/*.html
 /boot/%{name}-syms-%{version}
 /boot/%{name}-%{version}.gz
 /boot/%{name}.gz
-%attr(754,root,root) /etc/rc.d/init.d/*
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/xen
+%attr(754,root,root) /etc/rc.d/init.d/xen-watchdog
+%attr(754,root,root) /etc/rc.d/init.d/xenconsoled
+%attr(754,root,root) /etc/rc.d/init.d/xenstored
+%attr(754,root,root) /etc/rc.d/init.d/xendomains
+%config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/xen-dom0.conf
+%{systemdunitdir}/proc-xen.mount
+%{systemdunitdir}/var-lib-xenstored.mount
+%{systemdunitdir}/xen-watchdog.service
+%{systemdunitdir}/xenconsoled.service
+%{systemdunitdir}/xenstored.service
 %dir %{_sysconfdir}/xen
-%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
-#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
 %dir %{_sysconfdir}/xen/auto
+%dir %{_sysconfdir}/xen/examples
 %dir %{_sysconfdir}/xen/scripts
 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/udev/xen-backend.rules
 %attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_sbindir}/*
+%attr(755,root,root) %{_sbindir}/[bfgikloqtv]*
+%attr(755,root,root) %{_sbindir}/xen??*
+%attr(755,root,root) %{_sbindir}/xl
+%attr(755,root,root) %{_sbindir}/xsview
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/bin
 %attr(744,root,root) %{_libdir}/%{name}/bin/*
 %if "%{_lib}" != "lib"
 %dir %{_prefix}/lib/%{name}
+%dir %{_prefix}/lib/%{name}/bin
+%attr(755,root,root) %{_prefix}/lib/%{name}/bin/qemu-dm
+%attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdom-dm
+%attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdompath.sh
 %endif
 %dir %{_prefix}/lib/%{name}/boot
-%{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
+%{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz
+%{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz
+%ifarch %{x8664}
+%{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz
+%endif
+%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
 %{_datadir}/xen
 %{_mandir}/man?/*
 %{_sharedstatedir}/xen
 %{_sharedstatedir}/xenstored
-%dir /var/run/xen-hotplug
-%dir %attr(700,root,root) /var/run/xend
 %dir /var/run/xenstored
+%{systemdtmpfilesdir}/xenstored.conf
+%dir %attr(0700,root,root) /var/log/xen
+%dir %attr(0700,root,root) /var/log/xen/console
 
 %files libs
 %defattr(644,root,root,755)
@@ -302,15 +437,19 @@ fi
 %defattr(644,root,root,755)
 %{_libdir}/lib*.a
 
-%if %{without hvm}
-%files hotplug
+%files xend
 %defattr(644,root,root,755)
-%attr(755,root,root) /etc/hotplug/*
-%endif
-
-%files udev
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/udev/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl
+%{systemdunitdir}/blktapctrl.service
+%{systemdunitdir}/xend.service
+%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend
+%config(noreplace) %verify(not md5 mtime size) /etc/udev/xend.rules
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend*
+%attr(755,root,root) %{_sbindir}/xend
+%attr(755,root,root) %{_sbindir}/xm
+%dir %attr(700,root,root) /var/run/xend
+%{systemdtmpfilesdir}/xend.conf
 
 %files -n python-xen
 %defattr(644,root,root,755)
@@ -320,6 +459,7 @@ fi
 %dir %{py_sitedir}/xen/lowlevel
 %{py_sitedir}/xen/lowlevel/*.py*
 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
+%{py_sitedir}/xen/remus
 %{py_sitedir}/xen/sv
 %{py_sitedir}/xen/util
 %{py_sitedir}/xen/web
@@ -330,3 +470,7 @@ fi
 %if "%{py_ver}" > "2.4"
 %{py_sitedir}/*.egg-info
 %endif
+
+%files -n bash-completion-%{name}
+%defattr(644,root,root,755)
+/etc/bash_completion.d/*
This page took 0.131956 seconds and 4 git commands to generate.