Commit graph jw-pkg/conf
Author SHA1 Message Date
be46a5ebcf pyrightconfig.json: Mirror strict mypy settings
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m6s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m9s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m0s
CI / Packaging test (push) Successful in 0s
Follow the changes in the mypy check profile by adding additional
checks.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 13:02:03 +00:00
9bbdcf5c39 pyproject.toml: Simplify mypy config using strict mode
Remove 8 redundant mypy settings that are already enabled by strict
mode: warn_redundant_casts, strict_equality, disallow_any_generics,
warn_unused_ignores, disallow_untyped_calls, warn_return_any,
disallow_incomplete_defs, disallow_untyped_defs.

Keep warn_unreachable explicitly since it's not part of strict mode.
Also remove the duplicate exhaustive-match entry from enable_error_code.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 13:02:03 +00:00
989b800906 pyproject.toml: Enable mypy.disallow_untyped_defs
Add disallow_untyped_defs = true to the mypy configuration. This
requires all function definitions to have complete type annotations
for both parameters and return types. Since disallow_incomplete_defs
was already satisfied (all functions have partial annotations), this
final rule validates that no function is left without any type hints.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 12:07:37 +00:00
88ba66c5b0 pyproject.toml: Enable mypy.disallow_incomplete_defs
Add disallow_incomplete_defs = true to the mypy configuration. This
requires all function definitions to have complete parameter and return
type annotations, catching partially-annotated function signatures.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 12:07:37 +00:00
bbb9a9b17e pyproject.toml: Enable mypy.warn_return_any
Add warn_return_any = true to the mypy configuration. This detects
functions that return Any from contexts where a specific return type
is declared, encouraging more precise type annotations.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 12:07:37 +00:00
b3fee32ee1 pyproject.toml: Enable mypy.disallow_untyped_calls
Add disallow_untyped_calls = true to the mypy configuration. This
requires all function calls from typed code to target typed functions,
ensuring better type safety across the codebase.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 11:36:52 +00:00
75c9879f67 pyproject.toml: Enable mypy.warn_unreachable
Add warn_unreachable = true to the mypy configuration. This detects
statements that mypy proves are unreachable, such as code after
an unconditional return or assertions that can never be true.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 11:35:16 +00:00
a1d192b048 pyproject.toml: Enable mypy.exhaustive-match
Add the exhaustive-match error code to the mypy configuration. This
requires all match statements to be exhaustive, handling all possible
values of the matched expression.

The fix is to add 'case _: pass' to each match statement that is
intended to be non-exhaustive, making the non-exhaustiveness explicit.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 11:33:39 +00:00
a3e46121da pyproject.toml: Enable mypy.truthy-iterable
Add the truthy-iterable error code to the mypy configuration. This
detects Iterable parameters that are used in boolean contexts (if not
names, etc.) since Iterable values are always truthy.

The fix is to change Iterable[str] parameters to Collection[str] when
they are tested for emptiness, since Collection guarantees __len__.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 11:32:03 +00:00
cbd6bac84c pyproject.toml: Enable mypy.warn_unused_ignores
Add warn_unused_ignores = true to the mypy configuration. This warns
when a '# type: ignore' comment has no associated error code,
ensuring all type ignores are explicit about which error they suppress.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-09 11:30:33 +00:00
64edcec48c
pyproject.toml: Enable mypy.disallow_any_generics
Add disallow_any_generics = true to the mypy configuration. This
requires all generic types (dict, list, Iterable, Types, etc.) to
have explicit type arguments instead of using bare generic aliases.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-07 18:02:27 +02:00
7f1809d6d1
pyproject.toml: Enable mypy.strict_equality
Set mypy.strict_equality = true, forcing type-equal equality.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-07 18:02:27 +02:00
dc14aac068
pyproject.toml: Enable mypy.warn_redundant_casts
Add warn_redundant_casts = true to the mypy configuration template.
This rule detects casts that mypy proves unnecessary, helping to
clean up redundant type casts that clutter the codebase.

This is one of the boolean-flag rules being gradually adopted from
the stricter mypy profile in /tmp/pyproject.toml. It produces just
1 error during initial rollout.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-07 18:02:27 +02:00
f689d083d7
pyproject.toml: Enable mypy.truthy-bool
Add the truthy-bool error code to the mypy configuration. This
detects conditions and expressions that are always truthy because
the type has no __bool__ or __len__ method.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-07 18:02:26 +02:00
7e7341bf1b
pyproject.toml: Enable mypy.possibly-undefined
Add the possibly-undefined error code to the mypy configuration.
This detects variables that may not be defined on all execution
paths, catching a class of NameError bugs at type-check time.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-07 18:02:26 +02:00
5f6559dbe0
pyproject.toml: Enable mypy.ignore-without-code
Add the ignore-without-code error code to the mypy configuration.
This requires all # type: ignore comments to include a specific error
code, improving the precision and maintainability of type ignore
annotations.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-07 18:02:26 +02:00
df5785cefd
pyproject.toml, pyrightconfig.json: Require @override
Add mypy's explicit-override error code and pyrightconfig's
reportImplicitOverride "error" directive. This requires all methods
that override base class methods to be decorated with @override from
typing. The change complements the previous commit, which added
exactly that decorator to all relevant methods.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-07 18:02:26 +02:00
844a358665
conf/templates: Fix installation
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m21s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m52s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m17s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m27s
CI / Packaging test (push) Successful in 0s
conf/templates is not installed to /etc/opt/jw-pkg/templates. Fix
that so that other packages including py-topdir.mk can use the
templates.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-11 13:30:43 +02:00
4b6966c480
pyproject.toml: Add {mypypath}
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m7s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m8s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m9s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m12s
CI / Packaging test (push) Successful in 0s
Add a [tool.mypy] section to pyproject.toml with a {mypypath}
template variable. The already existing template generation mechanism
in py-topdir.mk should fill that in with a path pointing to all
Python modules managed by jw-pkg:

  [tool.mypy]

    {mypypath}

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-09 07:52:15 +02:00
850efda804
py-topdir.mk: Add machinery to generate pyproject.toml
pyproject.toml is currently copied unchanged from conf/topdir to the
toplevel directory. Set up machinery in py-topdir.mk to render it
from a template in conf/templates instead, replacing {mypypath} in
the process.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-09 07:52:15 +02:00
7396794122
conf/templates: Add subdir
Add $(TOPDIR)/conf/templates as a location for templates, i.e. input
files to the CmdCreateFile template rendering command.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-09 07:45:15 +02:00
5d1ba6e15a
pyproject.toml: Enforce import annotations style
Add new ruff rules and fix their fallout:

  future-annotations = true

   select = [
    "TC",  # type-checking import placement rules
    "FA",  # future annotations rules
   ]

This comprises:

  - Streamline imports and exports in cmds.xxx.Cmd

    - Import base class as "Base"

    - Export types Cmd and Parent via __all__

  - Move all types imported only for annotation below TYPE_CHECKING

  - Use "from __future__ import annotations" all over the place

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-01 14:34:25 +02:00
7a65a7b5e1
pyproject.tompl: Set ruff.output-format = "concise"
In order to produce make check output digestable by vim, ruff's
output format needs to be set to "concise", so do that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-01 14:33:52 +02:00
8c5c98c95a
py-topdir.mk: Use pyright
py-topdir.mk: Use ruff and yapf

  - Use pyright for the target py-check-syntax

  - Generate a $(TOPDIR)/pyrightconfig.json for that

  - Add pyrightconfig-base.json because it's used by
    pyrightconfig.json

  - Add python3-pyright to pkg.requires.release, anticipating the use
    of the py-syntax-check target by CI

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 18:20:37 +02:00
36d854ce19
py-topdir.mk: Use ruff and yapf
- Use ruff and yapf for the targets py-check-syntax, py-format and
    py-check-format.

  - Add a pyproject.toml for those. It also includes configuration
    for isort, albeit not being directly used in the linter targets.

  - Make .gitignore igore that in newly created projects.

  - Add ruff, yapf and isort to pkg.requires.release, anticipating
    their use by CI.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 18:20:36 +02:00
99386d5492
conf/project: Add directory and variables
Anticipating future usefulness, add a regular project configuration
directory plus two variables pointing to it:

  JW_PKG_CONF_BASE_DIR        ?= $(firstword $(wildcard $(JW_PKG_DIR)/conf /etc/opt/jw-pkg))
  JW_PKG_CONF_DIR             ?= $(firstword $(wildcard $(JW_PKG_CONF_BASE_DIR)/project $(JW_PKG_CONF_BASE_DIR)))

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 18:20:31 +02:00
f21ff8e713
topdir.mk: Add dynamic file creation machinery
Add generic machinery to dynamically create files in $(TOPDIR). The
need arises because version controlled configuration files for
linters are going to be introduced.

For that, this commit introduces a variable $(TD_GENERATE_FILES),
which target all depends on, and which topdir.clean removes.

It defaults to another variable also introduced by this commit,
$(TD_COPY_FILES), which in turn defaults to $(TOPDIR)/conf/topdir.

This commit also adds support for JW_PKG_TOPDIR_COPY_PATH. It
supports a PATH-style syntax, which allows pointing to multiple
directories to be checked for source files. If they exist, they will
be appended to the files found in $(TOPDIR)/conf/topdir after
copying. Defining arbitray files to copy is not supported before
security implications during CI runs are better understood.

Having the copy prerequisites work comes at the cost of having to add
.SECONDEXPANSION. Since it's limited to the toplevel Makefile, I
suppose that's acceptable.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 18:20:30 +02:00
af6de30546 scripts/usr-bin: Install symlink /usr/bin/jw-pkg
Install a symlink /usr/bin/jw-pkg -> /opt/jw-pkg/bin/jw-pkg.py in
order to have jw-pkg in $PATH.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-06 15:58:11 +02:00
e9cb539ecf jw-pkg.py: Enable argcomplete
Register a bash-completion handler for jw-pkg.py, and mark it with
PYTHON_ARGCOMPLETE_OK.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-06 12:06:28 +01:00
5d84eb0877 conf: Add subdir
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-06 12:06:28 +01:00
bc883deed4 Everywhere: Remove everything non-essential for "make clean all"
This commit removes everything not strictly necessary for running
"make clean all" inside jw-build.

packaging jw-devtest. This cuts the repo down from 24077 to 4725
lines of code.

The idea is to

1) Further remove bloat from the remaining bits

2) Re-add what's necessary to build and package other essential repos.

   The decision should be based on whether or not jw-build can also be
   useful in a non-janware context.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 15:02:56 +01:00
ca52ba6d6e /etc/jw-rc.status: Fix file mode
Signed-off-by: Jan Lindemann <jan@janware.com>
2023-10-26 12:44:44 +00:00
2d6e7b11ac conf/etc/Makefile, jw-rc.status: Add /etc/jw-rc.status
Some distros remove /etc/rc.status, so provide jw-rc.status as an
alternative

Signed-off-by: Jan Lindemann <jan@janware.com>
2023-10-26 12:36:51 +00:00
154529ea23 conf/jcs/Makefile: Fix warning about multiply defined targets
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-07-09 11:09:37 +00:00
b2d6e6f554 Everywhere: Rename MODDIR -> JWBDIR
Rename the omnipresent MODDIR variable to JWBDIR, since that's more to the
point.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 21:34:18 +00:00
3a180033d4 projects.py fix: Read_value() does not return entire section
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-18 07:37:15 +00:00
458fe33260 conf/profile, make, scripts: Search-and-replace cvs.jannet.de -> cvs.janware.com
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-15 08:15:28 +00:00
aa85417a17 Everywhere: Purge spaces in text files
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-06 12:38:20 +00:00
0eaef0c326 conf/jcs, make, tmpl/doxygen: Align equal signs in makefiles to column 30
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 18:12:28 +00:00
b7772630cf cvsroot.sh, cvs-admin.sh, integrate-distro.sh: Replace /home/jannet/arc -> /srv
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-14 09:18:17 +00:00
5a85b5ce97 jcs.conf: Work around often disfunctional /usr/bin/hostname
/usr/bin/hostname often returns nonsense, especially during early phases
of installation. Rely on the contents of /etc/hostname for determining
jcs_dir

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-10-28 10:13:43 +00:00
e70f7a1c5c rpmdist.mk: Add target ssh-remote
This target runs ssh -l root $(TARGET_HOST), with TARGET_HOST typically defined in
$(MODDIR)/make/local.mk. Seems a bit out-of-place, everything, but anyway.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-26 12:56:50 +00:00
0ebf893d18 jcs.conf: Fix domain part "janware" in jcs_dir
Using hostname -d, as before, seems to volatile for a robust config directory
layout.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-26 11:09:32 +00:00
afd30cf380 alias-cdc.sh: Moved ytools cdc.sh to jw-build alias-cdc.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-26 10:50:33 +00:00
3961d47f07 conf/jcs, make, scripts: Rename jw-build's get_os.sh to get-os.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-12 09:35:57 +00:00
8cb9249af0 jcs.conf: Replace cvs.stable by jw.dev
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-04-23 16:49:50 +00:00
b0f816dcc2 jcs.mk: Try to fix jcs not in PATH after sudo
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-04-23 15:50:28 +00:00
9c4db07ac6 conf/jcs, scripts: Move jcs over from ytools
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-04-12 12:12:07 +00:00
e36edb06ab cvsroot.sh: Add /etc/profile.d/cvsroot.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-04-12 10:51:38 +00:00
d94dfad4a8 conf/profile/path-jw-build.sh: Add file
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-04-07 14:30:18 +00:00