The source hash is an md5sum over all versioned files in the working tree.
md5sum follows symlinks, so a project with links to files outside the tree
may produce different hashes depending on files outside the repo.
Compute the hash over the VCS file ids instead. Add a -s option to scm.sh
ls-files that lists each versioned file together with its content id. The
listing is sorted by path rather than by id, so an entry keeps its position
when its content changes.
For Git repos, git ls-tree -r HEAD reports the blob of a symlink's target
string and the pinned commit of a submodule, so the resulting hash depends
only on the committed tree, never on the working tree or on the machine.
calculate_hash() and the HASH variable in make/pkg-dist.mk feed the id
listing, minus the release metadata files, directly to md5sum.
calculate_hash() fails loudly when the pipeline fails, with its callers
refusing to proceed on an empty result.
The scheme change invalidates the stored HASH values, so every project
gets one more release the first time it runs against the new code, and the
hashes are stable again afterwards.
Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1
In CVS, the -f option keeps directory entries out of scm.sh ls-file's
listing; in Git, it's a silent no-op. Notably symlinks are not excluded
despite -f.
Implement -f for git with a mode filter on git ls-files -s output: only
100644 and 100755 entries are listed, so the option means the same thing in
both code paths.
For Git, this actually means a behaviour change which needs to be fixed:
The dist archive targets tar-files and cpio-files in make/list-files.mk and
the scm_files() helper in scripts/pkg.sh then may no longer pass it to get
unchanged behaviour.
The targets list-files and list-text-files keep it, so the text-files cache
now matches its documented regular-files-only membership.
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1
Signed-off-by: Jan Lindemann <jan@janware.com>
Fix shellcheck SC2068 (unquoted array expansions), SC2145 (mixed
string/array arguments), SC2328 (redirection in command
substitution), SC2173 (untrapable signals), and SC2148 (missing
shebang) errors across 14 script files.
Also configure scripts/Makefile with --severity=error so that only
errors (not warnings or notes) cause check failures. To be tightened
by follow-up commits.
Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev
Signed-off-by: Jan Lindemann <jan@janware.com>
scm.sh ls-files by defaults does not list the VSC metadata files.
Passing -a includes them in the output.
Signed-off-by: Jan Lindemann <jan@janware.com>
Re-add all files necessary to package jw-build itself, i.e.
sucessfully run make pkg-rebuild-reinstall. This adds 1892 lines of
code.
Signed-off-by: Jan Lindemann <jan@janware.com>
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>
Make scm.sh ls-files list all files belonging to submodules, too. The use case
is to have list-text-files return them.
Signed-off-by: Jan Lindemann <jan@janware.com>