diff --git a/sysutils/iocage/Makefile b/sysutils/iocage/Makefile index f030606eb112..c063aaf3d654 100644 --- a/sysutils/iocage/Makefile +++ b/sysutils/iocage/Makefile @@ -1,53 +1,55 @@ PORTNAME= iocage -PORTVERSION= 1.12 -PORTREVISION= 1 +PORTVERSION= 1.13 CATEGORIES= sysutils python +MASTER_SITES= https://github.com/freebsd/iocage/releases/download/${DISTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= grembo@FreeBSD.org COMMENT= FreeBSD jail manager written in Python3 WWW= https://github.com/freebsd/iocage LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}netifaces>0:net/py-netifaces@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}click>=6.7:devel/py-click@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}six>=1.15.0:devel/py-six@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}coloredlogs>0:devel/py-coloredlogs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}texttable>=0.8.7:textproc/py-texttable@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=2.11.1:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dnspython>0:dns/py-dnspython@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}gitpython>0:devel/py-gitpython@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jsonschema>0:devel/py-jsonschema@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libzfs>=1.0.2:filesystems/py-libzfs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} USES= python -USE_GITHUB= yes -GH_ACCOUNT= freebsd USE_PYTHON= autoplist pep517 CONFLICTS= py*[0-9]-iocage py*-iocage-devel +EXTRACT_AFTER_ARGS= -C ${WRKSRC} NO_ARCH= yes OPTIONS_DEFAULT= GIT OPTIONS_RADIO= GIT_PACKAGE OPTIONS_RADIO_GIT_PACKAGE= GIT GIT_LITE GIT_DESC= depend on devel/git GIT_LITE_DESC= depend on lite flavor of devel/git (bare minimum git experience) GIT_RUN_DEPENDS=git:devel/git GIT_LITE_RUN_DEPENDS=git:devel/git@lite +pre-extract: + @${MKDIR} ${WRKSRC} + post-patch: @${RM} ${WRKSRC}/setup.py do-test: @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest .include diff --git a/sysutils/iocage/distinfo b/sysutils/iocage/distinfo index dab2179ac28d..4313a0d75ac6 100644 --- a/sysutils/iocage/distinfo +++ b/sysutils/iocage/distinfo @@ -1,7 +1,3 @@ -TIMESTAMP = 1765718091 -SHA256 (freebsd-iocage-1.12_GH0.tar.gz) = 8c09cb6287eb0677a38f5c52289c530cb75a348b303a68371aba0b12a5bb05ed -SIZE (freebsd-iocage-1.12_GH0.tar.gz) = 797861 -SHA256 (2120a86d1d4fd3d383a3f0bddfc1e92eb5a7d2e7.patch) = 212d63a093d9831c29398e18e567ea63050b116f737be82f2fe2384c670b5981 -SIZE (2120a86d1d4fd3d383a3f0bddfc1e92eb5a7d2e7.patch) = 891 -SHA256 (13c342c37746bffa944b5c397d51ef39cd2eb172.patch) = ec4dac293a832a37fd81402897a41135811d29926e3d5782e3dbd317cd4df217 -SIZE (13c342c37746bffa944b5c397d51ef39cd2eb172.patch) = 926 +TIMESTAMP = 1781876405 +SHA256 (iocage-1.13.tar.gz) = 7000c89629c76c62b6846bd2ad336b7330a133edc9ddeca3b92839e205019ece +SIZE (iocage-1.13.tar.gz) = 786673 diff --git a/sysutils/iocage/files/patch-iocage__cli_df.py b/sysutils/iocage/files/patch-iocage__cli_df.py deleted file mode 100644 index f0146e39f985..000000000000 --- a/sysutils/iocage/files/patch-iocage__cli_df.py +++ /dev/null @@ -1,22 +0,0 @@ ---- iocage_cli/df.py.orig 2025-12-12 22:04:57 UTC -+++ iocage_cli/df.py -@@ -35,8 +35,8 @@ import texttable - "-h", - "-H", - is_flag=True, -- default=True, -- help="For scripting, use tabs for separators.") -+ default=not ioc.CLICK_WORKAROUND, -+ help="For scripting, no headers and tabs as separators.") - @click.option( - "--long", - "-l", -@@ -53,6 +53,8 @@ def cli(header, _long, _sort): - help="Sorts the list by the given type") - def cli(header, _long, _sort): - """Allows a user to show resource usage of all jails.""" -+ if ioc.CLICK_WORKAROUND: -+ header = not header - table = texttable.Texttable(max_width=0) - jail_list = ioc.IOCage().df() - diff --git a/sysutils/iocage/files/patch-iocage__cli_fstab.py b/sysutils/iocage/files/patch-iocage__cli_fstab.py deleted file mode 100644 index 8ef8c9d9f460..000000000000 --- a/sysutils/iocage/files/patch-iocage__cli_fstab.py +++ /dev/null @@ -1,20 +0,0 @@ ---- iocage_cli/fstab.py.orig 2026-06-08 13:53:38 UTC -+++ iocage_cli/fstab.py -@@ -45,13 +45,15 @@ __rootcmd__ = True - help="Replace an entry by index number", nargs=1) - @click.option("--list", "-l", "action", - help="Lists the jails fstab.", flag_value="list") --@click.option("--header", "-h", "-H", is_flag=True, default=True, -- help="For scripting, use tabs for separators.") -+@click.option("--header", "-h", "-H", is_flag=True, default=not ioc.CLICK_WORKAROUND, -+ help="For scripting, no headers and tabs as separators.") - def cli(action, fstab_string, jail, header, replace): - """ - Looks for the jail supplied and passes the uuid, path and configuration - location to manipulate the fstab. - """ -+ if ioc.CLICK_WORKAROUND: -+ header = not header - index = None if not replace else replace - _index = False - add_path = False diff --git a/sysutils/iocage/files/patch-iocage__cli_get.py b/sysutils/iocage/files/patch-iocage__cli_get.py deleted file mode 100644 index 28a03a157ff4..000000000000 --- a/sysutils/iocage/files/patch-iocage__cli_get.py +++ /dev/null @@ -1,22 +0,0 @@ ---- iocage_cli/get.py.orig 2026-06-08 13:53:44 UTC -+++ iocage_cli/get.py -@@ -33,8 +33,8 @@ import iocage_lib.iocage as ioc - max_content_width=400, ), name='get', help='Gets the specified property.') - @click.argument('prop', required=True, default='') - @click.argument('jail', required=True, default='') --@click.option('--header', '-h', '-H', is_flag=True, default=True, -- help='For scripting, use tabs for separators.') -+@click.option('--header', '-h', '-H', is_flag=True, default=not ioc.CLICK_WORKAROUND, -+ help='For scripting, no headers and tabs as separators.') - @click.option('--recursive', '-r', help='Get the specified property for all ' - 'jails.', flag_value='recursive') - @click.option('--plugin', '-P', -@@ -58,6 +58,8 @@ def cli(prop, _type, _pool, jail, recursive, header, p - ) - def cli(prop, _type, _pool, jail, recursive, header, plugin, force): - """Get a list of jails and print the property.""" -+ if ioc.CLICK_WORKAROUND: -+ header = not header - table = texttable.Texttable(max_width=0) - - if _type: diff --git a/sysutils/iocage/files/patch-iocage__cli_list.py b/sysutils/iocage/files/patch-iocage__cli_list.py deleted file mode 100644 index 4733b9f7d7d2..000000000000 --- a/sysutils/iocage/files/patch-iocage__cli_list.py +++ /dev/null @@ -1,41 +0,0 @@ ---- iocage_cli/list.py.orig 2025-12-12 22:04:57 UTC -+++ iocage_cli/list.py -@@ -26,7 +26,6 @@ import iocage_lib.iocage as ioc - import iocage_lib.ioc_common as ioc_common - import iocage_lib.iocage as ioc - -- - @click.command( - name="list", - help="List a specified dataset type, by default lists all jails.") -@@ -36,15 +35,15 @@ import iocage_lib.iocage as ioc - flag_value="basejail", help="List all basejails.") - @click.option("--template", "-t", "dataset_type", flag_value="template", - help="List all templates.") --@click.option("--header", "-h", "-H", is_flag=True, default=True, -- help="For scripting, use tabs for separators.") -+@click.option("--header", "-h", "-H", is_flag=True, default=not ioc.CLICK_WORKAROUND, -+ help="For scripting, no headers and tabs as separators.") - @click.option("--long", "-l", "_long", is_flag=True, default=False, - help="Show the full uuid and ip4 address.") - @click.option("--remote", "-R", is_flag=True, - help="Show remote's available RELEASEs.") - @click.option("--plugins", "-P", is_flag=True, help="Show available plugins.") --@click.option("--http", default=True, help="Have --remote use HTTP instead.", -- is_flag=True) -+@click.option("--http", is_flag=True, default=not ioc.CLICK_WORKAROUND, -+ help="Have --remote not use HTTP.") - @click.option("--sort", "-s", "_sort", default="name", nargs=1, - help="Sorts the list by the given type") - @click.option("--quick", "-q", is_flag=True, default=False, -@@ -54,6 +53,10 @@ def cli(dataset_type, header, _long, remote, http, plu - def cli(dataset_type, header, _long, remote, http, plugins, _sort, quick, - official): - """This passes the arg and calls the jail_datasets function.""" -+ -+ if ioc.CLICK_WORKAROUND: -+ header = not header -+ http = not http - freebsd_version = ioc_common.checkoutput(["freebsd-version"]) - iocage = ioc.IOCage(skip_jails=True) - diff --git a/sysutils/iocage/files/patch-iocage__cli_snaplist.py b/sysutils/iocage/files/patch-iocage__cli_snaplist.py deleted file mode 100644 index 6621cd997d44..000000000000 --- a/sysutils/iocage/files/patch-iocage__cli_snaplist.py +++ /dev/null @@ -1,23 +0,0 @@ ---- iocage_cli/snaplist.py.orig 2025-12-12 22:04:57 UTC -+++ iocage_cli/snaplist.py -@@ -30,8 +30,8 @@ import iocage_lib.iocage as ioc - - - @click.command(name="snaplist", help="Show snapshots of a specified jail.") --@click.option("--header", "-h", "-H", is_flag=True, default=True, -- help="For scripting, use tabs for separators.") -+@click.option("--header", "-h", "-H", is_flag=True, default=not ioc.CLICK_WORKAROUND, -+ help="For scripting, no headers and tabs as separators.") - @click.option("--long", "-l", "_long", is_flag=True, default=False, - help="Show the full dataset path for snapshot name.") - @click.option("--sort", "-s", "_sort", default="created", nargs=1, -@@ -39,6 +39,9 @@ def cli(header, jail, _long, _sort): - @click.argument("jail") - def cli(header, jail, _long, _sort): - """Allows a user to show resource usage of all jails.""" -+ -+ if ioc.CLICK_WORKAROUND: -+ header = not header - table = texttable.Texttable(max_width=0) - snap_list = ioc.IOCage(jail=jail).snap_list(_long, _sort) - diff --git a/sysutils/iocage/files/patch-iocage__lib_iocage.py b/sysutils/iocage/files/patch-iocage__lib_iocage.py deleted file mode 100644 index 2055674c846b..000000000000 --- a/sysutils/iocage/files/patch-iocage__lib_iocage.py +++ /dev/null @@ -1,16 +0,0 @@ ---- iocage_lib/iocage.py.orig 2026-06-08 13:53:06 UTC -+++ iocage_lib/iocage.py -@@ -53,6 +53,13 @@ from iocage_lib.snapshot import SnapshotListableResour - from iocage_lib.snapshot import SnapshotListableResource, Snapshot - - -+# Workaround for click bugs and incompatible changes introduced -+# in 8.2.x. Once we can upgrade to click 8.4.1, this and all -+# its consumers can be removed, but places using the workaround -+# need to be changed to use flag_value=False instead of -+# is_flag=True (and change default to True). -+CLICK_WORKAROUND=True -+ - class PoolAndDataset: - - def get_pool(self): diff --git a/sysutils/iocage/files/patch-pyproject.toml b/sysutils/iocage/files/patch-pyproject.toml deleted file mode 100644 index 6611054605aa..000000000000 --- a/sysutils/iocage/files/patch-pyproject.toml +++ /dev/null @@ -1,65 +0,0 @@ ---- pyproject.toml.orig 2026-06-07 07:14:53 UTC -+++ pyproject.toml -@@ -0,0 +1,62 @@ -+[project] -+name = "iocage" -+version = "1.12" -+description = "A jail manager that uses ZFS." -+authors = [ -+ {name = "iocage Contributors",email = "ports@FreeBSD.org"}, -+] -+keywords = ["freebsd", "jail", "jail manager", "zfs"] -+classifiers = [ -+ "Environment :: Console", -+ "Intended Audience :: System Administrators", -+ "Operating System :: POSIX :: BSD :: FreeBSD", -+ "Programming Language :: Python", -+ "Programming Language :: Python :: 3", -+ "Programming Language :: Python :: 3.9", -+ "Programming Language :: Python :: 3.10", -+ "Programming Language :: Python :: 3.11", -+ "Programming Language :: Python :: 3.12", -+ "Programming Language :: Python :: 3.13", -+ "Programming Language :: Python :: 3.14" -+] -+requires-python = ">=3.9" -+readme = "README.md" -+license = "BSD-2-Clause" -+license-files = ["LICENSE"] -+ -+dependencies = [ -+ "setuptools>=82.0.1", -+ "click>=6.7", -+ "coloredlogs>=9.0", -+ "requests>=2.18.4", -+ "texttable>=1.2.1", -+] -+ -+[project.urls] -+Homepage = "https://github.com/freebsd/iocage" -+ -+[project.scripts] -+iocage = "iocage_cli:cli" -+ -+[build-system] -+requires = ["hatchling"] -+build-backend = "hatchling.build" -+ -+[tool.hatch.build.targets.wheel] -+packages = ["iocage_cli", "iocage_lib"] -+exclude = ["*.orig"] -+ -+[tool.hatch.build.targets.wheel.shared-data] -+"rc.d/iocage" = "etc/rc.d/iocage" -+"iocage.8" = "share/man/man8/iocage.8" -+"zsh-completion/_iocage" = "share/zsh/site-functions/_iocage" -+ -+[tool.hatch.build.targets.sdist] -+include = [ -+ "iocage_cli/*.py", -+ "iocage_lib/*.py", -+ "pyproject.toml", -+ "README.md", -+ "LICENSE" -+] -+exclude = ["*.orig"] diff --git a/sysutils/iocage/files/patch-rc.d_iocage b/sysutils/iocage/files/patch-rc.d_iocage deleted file mode 100644 index 593e7365ad9b..000000000000 --- a/sysutils/iocage/files/patch-rc.d_iocage +++ /dev/null @@ -1,19 +0,0 @@ ---- rc.d/iocage.orig 2026-06-07 06:57:45 UTC -+++ rc.d/iocage -@@ -1,7 +1,4 @@ - #!/bin/sh --# --# $FreeBSD$ --# - - # PROVIDE: iocage - # REQUIRE: LOGIN cleanvar sshd zfs -@@ -22,7 +19,7 @@ load_rc_config "$name" - # read configuration and set defaults - load_rc_config "$name" - : ${iocage_enable="NO"} --: ${iocage_lang="en_US.UTF-8"} -+: ${iocage_lang="C.UTF-8"} - - start_cmd="iocage_start" - stop_cmd="iocage_stop"