pkg-dist.mk, pkg.sh: Build RPMs in dist/build, drop the pckg spelling #127

Merged
Jan Lindemann merged 3 commits from jan/feature/20260924-pkg-dist-mk-pkg-sh-build-rpms-in-dist-build-drop-the-pckg-spelling into master 2026-09-24 13:15:37 +02:00 AGit
Owner

This PR moves non-root RPM builds into an in-tree topdir and drops the pckg spelling from the package build: the artifact directory becomes dist/pkg and the PCKG-named make variables become PKG:

pkg-dist.mk, pkg.sh: Build RPMs in dist/build

pkg.sh hardcodes $HOME/rpmbuild as the rpmbuild topdir while make computes the same location separately as PKG_DIR_BUILD, and a sandboxed shell cannot build at all: rpmbuild writes its scratch trees and results under the topdir, outside the project.

  • Default PKG_DIR_BUILD to $(TOPDIR)/dist/build for non-root builds and pass it to pkg.sh as the new -T option (root keeps /usr/src/packages; local.mk can still override)
  • Build with --define _topdir pointing at that directory, resolved to an absolute path, so the scratch tree, RPMS and SRPMS stay in the project tree where make clean drops them

pkg-dist.mk, pkg.sh: Rename dist/pckg to dist/pkg

The directory holding the built packages uses the pckg abbreviation while every other package-related name in the build system uses pkg (PKG_PROJECT, PKG_FORMAT, PKG_ARCH).

Rename dist/pckg to dist/pkg, in the DIST_PCKG_DIR variable and in the recipes that hardcode the path.

pkg-dist.mk, pkg.sh: Rename PCKG variables to PKG

The previous commit renamed the dist/pckg directory to dist/pkg but kept the pckg spelling in the variables that reference it.

Rename the variables to PKG:

  • DIST_PCKG_DIR to DIST_PKG_DIR (make/pkg-dist.mk, pkg.sh)
  • PCKG_TAR to PKG_TAR, PCKG_ROOT to PKG_ROOT and DIST_PCKG_RPM to DIST_PKG_RPM (make/pkg-dist.mk)

None of the other 320 janware projects use these variables.

This PR moves non-root RPM builds into an in-tree topdir and drops the pckg spelling from the package build: the artifact directory becomes `dist/pkg` and the PCKG-named make variables become PKG: #### pkg-dist.mk, pkg.sh: Build RPMs in dist/build `pkg.sh` hardcodes `$HOME/rpmbuild` as the rpmbuild topdir while `make` computes the same location separately as `PKG_DIR_BUILD`, and a sandboxed shell cannot build at all: rpmbuild writes its scratch trees and results under the topdir, outside the project. - Default `PKG_DIR_BUILD` to `$(TOPDIR)/dist/build` for non-root builds and pass it to `pkg.sh` as the new `-T` option (root keeps `/usr/src/packages`; `local.mk` can still override) - Build with `--define _topdir` pointing at that directory, resolved to an absolute path, so the scratch tree, RPMS and SRPMS stay in the project tree where `make clean` drops them #### pkg-dist.mk, pkg.sh: Rename dist/pckg to dist/pkg The directory holding the built packages uses the `pckg` abbreviation while every other package-related name in the build system uses `pkg` (`PKG_PROJECT`, `PKG_FORMAT`, `PKG_ARCH`). Rename `dist/pckg` to `dist/pkg`, in the `DIST_PCKG_DIR` variable and in the recipes that hardcode the path. #### pkg-dist.mk, pkg.sh: Rename PCKG variables to PKG The previous commit renamed the `dist/pckg` directory to `dist/pkg` but kept the pckg spelling in the variables that reference it. Rename the variables to PKG: - `DIST_PCKG_DIR` to `DIST_PKG_DIR` (make/pkg-dist.mk, pkg.sh) - `PCKG_TAR` to `PKG_TAR`, `PCKG_ROOT` to `PKG_ROOT` and `DIST_PCKG_RPM` to `DIST_PKG_RPM` (make/pkg-dist.mk) None of the other 320 janware projects use these variables.
pkg.sh hardcodes $HOME/rpmbuild as the rpmbuild topdir while make computes
the same location separately as PKG_DIR_BUILD, and a sandboxed shell cannot
build at all: rpmbuild writes its scratch trees and results under the
topdir, outside the project.

- Default PKG_DIR_BUILD to $(TOPDIR)/dist/build for non-root builds and
  pass it to pkg.sh as the new -T option (root keeps /usr/src/packages;
  local.mk can still override)
- Build with --define _topdir pointing at that directory, resolved to an
  absolute path, so the scratch tree, RPMS and SRPMS stay in the project
  tree where make clean drops them

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
The directory holding the built packages uses the pckg abbreviation while
every other package-related name in the build system uses pkg (PKG_PROJECT,
PKG_FORMAT, PKG_ARCH).

Rename dist/pckg to dist/pkg, in the DIST_PCKG_DIR variable and in the
recipes that hardcode the path.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
pkg-dist.mk, pkg.sh: Rename PCKG variables to PKG
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 7m1s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m3s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m46s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m51s
CI / Packaging test (push) Successful in 0s
f92de9f3ff
The previous commit renamed the dist/pckg directory to dist/pkg but kept
the pckg spelling in the variables that reference it.

Rename the variables to PKG:

- DIST_PCKG_DIR to DIST_PKG_DIR (make/pkg-dist.mk, pkg.sh)
- PCKG_TAR to PKG_TAR, PCKG_ROOT to PKG_ROOT and DIST_PCKG_RPM to
  DIST_PKG_RPM (make/pkg-dist.mk)

None of the other 320 janware projects use these variables.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-09-24 13:03:31 +02:00
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!127
No description provided.