Merge branch 'master' of git://git.qubes-os.org/marmarek/core
This commit is contained in:
commit
64e91005b7
@ -46,24 +46,31 @@ Requires: xen-hvm
|
||||
Requires: createrepo
|
||||
Requires: gnome-packagekit
|
||||
Requires: cronie
|
||||
%define _builddir %(pwd)/dom0
|
||||
%define _builddir %(pwd)
|
||||
|
||||
%description
|
||||
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
|
||||
python -m compileall qvm-core qmemman
|
||||
python -O -m compileall qvm-core qmemman
|
||||
make -C restore
|
||||
make -C qubes_rpc
|
||||
make -C ../qubes_rpc
|
||||
make -C ../u2mfn
|
||||
make -C ../vchan -f Makefile.linux
|
||||
make -C ../qrexec
|
||||
make -C ../misc
|
||||
python -m compileall dom0/qvm-core dom0/qmemman
|
||||
python -O -m compileall dom0/qvm-core dom0/qmemman
|
||||
for dir in dom0/restore dom0/qubes_rpc misc; do
|
||||
(cd $dir; make)
|
||||
done
|
||||
(cd vchan; make -f Makefile.linux)
|
||||
(cd qrexec; make)
|
||||
|
||||
%install
|
||||
|
||||
cd dom0
|
||||
|
||||
mkdir -p $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/
|
||||
@ -286,6 +293,7 @@ mv -f /lib/udev/rules.d/69-xorg-vmmouse.rules /var/lib/qubes/removed-udev-script
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -f %{name}-%{version}
|
||||
|
||||
%pre
|
||||
if ! grep -q ^qubes: /etc/group ; then
|
||||
|
@ -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
|
||||
|
@ -56,12 +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 u2mfn
|
||||
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
|
||||
|
||||
@ -358,6 +365,7 @@ fi
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -f %{name}-%{version}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
43
vchan/init.c
43
vchan/init.c
@ -206,6 +206,49 @@ static int server_interface_init(struct libvchan *ctrl, int devno)
|
||||
ctrl->wr_ring_size = sizeof(ctrl->ring->buf_##dir1); \
|
||||
ctrl->rd_ring_size = sizeof(ctrl->ring->buf_##dir2)
|
||||
|
||||
/**
|
||||
Run in AppVM (any domain).
|
||||
Release resources used by vchan link. Should be used after
|
||||
libvchan_close() to clean connection shutdown, but can be used alone in
|
||||
recovery case.
|
||||
\param ctrl connection to cleanup
|
||||
\returns -1 on failure (errno for details), 0 on success
|
||||
*/
|
||||
int libvchan_cleanup(struct libvchan *ctrl)
|
||||
{
|
||||
if (!ctrl)
|
||||
return 0;
|
||||
if (!ctrl->is_server)
|
||||
return 0;
|
||||
/* do not wait flush remaining queue to allow use libvchan_cleanup for
|
||||
* recovery situation. If someone want clean close, should call
|
||||
* libvchan_close() first.
|
||||
*/
|
||||
#if 0
|
||||
if (!ctrl->ring->server_closed)
|
||||
libvchan_close(ctrl);
|
||||
#endif
|
||||
if (xc_evtchn_unbind(ctrl->evfd, ctrl->evport) < 0)
|
||||
return -1;
|
||||
xc_evtchn_close(ctrl->evfd);
|
||||
#ifdef QREXEC_RING_V2
|
||||
/* not implemented yet, need to store gntmem_handle from ring_init somewhere */
|
||||
assert(0);
|
||||
/* in case of disabled assertions */
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
#else /* QREXEC_RING_V2 */
|
||||
#ifdef CONFIG_STUBDOM
|
||||
free(ctrl->ring);
|
||||
#else /* CONFIG_STUBDOM */
|
||||
munmap(ctrl->ring, 4096);
|
||||
/* FIXME: leak of u2mfn_fd, check u2mfnlib.c */
|
||||
#endif /* CONFIG_STUBDOM */
|
||||
#endif /* QREXEC_RING_V2 */
|
||||
free(ctrl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
Run in AppVM (any domain).
|
||||
Sleeps until the connection is established. (unless in stubdom)
|
||||
|
@ -88,4 +88,6 @@ int libvchan_is_eof(struct libvchan *ctrl);
|
||||
int libvchan_data_ready(struct libvchan *ctrl);
|
||||
int libvchan_buffer_space(struct libvchan *ctrl);
|
||||
|
||||
int libvchan_cleanup(struct libvchan *ctrl);
|
||||
|
||||
#endif /* _LIBVCHAN_H */
|
||||
|
@ -1 +1 @@
|
||||
2.1.0
|
||||
2.1.1
|
||||
|
Loading…
Reference in New Issue
Block a user