scripts / make: Add Recommends support #113

Merged
Jan Lindemann merged 1 commit from jan/feature/20260919-scripts-make-add-recommends-support into master 2026-09-19 20:25:02 +02:00 AGit

scripts / make: Add Recommends support

The spec generator only supports Requires, Conflicts and Provides from the [pkg.requires.], [pkg.conflicts.] and [pkg.provides.*] sections of make/project.conf. A package that works without but is better with another package, like jw-amavis-run without jw-clamav-run, must hard-require it, so the dependency is pulled in on every install and cannot be removed without dragging the depending package along.

This commit adds Recommends support to the spec generation chain:

  • CmdPkgRecommends: new pkg-recommends command that reads the [pkg.recommends.] sections, same base as pkg-requires
  • pkg-dist.mk: compute PKG_RECOMMENDS_RUN and pass it to pkg.sh via a new -E option
  • pkg.sh: accept -E and forward it to the mkspec wrapper
  • mkspec-wrapper.sh: accept -E and export RECOMMENDS_RUN
  • create-mkspec.sh: emit a Recommends: line when RECOMMENDS_ is set
  • create-mkdebian.sh: emit a Recommends: field in the debian control file

Projects without a [pkg.recommends.*] section generate unchanged specs: every new line is guarded by a non-empty test. zypper follows Recommends by default, so existing OpenSUSE installations are unaffected; a recommended package can be removed without dragging the depending package along.

#### scripts / make: Add Recommends support The spec generator only supports Requires, Conflicts and Provides from the [pkg.requires.*], [pkg.conflicts.*] and [pkg.provides.*] sections of make/project.conf. A package that works without but is better with another package, like jw-amavis-run without jw-clamav-run, must hard-require it, so the dependency is pulled in on every install and cannot be removed without dragging the depending package along. This commit adds Recommends support to the spec generation chain: - CmdPkgRecommends: new pkg-recommends command that reads the [pkg.recommends.<flavour>] sections, same base as pkg-requires - pkg-dist.mk: compute PKG_RECOMMENDS_RUN and pass it to pkg.sh via a new -E option - pkg.sh: accept -E and forward it to the mkspec wrapper - mkspec-wrapper.sh: accept -E and export RECOMMENDS_RUN - create-mkspec.sh: emit a Recommends: line when RECOMMENDS_<subpkg> is set - create-mkdebian.sh: emit a Recommends: field in the debian control file Projects without a [pkg.recommends.*] section generate unchanged specs: every new line is guarded by a non-empty test. zypper follows Recommends by default, so existing OpenSUSE installations are unaffected; a recommended package can be removed without dragging the depending package along.
scripts / make: Add Recommends support
Some checks failed
CI / Packaging - Kali Linux (pull_request) Failing after 2m59s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m28s
CI / Packaging test (pull_request) Failing after 0s
de7984f63a
The spec generator only supports Requires, Conflicts and Provides from
the [pkg.requires.*], [pkg.conflicts.*] and [pkg.provides.*] sections of
make/project.conf. A package that works without but is better with another
package, like jw-amavis-run without jw-clamav-run, must hard-require it, so
the dependency is pulled in on every install and cannot be removed without
dragging the depending package along.

This commit adds Recommends support to the spec generation chain:

- CmdPkgRecommends: new pkg-recommends command that reads the
  [pkg.recommends.<flavour>] sections, same base as pkg-requires
- pkg-dist.mk: compute PKG_RECOMMENDS_RUN and pass it to pkg.sh via a new
  -E option
- pkg.sh: accept -E and forward it to the mkspec wrapper
- mkspec-wrapper.sh: accept -E and export RECOMMENDS_RUN
- create-mkspec.sh: emit a Recommends: line when RECOMMENDS_<subpkg> is set
- create-mkdebian.sh: emit a Recommends: field in the debian control file

Projects without a [pkg.recommends.*] section generate unchanged specs:
every new line is guarded by a non-empty test. zypper follows Recommends by
default, so existing OpenSUSE installations are unaffected; a recommended
package can be removed without dragging the depending package along.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1
Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-09-19 17:48:33 +02:00
Jan Lindemann force-pushed jan/feature/20260919-scripts-make-add-recommends-support from de7984f63a
Some checks failed
CI / Packaging - Kali Linux (pull_request) Failing after 2m59s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m28s
CI / Packaging test (pull_request) Failing after 0s
to f76071815f
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m32s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m48s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m6s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m41s
CI / Packaging test (push) Successful in 0s
2026-09-19 20:14:38 +02:00
Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!113
No description provided.