From fc89e480388366549b5c55496c0ded5b1b80ebd0 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 12 Dec 2012 04:10:41 +0100 Subject: [PATCH 1/2] spec: do not build u2mfn not packaged in core-dom0 and core-vm This is packages in core-libs, so build it only there. --- rpm_spec/core-vm.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 0e4e17e..fe131b5 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -57,7 +57,6 @@ BuildRequires: xen-devel The Qubes core files for installation inside a Qubes VM. %build -make -C u2mfn make -C vchan -f Makefile.linux make -C misc make -C qubes_rpc From 29d2b2e36940f8423a0e63d044027ed47c698e72 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 12 Dec 2012 04:12:59 +0100 Subject: [PATCH 2/2] spec: generate proper debuginfo packages %setup macro must be present in %prep to set variables required by find-debuginfo script. Symlink is to place sources in nice /usr/src/debug/%{name}-%{version} subdir instead of plain /usr/src/debug/core (which can be ambiguous). Additionally all packages need to have _builddir pointing at top src dir (in core-dom0 it was dom0 subdir). And to cheat make about current dir (to have %{name}-%{version} included in path) chdir must be done by shell, not make - so can't use make -C. --- rpm_spec/core-libs.spec | 15 +++++++++++++-- rpm_spec/core-vm.spec | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/rpm_spec/core-libs.spec b/rpm_spec/core-libs.spec index a2931bf..00c3582 100644 --- a/rpm_spec/core-libs.spec +++ b/rpm_spec/core-libs.spec @@ -42,9 +42,16 @@ BuildRequires: xen-devel %description The Qubes core libraries for installation inside a Qubes Dom0 and VM. +%prep +# we operate on the current directory, so no need to unpack anything +# symlink is to generate useful debuginfo packages +rm -f %{name}-%{version} +ln -sf . %{name}-%{version} +%setup -T -D + %build -make -C u2mfn -make -C vchan -f Makefile.linux +(cd u2mfn; make) +(cd vchan; make -f Makefile.linux) %install install -D -m 0644 vchan/libvchan.h $RPM_BUILD_ROOT/usr/include/libvchan.h @@ -54,6 +61,10 @@ install -D -m 0644 u2mfn/u2mfn-kernel.h $RPM_BUILD_ROOT/usr/include/u2mfn-kernel install -D vchan/libvchan.so $RPM_BUILD_ROOT/%{_libdir}/libvchan.so install -D u2mfn/libu2mfn.so $RPM_BUILD_ROOT/%{_libdir}/libu2mfn.so +%clean +rm -rf $RPM_BUILD_ROOT +rm -f %{name}-%{version} + %files %{_libdir}/libvchan.so %{_libdir}/libu2mfn.so diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index fe131b5..8bc7be0 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -56,11 +56,19 @@ BuildRequires: xen-devel %description The Qubes core files for installation inside a Qubes VM. +%prep +# we operate on the current directory, so no need to unpack anything +# symlink is to generate useful debuginfo packages +rm -f %{name}-%{version} +ln -sf . %{name}-%{version} +%setup -T -D + %build -make -C vchan -f Makefile.linux -make -C misc -make -C qubes_rpc -make -C qrexec +(cd vchan; make -f Makefile.linux) +(cd qrexec; make) +for dir in qubes_rpc misc; do + (cd $dir; make) +done %pre @@ -357,6 +365,7 @@ fi %clean rm -rf $RPM_BUILD_ROOT +rm -f %{name}-%{version} %files %defattr(-,root,root,-)