Skip to content

chore(packaging): address lintian warnings#160

Open
alexsander-souza wants to merge 19 commits intocanonical:resolute_supportfrom
alexsander-souza:fix_lintian_issues
Open

chore(packaging): address lintian warnings#160
alexsander-souza wants to merge 19 commits intocanonical:resolute_supportfrom
alexsander-souza:fix_lintian_issues

Conversation

@alexsander-souza
Copy link
Copy Markdown
Contributor

No description provided.

Declare Ubuntu Resolute as the release target and bring the snap build
into line with core26 conventions, where /bin is a symlink to /usr/bin.

- debian/changelog: set distribution to resolute
- snapcraft.yaml: base core24 → core26, add build-base: devel, grade
stable → devel
- Replace venv-based install with pip install --prefix=.../usr to avoid
/bin symlink conflicts; remove venv artefact stage filters (activate*,
pyvenv.cfg)
- Move all snap app commands and wrapper scripts from bin/ to usr/bin/
- Add organize mappings usr/local/bin/* → usr/bin/ and
usr/local/lib/python3.14/* → usr/lib/python3.14/ for the pip-prefix
layout
- Pebble part: add organize bin → usr/sbin
- maas-agent, maas-openfga parts: drop per-binary organize blocks, use
prime: [usr/sbin/]; update Makefile install targets to match
- Remove separate maas-netmon snap part; its artefact is now captured by
the maas-agent part's prime: [usr/sbin/]
Fix Makefile and snap build targets that break under the Resolute build
environment due to the core26 layout change, updated Rust cryptography
bindings, and renamed tooling packages.

- Makefile: fix venv pip install flags (--upgrade --force-reinstall) and
  bin symlink target (../$(VENV)/bin/$(notdir $@))
- Makefile: fix lint-shell target path snap/local/tree/bin/* →
  snap/local/tree/usr/bin/* (follows PR-01 tree reorganisation)
- Makefile: fix snap-tree-sync target path site-packages →
  usr/lib/python3.*/dist-packages
- Makefile, tox.ini: add fix-py target and ruff-fix tox env for ruff
  auto-fix support
- tox.ini: bump pyproject-fmt to 2.18, tox-ini-fmt to 1.7; drop
  setup-cfg-fmt (no longer needed)
- snapcraft.yaml: add cargo and libssl-dev build packages (required by
  cryptography >= 43 Rust extension for XOFHash support)
- snapcraft.yaml: add python3-referencing stage package
- snapcraft.yaml: exclude usr/bin/maas-sampledata from staged binaries
Bump the Go toolchain version across all three Go modules and fix code
quality issues flagged by the updated linter configuration.

- src/maasagent/go.mod, src/maasopenfga/go.mod, src/host-info/go.mod: go
1.24.4 / 1.18 → go 1.26 to match Resolute toolchain
- src/maasagent/Makefile: add -lxxhash to LDFLAGS (required by go-dqlite
v2 on Resolute)
- httpproxy/proxy.go: remove deprecated revproxy.Director = nil; Rewrite
and Director are mutually exclusive in newer httputil — setting Director
to nil alongside Rewrite is a staticcheck SA1019 violation and was
removed
- httpproxy/service.go: add blank line between append and Unlock to
satisfy wsl_v5 linter
Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

- pyproject.toml: requires-python >=3.14; drop 3.9/3.10/3.11
classifiers,
add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis
6.151,
  fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
  pytest-cov 7; add test.* script entry points; reformat toml structure
- debian/control: X-Python3-Version >=3.14; django constraint 2:2.2 →
3:5.0;
  add python3-pydantic (>= 2.0)
- required-packages/base, snapcraft.yaml: add python3-pydantic
- settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = False (Django 6.0
  forward-compatibility; the default changes in Django 6.0)
- event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
- node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
  (Django 5.0 hard API break)
- domain.py, space.py, filesystemgroup.py: add early pk-is-None guards
on
  related-manager accessors (Django 5.0 raises ValueError for unsaved
  instances where Django 4.x silently returned empty results)
- maastesting/__init__.py: guard copy._copy_dispatch access removed in
  Python 3.14; add __copy__/__deepcopy__  on sentinel type
- utilities/check-imports: str(Path(...)) for sys.path.insert
compatibility
…ks (canonical#80)

Remove all returnValue(x) calls inside @inlineCallbacks functions.
returnValue was a Python 2 generator workaround and produces
DeprecationWarnings under Python 3.

Also removes dead bare `return` statements that followed returnValue()
calls (a static-analyser workaround no longer needed with plain return),
and fixes a broken mock in test_pods.py where returnValue() was used as
a mock return value instead of succeed(), causing the test to exit early
before its assertions ran.
Migrate all JWT operations from the unmaintained python-jose library to joserfc. A new shared utility `maascommon.utils.jwt.decode_unverified_jwt` consolidates unverified JWT extraction across the three call sites (msm command, msm service, and auth middleware). Verified JWT encode/decode in the service layer is updated to use joserfc's native API with explicit claims validation.
…onical#100)

- files.py: replace Optional[str]/Union[str, None] with str | None and
drop the now-unused Optional and Union imports
- config_forms.py: pass strict=False in DictCharField.compress() where
the length mismatch is intentional (skip_check adds SKIP_CHECK_NAME to
self.names but not to the data list); pass strict=True in
DictCharWidget.__init__() where names and widgets must always align
…canonical#99)

Fix production bugs in the network and DNS subsystems surfaced by the
updated netaddr library and Python runtime.

- dns/config.py: fix indentation bug in DynamicDNSUpdate.from_record
that caused incorrect record types for some IPv6 entries
- iprange.py: wrap IPRange validation in try/except TypeError to handle
non-IP inputs gracefully
…hon 3.14 (canonical#81)

Address runtime warnings and errors surfaced by the Python 3.14 and dependency upgrades.

- asyncio.iscoroutinefunction removed in 3.12 -> inspect.iscoroutinefunction
- re.split positional maxsplit -> keyword argument maxsplit=1
- zip() calls without strict -> zip(..., strict=False)
- maasapiserver/tls.py: sync with uvicorn 0.38 lifespan API; replace _get_upgrade()/_should_upgrade_to_ws() with _should_upgrade(); add MUST_CLOSE guard to EndOfMessage handler
- provisioningserver/logger/_twisted.py: extend __module__ check to accept _py_warnings for CPython 3.14
- maas_api_helper.py: wrap HTTPResponse in contextlib.closing to fix resource leak
…anonical#98)

Fix test failures introduced by the dependency version bumps. No
production code changes.

- pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in
maastesting
- hypothesis 6.151: replace timing-sensitive Hypothesis tests with
deterministic equivalents; reduce max_examples in parallel tests
- httpx 0.28: wrap app in ASGITransport; move cookie setup to client
instance (AsyncClient(app=...) constructor deprecated)
- testtools 2.8: add assertCountEqual shim to MAASTestCase
- TLS test fixtures: regenerate certificates with subjectAltName
extension required by modern SSL contexts; update
data_test_main/generate.sh
- libuuid: disable affected test cases with upstream bug reference
Use strict=True where both iterables must have the same length, so a mismatch raises ValueError immediately instead of silently truncating. Use strict=False where one iterable is intentionally infinite (count, cycle, repeat) or lengths may legitimately differ.
…l#112)

fix(provisioningserver): add missing `urls` parameter to
`_build_rpc_info_urls`
fix(provisioningserver): skip IPv4 multicast group join on IPv6
interfaces
fix(metadataserver): use `closing()` context manager to prevent HTTP
connection
  leaks in `maas_run_remote_scripts` and `maas_run_scripts`
refactor(maastemporalworker): drop custom Pydantic v1 payload converter
in
  favour of `temporalio.contrib.pydantic.pydantic_data_converter`
test(maasserver): initialize service layer outside transactional block
in
  concurrent IP allocation test
test(maasserver): fix websockets Transfer-Encoding response header
assertion
test(provisioningserver): update xpath error message assertions to
include
  namespace prefix
test: fix `IPNetwork` calls to use explicit addresses and
`expand_partial=True`
  for netaddr v1 compatibility
…canonical#82)

Replace all Pydantic v1 APIs with their v2 equivalents across maasservicelayer, maasapiserver, and maastemporalworker. Key changes include replacing GenericModel with BaseModel+Generic, validator with field_validator/model_validator, dict()/parse_obj() with model_dump()/model_validate(), and Config inner class with ConfigDict. Modernise the builder code generator (generate_builders.py) to use Pydantic v2 model_fields/FieldInfo API and AST-based parsing for import preservation.
…anonical#123)

Update obsolete version constraints to align with current Ubuntu
Resolute standards and prevent missing critical upstream
security/feature updates:

- bind9: 1:9.10.3 (2014) → 1:9.18 (security and protocol improvements)
- postgresql: 12 → 16 (align with documentation requirements)
- isc-dhcp-server: 4.3.3 (2015) → 4.4.3-P1-1 (security patches and
fixes)
- squid: >> 3.5 → >= 4.0 (standardize operator, current versions)

Also fixes apt compatibility by replacing non-standard >> operator with
>=.
…canonical#158)

Django 6.0 will change the default URL scheme from 'http' to 'https'.
Explicitly set assume_scheme='http' for URLField declarations to silence
RemovedInDjango60Warning and maintain current behavior.
Corrects the source paths for maas-agent, maas-netmon, and OpenFGA
binaries in their respective .install files from bin/ to usr/sbin/,
matching the actual build output locations.
@alexsander-souza alexsander-souza marked this pull request as ready for review April 16, 2026 16:52
@alexsander-souza alexsander-souza force-pushed the resolute_support branch 2 times, most recently from db69e5e to 2e591c4 Compare April 17, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant