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 Signed-off-by: Jan Lindemann <jan@janware.com> Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
This commit is contained in:
parent
a03eb10868
commit
c33d72f4d4
2 changed files with 12 additions and 5 deletions
|
|
@ -67,9 +67,10 @@ else
|
|||
ifeq ($(BUILD_USER),root)
|
||||
PKG_DIR_BUILD = /usr/src/packages
|
||||
else
|
||||
PKG_DIR_BUILD = $(HOME)/rpmbuild
|
||||
PKG_DIR_BUILD ?= $(TOPDIR)/dist/build
|
||||
endif
|
||||
PKG_DIR_BINARY = $(PKG_DIR_BUILD)/RPMS/$(PKG_ARCH)
|
||||
PKG_SH_EXTRA_ARGS += -T $(PKG_DIR_BUILD)
|
||||
endif
|
||||
|
||||
DIST_DIRS = $(DIST_SRC_DIR) $(DIST_PCKG_DIR)
|
||||
|
|
@ -106,7 +107,7 @@ PKG_SH = $(PKG_SH_EXE) \
|
|||
-X "$(PKG_CONFLICTS_RUN)" -Y "$(PKG_CONFLICTS_DEVEL)" \
|
||||
--provides-run "$(PKG_PROVIDES_RUN)" --provides-devel "$(PKG_PROVIDES_DEVEL)" \
|
||||
-m $(JWB_SCRIPT_DIR) -a $(PKG_ARCH) -p $(DIST_PCKG_DIR) -F $(PKG_FORMAT) \
|
||||
-B $(PKG_UPLOAD_URLPREFIX) -A $(PKG_UPLOAD_FILE_ATTRIB)
|
||||
-B $(PKG_UPLOAD_URLPREFIX) -A $(PKG_UPLOAD_FILE_ATTRIB) $(PKG_SH_EXTRA_ARGS)
|
||||
|
||||
all:
|
||||
install:
|
||||
|
|
|
|||
Loading…
Reference in a new issue