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.
This commit is contained in:
parent
02e7469be3
commit
554d119fae
@ -46,23 +46,31 @@ Requires: xen-hvm
|
|||||||
Requires: createrepo
|
Requires: createrepo
|
||||||
Requires: gnome-packagekit
|
Requires: gnome-packagekit
|
||||||
Requires: cronie
|
Requires: cronie
|
||||||
%define _builddir %(pwd)/dom0
|
%define _builddir %(pwd)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Qubes core files for installation on Dom0.
|
The Qubes core files for installation on Dom0.
|
||||||
|
|
||||||
|
%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
|
%build
|
||||||
python -m compileall qvm-core qmemman
|
python -m compileall dom0/qvm-core dom0/qmemman
|
||||||
python -O -m compileall qvm-core qmemman
|
python -O -m compileall dom0/qvm-core dom0/qmemman
|
||||||
make -C restore
|
for dir in dom0/restore dom0/qubes_rpc misc; do
|
||||||
make -C qubes_rpc
|
(cd $dir; make)
|
||||||
make -C ../qubes_rpc
|
done
|
||||||
make -C ../vchan -f Makefile.linux
|
(cd vchan; make -f Makefile.linux)
|
||||||
make -C ../qrexec
|
(cd qrexec; make)
|
||||||
make -C ../misc
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
||||||
|
cd dom0
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||||
cp init.d/qubes_core $RPM_BUILD_ROOT/etc/init.d/
|
cp init.d/qubes_core $RPM_BUILD_ROOT/etc/init.d/
|
||||||
cp init.d/qubes_netvm $RPM_BUILD_ROOT/etc/init.d/
|
cp init.d/qubes_netvm $RPM_BUILD_ROOT/etc/init.d/
|
||||||
@ -285,6 +293,7 @@ mv -f /lib/udev/rules.d/69-xorg-vmmouse.rules /var/lib/qubes/removed-udev-script
|
|||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
rm -f %{name}-%{version}
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
if ! grep -q ^qubes: /etc/group ; then
|
if ! grep -q ^qubes: /etc/group ; then
|
||||||
|
@ -42,9 +42,16 @@ BuildRequires: xen-devel
|
|||||||
%description
|
%description
|
||||||
The Qubes core libraries for installation inside a Qubes Dom0 and VM.
|
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
|
%build
|
||||||
make -C u2mfn
|
(cd u2mfn; make)
|
||||||
make -C vchan -f Makefile.linux
|
(cd vchan; make -f Makefile.linux)
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -D -m 0644 vchan/libvchan.h $RPM_BUILD_ROOT/usr/include/libvchan.h
|
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 vchan/libvchan.so $RPM_BUILD_ROOT/%{_libdir}/libvchan.so
|
||||||
install -D u2mfn/libu2mfn.so $RPM_BUILD_ROOT/%{_libdir}/libu2mfn.so
|
install -D u2mfn/libu2mfn.so $RPM_BUILD_ROOT/%{_libdir}/libu2mfn.so
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
rm -f %{name}-%{version}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_libdir}/libvchan.so
|
%{_libdir}/libvchan.so
|
||||||
%{_libdir}/libu2mfn.so
|
%{_libdir}/libu2mfn.so
|
||||||
|
@ -56,11 +56,19 @@ BuildRequires: xen-devel
|
|||||||
%description
|
%description
|
||||||
The Qubes core files for installation inside a Qubes VM.
|
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
|
%build
|
||||||
make -C vchan -f Makefile.linux
|
(cd vchan; make -f Makefile.linux)
|
||||||
make -C misc
|
(cd qrexec; make)
|
||||||
make -C qubes_rpc
|
for dir in qubes_rpc misc; do
|
||||||
make -C qrexec
|
(cd $dir; make)
|
||||||
|
done
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
|
||||||
@ -357,6 +365,7 @@ fi
|
|||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
rm -f %{name}-%{version}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
Loading…
Reference in New Issue
Block a user