From 71159bfca296049b4e3d40842f0cd94620569f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Tue, 12 May 2020 17:32:07 +0200 Subject: [PATCH 1/5] Rename default root thin pool from 'lvm' to 'root' New partition output split dom0 and VM thin pools https://github.com/QubesOS/qubes-anaconda-addon/pull/7 QubesOS/qubes-issues#5763 --- qubes/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/app.py b/qubes/app.py index afff320d..b302d085 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -1201,7 +1201,7 @@ class Qubes(qubes.PropertyHolder): qubes.storage.DirectoryThinPool.thin_pool('/') if root_thin_pool: lvm_config = { - 'name': 'lvm', + 'name': 'root', 'driver': 'lvm_thin', 'volume_group': root_volume_group, 'thin_pool': root_thin_pool From e4d7df4976a119500372745534adf666143979ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Fri, 15 May 2020 15:15:37 +0200 Subject: [PATCH 2/5] Prevent double hyphens in thin_pool parsing --- qubes/storage/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index 532b7926..959122b6 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -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 From f06f41d594910af8722ade8b0c24e2257e8d7255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Mon, 18 May 2020 13:01:42 +0200 Subject: [PATCH 3/5] Drop initial root thin pool definition See https://github.com/QubesOS/qubes-core-admin/pull/344#issuecomment-629626978 --- qubes/app.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/qubes/app.py b/qubes/app.py index b302d085..ac834bfa 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -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': 'root', - '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' From 30900125d3e0bac6f57be6d58d9b16017e4332ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Sun, 17 May 2020 10:02:00 +0200 Subject: [PATCH 4/5] Update .travis.yml --- .travis.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index a280033e..ffdfe5da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ -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' virtualenv: @@ -15,22 +16,10 @@ install: 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 From bd837c49ec61253b60b3f4257524f4d864ab8d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Mon, 18 May 2020 14:17:45 +0200 Subject: [PATCH 5/5] travis: pip -> pip3 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ffdfe5da..2e11ea15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,14 @@ import: - 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: