Merge remote-tracking branch 'origin/pr/344'

* origin/pr/344:
  travis: pip -> pip3
  Update .travis.yml
  Drop initial root thin pool definition
  Prevent double hyphens in thin_pool parsing
  Rename default root thin pool from 'lvm' to 'root'
This commit is contained in:
Marek Marczykowski-Górecki 2020-05-24 02:19:37 +02:00
commit 64edbdf7d3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 11 additions and 27 deletions

View File

@ -1,36 +1,26 @@
sudo: required
dist: bionic
language: python
import:
- source: QubesOS/qubes-continuous-integration:R4.1/travis-base-r4.1.yml
mode: deep_merge_prepend
- source: QubesOS/qubes-continuous-integration:R4.1/travis-dom0-r4.1.yml
python:
- '3.6'
language: python
virtualenv:
system_site_packages: true
services:
- xvfb
install:
- sudo apt-get -y install python3-gi gir1.2-gtk-3.0
- pip install --quiet -r ci/requirements.txt
- pip3 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-core-qrexec ~/qubes-core-qrexec
script:
- PYTHONPATH=test-packages:~/qubes-core-qrexec pylint qubes
- PYTHONPATH=test-packages:~/qubes-core-qrexec ./run-tests
- ~/qubes-builder/scripts/travis-build
env:
- DIST_DOM0=fc31 USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1
after_success:
- codecov -F unittests
- ~/qubes-builder/scripts/travis-deploy
# don't build tags which are meant for code signing only
branches:
except:
- /.*_.*/
addons:
apt:
packages:
- debootstrap
# vim: ts=2 sts=2 sw=2 et

View File

@ -1197,17 +1197,6 @@ class Qubes(qubes.PropertyHolder):
pool_configs = copy.deepcopy(qubes.config.defaults['pool_configs'])
root_volume_group, root_thin_pool = \
qubes.storage.DirectoryThinPool.thin_pool('/')
if root_thin_pool:
lvm_config = {
'name': 'lvm',
'driver': 'lvm_thin',
'volume_group': root_volume_group,
'thin_pool': root_thin_pool
}
pool_configs[lvm_config['name']] = lvm_config
for name, config in pool_configs.items():
if 'driver' not in config and 'dir_path' in config:
config['driver'] = 'file'

View File

@ -932,8 +932,13 @@ class DirectoryThinPool:
.format(thin_pool_devnum), "r") as thin_pool_tpool_f:
thin_pool_tpool = thin_pool_tpool_f.read().rstrip('\n')
if thin_pool_tpool.endswith("-tpool"):
# LVM replaces '-' by '--' if name contains
# a hyphen
thin_pool_tpool = thin_pool_tpool.replace('--', '=')
volume_group, thin_pool, _tpool = \
thin_pool_tpool.rsplit("-", 2)
volume_group = volume_group.replace('=', '-')
thin_pool = thin_pool.replace('=', '-')
cls._thin_pool[dir_path] = volume_group, thin_pool
except: # pylint: disable=bare-except
pass