fix Makefile, setup.py, spec and travis

QubesOS/qubes-issues#2074
This commit is contained in:
Wojtek Porczyk 2017-01-20 12:40:00 +01:00
parent d74567d65f
commit 9f7ba53eec
6 changed files with 167 additions and 135 deletions

View File

@ -2,7 +2,8 @@ sudo: required
dist: trusty dist: trusty
language: python language: python
python: python:
- '2.7' # - '2.7'
- '3.4'
install: install:
- pip install --quiet -r ci/requirements.txt - pip install --quiet -r ci/requirements.txt
- git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder - git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder

View File

@ -5,6 +5,7 @@ VERSION := $(shell cat version)
DIST_DOM0 ?= fc18 DIST_DOM0 ?= fc18
OS ?= Linux OS ?= Linux
PYTHON ?= python3
ifeq ($(OS),Linux) ifeq ($(OS),Linux)
DATADIR ?= /var/lib/qubes DATADIR ?= /var/lib/qubes
@ -43,7 +44,7 @@ clean:
make -C dispvm clean make -C dispvm clean
all: all:
python setup.py build $(PYTHON) setup.py build
# make all -C tests # make all -C tests
# Currently supported only on xen # Currently supported only on xen
ifeq ($(BACKEND_VMM),xen) ifeq ($(BACKEND_VMM),xen)
@ -56,7 +57,7 @@ ifeq ($(OS),Linux)
$(MAKE) install -C linux/aux-tools $(MAKE) install -C linux/aux-tools
$(MAKE) install -C linux/system-config $(MAKE) install -C linux/system-config
endif endif
python setup.py install -O1 --skip-build --root $(DESTDIR) $(PYTHON) setup.py install -O1 --skip-build --root $(DESTDIR)
ln -s qvm-device $(DESTDIR)/usr/bin/qvm-pci ln -s qvm-device $(DESTDIR)/usr/bin/qvm-pci
ln -s qvm-device $(DESTDIR)/usr/bin/qvm-usb ln -s qvm-device $(DESTDIR)/usr/bin/qvm-usb
# $(MAKE) install -C tests # $(MAKE) install -C tests

View File

@ -3,7 +3,7 @@
# You can set these variables from the command line. # You can set these variables from the command line.
SPHINXOPTS = SPHINXOPTS =
SPHINXBUILD = sphinx-build SPHINXBUILD ?= sphinx-build
PAPER = PAPER =
BUILDDIR = _build BUILDDIR = _build
@ -161,7 +161,7 @@ doctest: $(DEPEND)
autoxml.rst: ../relaxng/qubes.rng example.xml autoxml.rst: ../relaxng/qubes.rng example.xml
../qubes/rngdoc.py $+ > $@ $(PYTHON) ../qubes/rngdoc.py $+ > $@
.PHONY: install .PHONY: install
install: man install: man

View File

@ -33,8 +33,8 @@ Group: Qubes
Vendor: Invisible Things Lab Vendor: Invisible Things Lab
License: GPL License: GPL
URL: http://www.qubes-os.org URL: http://www.qubes-os.org
BuildRequires: python-sphinx BuildRequires: python3-sphinx
BuildRequires: python-lxml BuildRequires: python3-lxml
BuildArch: noarch BuildArch: noarch
Obsoletes: qubes-doc-dom0 <= 2.0 Obsoletes: qubes-doc-dom0 <= 2.0
Provides: qubes-doc-dom0 Provides: qubes-doc-dom0
@ -45,11 +45,13 @@ Provides: qubes-doc-dom0
The Qubes docs for dom0 tools The Qubes docs for dom0 tools
%build %build
make man make PYTHON=%{__python3} SPHINXBUILD=sphinx-build-%{python3_version} man
%install %install
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT \
PYTHON=%{__python3} SPHINXBUILD=sphinx-build-%{python3_version} \
install
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT

View File

@ -23,7 +23,7 @@
# #
# #
#%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(False)")} #%{!?python3_sitelib: %define python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(False)")}
%{!?version: %define version %(cat version)} %{!?version: %define version %(cat version)}
@ -57,10 +57,12 @@ AutoReq: no
BuildRequires: ImageMagick BuildRequires: ImageMagick
BuildRequires: systemd-units BuildRequires: systemd-units
BuildRequires: python3-devel
# for building documentation # for building documentation
BuildRequires: python-sphinx BuildRequires: python3-sphinx
BuildRequires: libvirt-python BuildRequires: libvirt-python3
BuildRequires: dbus-python BuildRequires: python3-dbus
Requires(post): systemd-units Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
@ -70,10 +72,10 @@ Requires: python-setuptools
Requires: qubes-core-dom0-linux >= 3.1.8 Requires: qubes-core-dom0-linux >= 3.1.8
Requires: qubes-core-dom0-doc Requires: qubes-core-dom0-doc
Requires: qubes-db-dom0 Requires: qubes-db-dom0
Requires: python-lxml Requires: python3-lxml
# TODO: R: qubes-gui-dom0 >= 2.1.11 # TODO: R: qubes-gui-dom0 >= 2.1.11
Conflicts: qubes-gui-dom0 < 1.1.13 Conflicts: qubes-gui-dom0 < 1.1.13
Requires: libvirt-python Requires: libvirt-python3
%if x%{?backend_vmm} == xxen %if x%{?backend_vmm} == xxen
Requires: xen-runtime Requires: xen-runtime
Requires: xen-hvm Requires: xen-hvm
@ -88,7 +90,7 @@ Requires: dmidecode
Requires: PyQt4 Requires: PyQt4
# for property's docstrings # for property's docstrings
Requires: python-docutils Requires: python3-docutils
# for lvm support # for lvm support
Requires: lvm2-python-libs Requires: lvm2-python-libs
@ -117,7 +119,7 @@ make all
make install \ make install \
DESTDIR=$RPM_BUILD_ROOT \ DESTDIR=$RPM_BUILD_ROOT \
UNITDIR=%{_unitdir} \ UNITDIR=%{_unitdir} \
PYTHON_SITEPATH=%{python_sitelib} \ PYTHON_SITEPATH=%{python3_sitelib} \
SYSCONFDIR=%{_sysconfdir} SYSCONFDIR=%{_sysconfdir}
%post %post
@ -206,137 +208,163 @@ fi
/usr/bin/qubes-* /usr/bin/qubes-*
/usr/bin/qmemmand /usr/bin/qmemmand
%dir %{python_sitelib}/qubes-*.egg-info %dir %{python3_sitelib}/qubes-*.egg-info
%{python_sitelib}/qubes-*.egg-info/* %{python3_sitelib}/qubes-*.egg-info/*
%dir %{python_sitelib}/qubes %dir %{python3_sitelib}/qubes
%{python_sitelib}/qubes/__init__.py* %dir %{python3_sitelib}/qubes/__pycache__
%{python_sitelib}/qubes/app.py* %{python3_sitelib}/qubes/__pycache__/*
%{python_sitelib}/qubes/backup.py* %{python3_sitelib}/qubes/__init__.py
%{python_sitelib}/qubes/config.py* %{python3_sitelib}/qubes/app.py
%{python_sitelib}/qubes/core2migration.py* %{python3_sitelib}/qubes/backup.py
%{python_sitelib}/qubes/devices.py* %{python3_sitelib}/qubes/config.py
%{python_sitelib}/qubes/dochelpers.py* %{python3_sitelib}/qubes/core2migration.py
%{python_sitelib}/qubes/events.py* %{python3_sitelib}/qubes/devices.py
%{python_sitelib}/qubes/firewall.py* %{python3_sitelib}/qubes/dochelpers.py
%{python_sitelib}/qubes/exc.py* %{python3_sitelib}/qubes/events.py
%{python_sitelib}/qubes/log.py* %{python3_sitelib}/qubes/firewall.py
%{python_sitelib}/qubes/rngdoc.py* %{python3_sitelib}/qubes/exc.py
%{python_sitelib}/qubes/tarwriter.py* %{python3_sitelib}/qubes/log.py
%{python_sitelib}/qubes/utils.py* %{python3_sitelib}/qubes/rngdoc.py
%{python3_sitelib}/qubes/tarwriter.py
%{python3_sitelib}/qubes/utils.py
%dir %{python_sitelib}/qubes/vm %dir %{python3_sitelib}/qubes/vm
%{python_sitelib}/qubes/vm/__init__.py* %dir %{python3_sitelib}/qubes/vm/__pycache__
%{python_sitelib}/qubes/vm/adminvm.py* %{python3_sitelib}/qubes/vm/__pycache__/*
%{python_sitelib}/qubes/vm/appvm.py* %{python3_sitelib}/qubes/vm/__init__.py
%{python_sitelib}/qubes/vm/dispvm.py* %{python3_sitelib}/qubes/vm/adminvm.py
%{python_sitelib}/qubes/vm/qubesvm.py* %{python3_sitelib}/qubes/vm/appvm.py
%{python_sitelib}/qubes/vm/standalonevm.py* %{python3_sitelib}/qubes/vm/dispvm.py
%{python_sitelib}/qubes/vm/templatevm.py* %{python3_sitelib}/qubes/vm/qubesvm.py
%{python3_sitelib}/qubes/vm/standalonevm.py
%{python3_sitelib}/qubes/vm/templatevm.py
%dir %{python_sitelib}/qubes/vm/mix %dir %{python3_sitelib}/qubes/vm/mix
%{python_sitelib}/qubes/vm/mix/__init__.py* %dir %{python3_sitelib}/qubes/vm/mix/__pycache__
%{python_sitelib}/qubes/vm/mix/net.py* %{python3_sitelib}/qubes/vm/mix/__pycache__/*
%{python3_sitelib}/qubes/vm/mix/__init__.py
%{python3_sitelib}/qubes/vm/mix/net.py
%dir %{python_sitelib}/qubes/storage %dir %{python3_sitelib}/qubes/storage
%{python_sitelib}/qubes/storage/__init__.py* %dir %{python3_sitelib}/qubes/storage/__pycache__
%{python_sitelib}/qubes/storage/file.py* %{python3_sitelib}/qubes/storage/__pycache__/*
%{python_sitelib}/qubes/storage/domain.py* %{python3_sitelib}/qubes/storage/__init__.py
%{python_sitelib}/qubes/storage/kernels.py* %{python3_sitelib}/qubes/storage/file.py
%{python_sitelib}/qubes/storage/lvm.py* %{python3_sitelib}/qubes/storage/domain.py
%{python3_sitelib}/qubes/storage/kernels.py
%{python3_sitelib}/qubes/storage/lvm.py
%dir %{python_sitelib}/qubes/tools %dir %{python3_sitelib}/qubes/tools
%{python_sitelib}/qubes/tools/__init__.py* %dir %{python3_sitelib}/qubes/tools/__pycache__
%{python_sitelib}/qubes/tools/qmemmand.py* %{python3_sitelib}/qubes/tools/__pycache__/*
%{python_sitelib}/qubes/tools/qubes_create.py* %{python3_sitelib}/qubes/tools/__init__.py
%{python_sitelib}/qubes/tools/qubes_monitor_layout_notify.py* %{python3_sitelib}/qubes/tools/qmemmand.py
%{python_sitelib}/qubes/tools/qubes_prefs.py* %{python3_sitelib}/qubes/tools/qubes_create.py
%{python_sitelib}/qubes/tools/qvm_block.py* %{python3_sitelib}/qubes/tools/qubes_monitor_layout_notify.py
%{python_sitelib}/qubes/tools/qvm_backup.py* %{python3_sitelib}/qubes/tools/qubes_prefs.py
%{python_sitelib}/qubes/tools/qvm_backup_restore.py* %{python3_sitelib}/qubes/tools/qvm_block.py
%{python_sitelib}/qubes/tools/qvm_create.py* %{python3_sitelib}/qubes/tools/qvm_backup.py
%{python_sitelib}/qubes/tools/qvm_device.py* %{python3_sitelib}/qubes/tools/qvm_backup_restore.py
%{python_sitelib}/qubes/tools/qvm_features.py* %{python3_sitelib}/qubes/tools/qvm_create.py
%{python_sitelib}/qubes/tools/qvm_firewall.py* %{python3_sitelib}/qubes/tools/qvm_device.py
%{python_sitelib}/qubes/tools/qvm_check.py* %{python3_sitelib}/qubes/tools/qvm_features.py
%{python_sitelib}/qubes/tools/qvm_clone.py* %{python3_sitelib}/qubes/tools/qvm_firewall.py
%{python_sitelib}/qubes/tools/qvm_kill.py* %{python3_sitelib}/qubes/tools/qvm_check.py
%{python_sitelib}/qubes/tools/qvm_ls.py* %{python3_sitelib}/qubes/tools/qvm_clone.py
%{python_sitelib}/qubes/tools/qvm_pause.py* %{python3_sitelib}/qubes/tools/qvm_kill.py
%{python_sitelib}/qubes/tools/qvm_pool.py* %{python3_sitelib}/qubes/tools/qvm_ls.py
%{python_sitelib}/qubes/tools/qvm_prefs.py* %{python3_sitelib}/qubes/tools/qvm_pause.py
%{python_sitelib}/qubes/tools/qvm_remove.py* %{python3_sitelib}/qubes/tools/qvm_pool.py
%{python_sitelib}/qubes/tools/qvm_run.py* %{python3_sitelib}/qubes/tools/qvm_prefs.py
%{python_sitelib}/qubes/tools/qvm_shutdown.py* %{python3_sitelib}/qubes/tools/qvm_remove.py
%{python_sitelib}/qubes/tools/qvm_start.py* %{python3_sitelib}/qubes/tools/qvm_run.py
%{python_sitelib}/qubes/tools/qvm_tags.py* %{python3_sitelib}/qubes/tools/qvm_shutdown.py
%{python_sitelib}/qubes/tools/qvm_template_commit.py* %{python3_sitelib}/qubes/tools/qvm_start.py
%{python_sitelib}/qubes/tools/qvm_template_postprocess.py* %{python3_sitelib}/qubes/tools/qvm_tags.py
%{python_sitelib}/qubes/tools/qvm_unpause.py* %{python3_sitelib}/qubes/tools/qvm_template_commit.py
%{python3_sitelib}/qubes/tools/qvm_template_postprocess.py
%{python3_sitelib}/qubes/tools/qvm_unpause.py
%dir %{python_sitelib}/qubes/ext %dir %{python3_sitelib}/qubes/ext
%{python_sitelib}/qubes/ext/__init__.py* %dir %{python3_sitelib}/qubes/ext/__pycache__
%{python_sitelib}/qubes/ext/gui.py* %{python3_sitelib}/qubes/ext/__pycache__/*
%{python_sitelib}/qubes/ext/pci.py* %{python3_sitelib}/qubes/ext/__init__.py
%{python_sitelib}/qubes/ext/qubesmanager.py* %{python3_sitelib}/qubes/ext/gui.py
%{python_sitelib}/qubes/ext/r3compatibility.py* %{python3_sitelib}/qubes/ext/pci.py
%{python3_sitelib}/qubes/ext/qubesmanager.py
%{python3_sitelib}/qubes/ext/r3compatibility.py
%dir %{python_sitelib}/qubes/tests %dir %{python3_sitelib}/qubes/tests
%{python_sitelib}/qubes/tests/__init__.py* %dir %{python3_sitelib}/qubes/tests/__pycache__
%{python_sitelib}/qubes/tests/run.py* %{python3_sitelib}/qubes/tests/__pycache__/*
%{python_sitelib}/qubes/tests/extra.py* %{python3_sitelib}/qubes/tests/__init__.py
%{python3_sitelib}/qubes/tests/run.py
%{python3_sitelib}/qubes/tests/extra.py
%{python_sitelib}/qubes/tests/app.py* %{python3_sitelib}/qubes/tests/app.py
%{python_sitelib}/qubes/tests/devices.py* %{python3_sitelib}/qubes/tests/devices.py
%{python_sitelib}/qubes/tests/events.py* %{python3_sitelib}/qubes/tests/events.py
%{python_sitelib}/qubes/tests/firewall.py* %{python3_sitelib}/qubes/tests/firewall.py
%{python_sitelib}/qubes/tests/init.py* %{python3_sitelib}/qubes/tests/init.py
%{python_sitelib}/qubes/tests/storage.py* %{python3_sitelib}/qubes/tests/storage.py
%{python_sitelib}/qubes/tests/storage_file.py* %{python3_sitelib}/qubes/tests/storage_file.py
%{python_sitelib}/qubes/tests/storage_lvm.py* %{python3_sitelib}/qubes/tests/storage_lvm.py
%{python_sitelib}/qubes/tests/tarwriter.py* %{python3_sitelib}/qubes/tests/tarwriter.py
%dir %{python_sitelib}/qubes/tests/vm %dir %{python3_sitelib}/qubes/tests/vm
%{python_sitelib}/qubes/tests/vm/__init__.py* %dir %{python3_sitelib}/qubes/tests/vm/__pycache__
%{python_sitelib}/qubes/tests/vm/init.py* %{python3_sitelib}/qubes/tests/vm/__pycache__/*
%{python_sitelib}/qubes/tests/vm/adminvm.py* %{python3_sitelib}/qubes/tests/vm/__init__.py
%{python_sitelib}/qubes/tests/vm/qubesvm.py* %{python3_sitelib}/qubes/tests/vm/init.py
%{python3_sitelib}/qubes/tests/vm/adminvm.py
%{python3_sitelib}/qubes/tests/vm/qubesvm.py
%dir %{python_sitelib}/qubes/tests/vm/mix %dir %{python3_sitelib}/qubes/tests/vm/mix
%{python_sitelib}/qubes/tests/vm/mix/__init__.py* %dir %{python3_sitelib}/qubes/tests/vm/mix/__pycache__
%{python_sitelib}/qubes/tests/vm/mix/net.py* %{python3_sitelib}/qubes/tests/vm/mix/__pycache__/*
%{python3_sitelib}/qubes/tests/vm/mix/__init__.py
%{python3_sitelib}/qubes/tests/vm/mix/net.py
%dir %{python_sitelib}/qubes/tests/tools %dir %{python3_sitelib}/qubes/tests/tools
%{python_sitelib}/qubes/tests/tools/__init__.py* %dir %{python3_sitelib}/qubes/tests/tools/__pycache__
%{python_sitelib}/qubes/tests/tools/init.py* %{python3_sitelib}/qubes/tests/tools/__pycache__/*
%{python_sitelib}/qubes/tests/tools/qvm_device.py* %{python3_sitelib}/qubes/tests/tools/__init__.py
%{python_sitelib}/qubes/tests/tools/qvm_firewall.py* %{python3_sitelib}/qubes/tests/tools/init.py
%{python_sitelib}/qubes/tests/tools/qvm_ls.py* %{python3_sitelib}/qubes/tests/tools/qvm_device.py
%{python3_sitelib}/qubes/tests/tools/qvm_firewall.py
%{python3_sitelib}/qubes/tests/tools/qvm_ls.py
%dir %{python_sitelib}/qubes/tests/int %dir %{python3_sitelib}/qubes/tests/integ
%{python_sitelib}/qubes/tests/int/__init__.py* %dir %{python3_sitelib}/qubes/tests/integ/__pycache__
%{python_sitelib}/qubes/tests/int/backup.py* %{python3_sitelib}/qubes/tests/integ/__pycache__/*
%{python_sitelib}/qubes/tests/int/backupcompatibility.py* %{python3_sitelib}/qubes/tests/integ/__init__.py
%{python_sitelib}/qubes/tests/int/basic.py* %{python3_sitelib}/qubes/tests/integ/backup.py
%{python_sitelib}/qubes/tests/int/devices_pci.py* %{python3_sitelib}/qubes/tests/integ/backupcompatibility.py
%{python_sitelib}/qubes/tests/int/dispvm.py* %{python3_sitelib}/qubes/tests/integ/basic.py
%{python_sitelib}/qubes/tests/int/dom0_update.py* %{python3_sitelib}/qubes/tests/integ/devices_pci.py
%{python_sitelib}/qubes/tests/int/network.py* %{python3_sitelib}/qubes/tests/integ/dispvm.py
%{python_sitelib}/qubes/tests/int/storage.py* %{python3_sitelib}/qubes/tests/integ/dom0_update.py
%{python_sitelib}/qubes/tests/int/vm_qrexec_gui.py* %{python3_sitelib}/qubes/tests/integ/network.py
%{python3_sitelib}/qubes/tests/integ/storage.py
%{python3_sitelib}/qubes/tests/integ/vm_qrexec_gui.py
%dir %{python_sitelib}/qubes/tests/int/tools %dir %{python3_sitelib}/qubes/tests/integ/tools
%{python_sitelib}/qubes/tests/int/tools/__init__.py* %dir %{python3_sitelib}/qubes/tests/integ/tools/__pycache__
%{python_sitelib}/qubes/tests/int/tools/qubes_create.py* %{python3_sitelib}/qubes/tests/integ/tools/__pycache__/*
%{python_sitelib}/qubes/tests/int/tools/qvm_firewall.py* %{python3_sitelib}/qubes/tests/integ/tools/__init__.py
%{python_sitelib}/qubes/tests/int/tools/qvm_check.py* %{python3_sitelib}/qubes/tests/integ/tools/qubes_create.py
%{python_sitelib}/qubes/tests/int/tools/qvm_prefs.py* %{python3_sitelib}/qubes/tests/integ/tools/qvm_firewall.py
%{python_sitelib}/qubes/tests/int/tools/qvm_run.py* %{python3_sitelib}/qubes/tests/integ/tools/qvm_check.py
%{python3_sitelib}/qubes/tests/integ/tools/qvm_prefs.py
%{python3_sitelib}/qubes/tests/integ/tools/qvm_run.py
%dir %{python_sitelib}/qubes/qmemman %dir %{python3_sitelib}/qubes/qmemman
%{python_sitelib}/qubes/qmemman/__init__.py* %dir %{python3_sitelib}/qubes/qmemman/__pycache__
%{python_sitelib}/qubes/qmemman/algo.py* %{python3_sitelib}/qubes/qmemman/__pycache__/*
%{python_sitelib}/qubes/qmemman/client.py* %{python3_sitelib}/qubes/qmemman/__init__.py
%{python3_sitelib}/qubes/qmemman/algo.py
%{python3_sitelib}/qubes/qmemman/client.py
/usr/lib/qubes/unbind-pci-device.sh /usr/lib/qubes/unbind-pci-device.sh
/usr/lib/qubes/cleanup-dispvms /usr/lib/qubes/cleanup-dispvms

View File

@ -1,4 +1,4 @@
#!/usr/bin/python2 -O #!/usr/bin/python3 -O
# vim: fileencoding=utf-8 # vim: fileencoding=utf-8
import os import os