Skip to content

Commit

Permalink
Merge branch 'master' into loopback-ip-PR
Browse files Browse the repository at this point in the history
  • Loading branch information
dgeo authored Nov 26, 2024
2 parents 5016ebf + 8f580fa commit 36183af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion iocage_lib/ioc_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
from iocage_lib.pools import Pool
from iocage_lib.dataset import Dataset

# deliberately crash if tarfile doesn't have required filter
tarfile.tar_filter


class IOCFetch:

Expand Down Expand Up @@ -817,7 +820,7 @@ def fetch_extract(self, f):
# removing them first.
member = self.__fetch_extract_remove__(f)
member = self.__fetch_check_members__(member)
f.extractall(dest, members=member)
f.extractall(dest, members=member, filter='tar')

def fetch_update(self, cli=False, uuid=None):
"""This calls 'freebsd-update' to update the fetched RELEASE."""
Expand Down
5 changes: 4 additions & 1 deletion iocage_lib/ioc_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
GIT_LOCK = threading.Lock()
RE_PLUGIN_VERSION = re.compile(r'"path":"([/\.\+,\d\w-]*)\.txz"')

# deliberately crash if tarfile doesn't have required filter
tarfile.tar_filter


class IOCPlugin(object):

Expand Down Expand Up @@ -157,7 +160,7 @@ def download_parse_packagesite(packagesite_url):
shutil.copyfileobj(r.raw, f)

with tarfile.open(packagesite_txz_path) as p_file:
p_file.extractall(path=tmpdir)
p_file.extractall(path=tmpdir, filter='data')

packagesite_path = os.path.join(tmpdir, 'packagesite.yaml')
if not os.path.exists(packagesite_path):
Expand Down
6 changes: 4 additions & 2 deletions tests/functional_tests/0004_start_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def test_02_start_rc_jail(invoke_cli, resource_selector):
for jail in resource_selector.rcjails:
assert jail.running is True, f'{jail.name} not running'


# Network-related tests belong here because the code is only executed at jail
# start time.

@require_root
@require_zpool
def test_03_create_and_start_nobridge_vnet_jail(release, jail, invoke_cli):
Expand Down Expand Up @@ -112,6 +112,8 @@ def test_03_create_and_start_nobridge_vnet_jail(release, jail, invoke_cli):
os.remove(path)


# TODO: Let's also start jails in a single command to test that out

@require_root
@require_zpool
def test_04_vnet_jail_with_loopback_alias(release, jail, invoke_cli):
Expand All @@ -134,4 +136,4 @@ def test_04_vnet_jail_with_loopback_alias(release, jail, invoke_cli):

invoke_cli([
'destroy', jail.name, '-f'
])
])

0 comments on commit 36183af

Please sign in to comment.