Everywhere: Rename package "jw-build" to "jw-pkg"

jw-build doesn't stop at building software, packaging it afterwards
is also a core feature, so this commit gives the package a better
name.

The commit replaces strings s/jw-build/jw-pkg/ in text files and file
names. Fallout to the functionality is fixed, variable names are left
as they are, though. To be adjusted by later commits.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-26 17:48:01 +01:00
commit 9217d38964
50 changed files with 36 additions and 36 deletions

2
.gitignore vendored
View file

@ -4,7 +4,7 @@ bin/*.py
*.done *.done
*.dist *.dist
make/.cache.mk make/.cache.mk
make/jw-build.pc make/jw-pkg.pc
minimal-to-master.sh minimal-to-master.sh
pkg-build.dist pkg-build.dist
pkgconfig/ pkgconfig/

View file

@ -244,7 +244,7 @@ else ifeq ($(COMPILER_SUITE),clang)
endif # COMPILER_SUITE endif # COMPILER_SUITE
# -- jw-build variables based on arch and toolchain # -- jw-pkg variables based on arch and toolchain
ifeq ($(TARGET_TRIPLET),arm-none-eabi) ifeq ($(TARGET_TRIPLET),arm-none-eabi)
LIBTYPE ?= static LIBTYPE ?= static
@ -514,7 +514,7 @@ ifeq ($(USE_PROJECT_LIB),true)
PROJECTLIB_LDFLAGS += -L$(TOPDIR)/lib -l$(LIBNAME) PROJECTLIB_LDFLAGS += -L$(TOPDIR)/lib -l$(LIBNAME)
endif endif
ifneq ($(filter jw-build,$(PREREQ_BUILD)),) ifneq ($(filter jw-pkg,$(PREREQ_BUILD)),)
ifeq ($(TARGET),mingw) ifeq ($(TARGET),mingw)
JW_FINAL_LDFLAGS += -lglib-2.0 -lws2_32 -lstdc++ JW_FINAL_LDFLAGS += -lglib-2.0 -lws2_32 -lstdc++
endif endif

View file

@ -1,4 +1,4 @@
# jw-build library # jw-pkg library
# (c) 2001 jannet it services # (c) 2001 jannet it services
# contact@jannet.de # contact@jannet.de
# $Id$ # $Id$

View file

@ -1,4 +1,4 @@
# jw-build library # jw-pkg library
# (c) 2001 jannet it services # (c) 2001 jannet it services
# contact@jannet.de # contact@jannet.de
# $Id$ # $Id$

View file

@ -9,7 +9,7 @@ ifeq ($(USE_USER_URL),true)
endif endif
SUBMOD_SRC_DIR ?= . SUBMOD_SRC_DIR ?= .
GIT_SRV_ADMIN_SH = ssh $(JANWARE_USER_PREFIX)git.janware.com /opt/jw-build/bin/git-srv-admin.sh GIT_SRV_ADMIN_SH = ssh $(JANWARE_USER_PREFIX)git.janware.com /opt/jw-pkg/bin/git-srv-admin.sh
GIT_REPO_URL = ssh://$(JANWARE_USER_PREFIX)git.janware.com/srv/git/$(JANWARE_USER)/contrib/$(SUBMOD_PKG_NAME) GIT_REPO_URL = ssh://$(JANWARE_USER_PREFIX)git.janware.com/srv/git/$(JANWARE_USER)/contrib/$(SUBMOD_PKG_NAME)
SUBMOD_PATH = $(patsubst $(abspath $(TOPDIR))/%,%,$(abspath $(CWD)/$(SUBMOD_SRC_DIR))) SUBMOD_PATH = $(patsubst $(abspath $(TOPDIR))/%,%,$(abspath $(CWD)/$(SUBMOD_SRC_DIR)))
SUB_GIT = git -C $(SUBMOD_SRC_DIR) SUB_GIT = git -C $(SUBMOD_SRC_DIR)

View file

@ -149,7 +149,7 @@ else
endif endif
SYSTEM_LIBDIR = /usr/$(SYSTEM_LIBDIR_NAME) SYSTEM_LIBDIR = /usr/$(SYSTEM_LIBDIR_NAME)
# - support legacy jw-build target variables # - support legacy jw-pkg target variables
ifneq ($(findstring $(TARGET_ABI),mingw mingw32 mingw64),) ifneq ($(findstring $(TARGET_ABI),mingw mingw32 mingw64),)
TARGET ?= mingw TARGET ?= mingw
else else

View file

@ -5,7 +5,7 @@
# (C) Copyright 2001-2025, Jan Lindemann <jan@janware.com> # (C) Copyright 2001-2025, Jan Lindemann <jan@janware.com>
# #
# This is the top-level Makefile for a software build tree organized by # This is the top-level Makefile for a software build tree organized by
# jw-build. It is provided under the terms of the GNU Lesser Public License, # jw-pkg. It is provided under the terms of the GNU Lesser Public License,
# Version 2. # Version 2.
# #
# Current documentation on how this Makefile is meant to be used can be found # Current documentation on how this Makefile is meant to be used can be found
@ -17,7 +17,7 @@ PROJECTS_MAKEFILE_NAME := $(firstword $(MAKEFILE_LIST))
-include local.mk -include local.mk
JWBDIR ?= jw-build JWBDIR ?= jw-pkg
ifeq ($(origin PROJECTS_DIR_REMOTE_BASE),undefined) ifeq ($(origin PROJECTS_DIR_REMOTE_BASE),undefined)
ifneq ($(wildcard $(JWBDIR)),) ifneq ($(wildcard $(JWBDIR)),)

View file

@ -5,7 +5,7 @@
# (C) Copyright 2001-2025, Jan Lindemann <jan@janware.com> # (C) Copyright 2001-2025, Jan Lindemann <jan@janware.com>
# #
# This is the top-level Makefile for a software build tree organized by # This is the top-level Makefile for a software build tree organized by
# jw-build. It is provided under the terms of the GNU Lesser Public License, # jw-pkg. It is provided under the terms of the GNU Lesser Public License,
# Version 2. # Version 2.
# #
# Current documentation on how this Makefile is meant to be used can be found # Current documentation on how this Makefile is meant to be used can be found
@ -21,13 +21,13 @@ PROJECTS_MAKEFILE_NAME ?= $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)
# -- Find JWBDIR # -- Find JWBDIR
DEV_PROJECTS_DIR ?= . DEV_PROJECTS_DIR ?= .
JWBDIR_NAME ?= jw-build JWBDIR_NAME ?= jw-pkg
JWBDIR_SEARCH_PATH ?= $(DEV_PROJECTS_DIR) $(BUILD_TOOLS_PREFIX)/opt/$(FLAVOUR_PATH_PREFIX) JWBDIR_SEARCH_PATH ?= $(DEV_PROJECTS_DIR) $(BUILD_TOOLS_PREFIX)/opt/$(FLAVOUR_PATH_PREFIX)
JWBDIR ?= $(firstword $(wildcard $(addsuffix /$(JWBDIR_NAME),$(JWBDIR_SEARCH_PATH)))) JWBDIR ?= $(firstword $(wildcard $(addsuffix /$(JWBDIR_NAME),$(JWBDIR_SEARCH_PATH))))
JW_BUILD_BINDIR = $(JWBDIR)/bin JW_BUILD_BINDIR = $(JWBDIR)/bin
JWB_SCRIPT_DIR = $(firstword $(wildcard ./$(JWBDIR_NAME)/scripts $(JW_BUILD_BINDIR)) jwb-script-dir-not-found) JWB_SCRIPT_DIR = $(firstword $(wildcard ./$(JWBDIR_NAME)/scripts $(JW_BUILD_BINDIR)) jwb-script-dir-not-found)
JW_BUILD_REMOTE_BINDIR = /opt/jw-build/bin JW_BUILD_REMOTE_BINDIR = /opt/jw-pkg/bin
SHELL = /bin/bash -o pipefail +H SHELL = /bin/bash -o pipefail +H
PROJECTS_TXT ?= projects.txt PROJECTS_TXT ?= projects.txt
@ -89,7 +89,7 @@ else
endif endif
ifeq ($(filter pkg-%,$(MAKECMDGOALS)),) ifeq ($(filter pkg-%,$(MAKECMDGOALS)),)
JW_BUILD_SSH_EXTRA_OPTS += -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPath=/tmp/%r@jw-build:%h:%p -o ControlPersist=3m JW_BUILD_SSH_EXTRA_OPTS += -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPath=/tmp/%r@jw-pkg:%h:%p -o ControlPersist=3m
ifneq ($(JANWARE_USER),) ifneq ($(JANWARE_USER),)
JW_BUILD_SSH_EXTRA_OPTS += -l $(JANWARE_USER) JW_BUILD_SSH_EXTRA_OPTS += -l $(JANWARE_USER)
endif endif
@ -137,7 +137,7 @@ endif
PURGE_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/purge-stale-projects.sh $(JW_BUILD_BINDIR)/purge-stale-projects.sh) purge-not-found) PURGE_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/purge-stale-projects.sh $(JW_BUILD_BINDIR)/purge-stale-projects.sh) purge-not-found)
PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/pkg-manager.sh $(JW_BUILD_BINDIR)/pkg-manager.sh) pkg-manager-not-found) PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/pkg-manager.sh $(JW_BUILD_BINDIR)/pkg-manager.sh) pkg-manager-not-found)
CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-build-create-project.sh $(JW_BUILD_BINDIR)/jw-build-create-project.sh) jw-build-create-project-not-found) CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-pkg-create-project.sh $(JW_BUILD_BINDIR)/jw-pkg-create-project.sh) jw-pkg-create-project-not-found)
LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/scm.sh $(JW_BUILD_BINDIR)/scm.sh) scm-sh-not-found) ls-files LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/scm.sh $(JW_BUILD_BINDIR)/scm.sh) scm-sh-not-found) ls-files
GIT_SRV_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com $(JW_BUILD_REMOTE_BINDIR)/git-srv-admin.sh GIT_SRV_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com $(JW_BUILD_REMOTE_BINDIR)/git-srv-admin.sh

View file

@ -21,7 +21,7 @@ GIT_DESCR = $(TOPDIR)/.git/description
GIT_MAIN_BRANCH ?= master GIT_MAIN_BRANCH ?= master
OPT_JANWARE_PROJECT ?= -j OPT_JANWARE_PROJECT ?= -j
PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/pkg-manager.sh /opt/jw-build/bin/pkg-manager.sh) pkg-manager-not-found) PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/pkg-manager.sh /opt/jw-pkg/bin/pkg-manager.sh) pkg-manager-not-found)
ifeq ($(OPT_JANWARE_PROJECT),-j) ifeq ($(OPT_JANWARE_PROJECT),-j)
REMOTE_GIT_FLAVOUR ?= proj REMOTE_GIT_FLAVOUR ?= proj
@ -144,7 +144,7 @@ git-config:
git remote -v | grep -q "^origin *$(REMOTE_GIT_URL)" || git remote set-url --push origin $(REMOTE_GIT_URL) git remote -v | grep -q "^origin *$(REMOTE_GIT_URL)" || git remote set-url --push origin $(REMOTE_GIT_URL)
git-clone-to-remote: git-clone-to-remote:
ssh $(JANWARE_USER)@git.janware.com "/opt/jw-build/bin/git-srv-admin.sh $(OPT_JANWARE_PROJECT) create-personal-project $(PROJECT)" ssh $(JANWARE_USER)@git.janware.com "/opt/jw-pkg/bin/git-srv-admin.sh $(OPT_JANWARE_PROJECT) create-personal-project $(PROJECT)"
make git-config make git-config
git push --set-upstream origin $(GIT_MAIN_BRANCH) git push --set-upstream origin $(GIT_MAIN_BRANCH)
git push --all $(REMOTE_GIT_URL) git push --all $(REMOTE_GIT_URL)
@ -160,7 +160,7 @@ git-init-remote: git-import git-clone-to-remote
git-descr: $(GIT_DESCR) git-descr: $(GIT_DESCR)
git-update-project-description: git-update-project-description:
ssh $(JANWARE_USER)@git.janware.com "/opt/jw-build/bin/git-srv-admin.sh $(OPT_JANWARE_PROJECT) update-descriptions $(PROJECT)" ssh $(JANWARE_USER)@git.janware.com "/opt/jw-pkg/bin/git-srv-admin.sh $(OPT_JANWARE_PROJECT) update-descriptions $(PROJECT)"
projects-%: projects-%:
$(PYTHON) $(JWB_SCRIPT_DIR)/jw-projects.py build $* $(PROJECT) $(PYTHON) $(JWB_SCRIPT_DIR)/jw-projects.py build $* $(PROJECT)

View file

@ -58,7 +58,7 @@ cat_make_proj_mk()
ifeq (\$(TARGET),mingw) ifeq (\$(TARGET),mingw)
FLAVOUR_PATH_PREFIX = win32/ FLAVOUR_PATH_PREFIX = win32/
endif endif
JWBDIR ?= \$(firstword \$(wildcard \$(DEV_PROJECTS_DIR)/jw-build \$(BUILD_TOOLS_PREFIX)/opt/\$(FLAVOUR_PATH_PREFIX)jw-build)) JWBDIR ?= \$(firstword \$(wildcard \$(DEV_PROJECTS_DIR)/jw-pkg \$(BUILD_TOOLS_PREFIX)/opt/\$(FLAVOUR_PATH_PREFIX)jw-pkg))
USE_PROJECT_LIB = false USE_PROJECT_LIB = false
HDRDIR_SCOPE_SUFFIX = \$(PROJECT) HDRDIR_SCOPE_SUFFIX = \$(PROJECT)
@ -92,8 +92,8 @@ cat_make_project_conf()
libname = none libname = none
[pkg.requires.jw] [pkg.requires.jw]
devel = $name-run = VERSION-REVISION, jw-build-devel = VERSION devel = $name-run = VERSION-REVISION, jw-pkg-devel = VERSION
build = jw-build-devel build = jw-pkg-devel
EOT EOT
} }

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from jw.build.App import App from jw.pkg.App import App
App().run() App().run()

View file

@ -142,7 +142,7 @@ clone()
local toref="${refspec[2]}" local toref="${refspec[2]}"
[ "$fromuser" ] || fromuser=$whoami [ "$fromuser" ] || fromuser=$whoami
[ "$fromref" ] || fromref=master [ "$fromref" ] || fromref=master
local git_srv_admin="$SSH $login@git.janware.com /opt/jw-build/bin/git-srv-admin.sh" local git_srv_admin="$SSH $login@git.janware.com /opt/jw-pkg/bin/git-srv-admin.sh"
if [ -z "$projects" ]; then if [ -z "$projects" ]; then
projects=`$jw_projects list-repos --from-user $fromuser $remote_base` projects=`$jw_projects list-repos --from-user $fromuser $remote_base`

View file

@ -547,7 +547,7 @@ upload_file()
;; ;;
*) *)
target=$target_base/rpm/$t/$f:$upload_attrib target=$target_base/rpm/$t/$f:$upload_attrib
#/srv/ftp/pub/packages/jw-foss/suse/tumbleweed/rpm/src/jw-build-1.0.0-74.src.rpm #/srv/ftp/pub/packages/jw-foss/suse/tumbleweed/rpm/src/jw-pkg-1.0.0-74.src.rpm
;; ;;
esac esac
;; ;;
@ -559,7 +559,7 @@ upload_file()
;; ;;
*) *)
target=$target_base/rpm/$t/$f:$upload_attrib target=$target_base/rpm/$t/$f:$upload_attrib
#/srv/ftp/pub/packages/jw-foss/suse/tumbleweed/rpm/x86_64/jw-build-run-1.0.0-74.x86_64.rpm #/srv/ftp/pub/packages/jw-foss/suse/tumbleweed/rpm/x86_64/jw-pkg-run-1.0.0-74.x86_64.rpm
;; ;;
esac esac
esac esac

View file

@ -58,7 +58,7 @@ done
local_cvs_proj=`ls -d */CVS 2>/dev/null | sed 's%/[^/]*%%'` local_cvs_proj=`ls -d */CVS 2>/dev/null | sed 's%/[^/]*%%'`
local_git_proj=`ls -d */.git 2>/dev/null | sed 's%/[^/]*%%'` local_git_proj=`ls -d */.git 2>/dev/null | sed 's%/[^/]*%%'`
remote_cvs_proj=`$ssh cvs.janware.com find /srv/cvs/proj -maxdepth 1 -mindepth 1 -type d -executable -readable | sed 's%.*/%%'` remote_cvs_proj=`$ssh cvs.janware.com find /srv/cvs/proj -maxdepth 1 -mindepth 1 -type d -executable -readable | sed 's%.*/%%'`
remote_git_proj=`$ssh git.janware.com /opt/jw-build/bin/git-srv-admin.sh -j list-personal-projects` remote_git_proj=`$ssh git.janware.com /opt/jw-pkg/bin/git-srv-admin.sh -j list-personal-projects`
date=`date +'%Y%m%d'` date=`date +'%Y%m%d'`
myname=`basename $0` myname=`basename $0`

View file

@ -95,7 +95,7 @@ class App(object):
def get_os(self, args = ""): def get_os(self, args = ""):
import subprocess import subprocess
for d in [ self.projs_root + '/jw-build/scripts', '/opt/jw-build/bin' ]: for d in [ self.projs_root + '/jw-pkg/scripts', '/opt/jw-pkg/bin' ]:
script = d + '/get-os.sh' script = d + '/get-os.sh'
if os.path.isfile(script): if os.path.isfile(script):
cmd = '/bin/bash ' + script cmd = '/bin/bash ' + script
@ -452,7 +452,7 @@ class App(object):
import importlib import importlib
cmd_name = args.cmd.replace('-', '_') cmd_name = args.cmd.replace('-', '_')
cc_cmd_name = 'Cmd' + ''.join(x.capitalize() for x in cmd_name.lower().split("_")) cc_cmd_name = 'Cmd' + ''.join(x.capitalize() for x in cmd_name.lower().split("_"))
module = importlib.import_module('jw.build.cmds.' + cc_cmd_name) module = importlib.import_module('jw.pkg.build.cmds.' + cc_cmd_name)
cmd = getattr(module, cc_cmd_name)() cmd = getattr(module, cc_cmd_name)()
cmd.app = self cmd.app = self
subparser = argparse.ArgumentParser(description=cmd_name) subparser = argparse.ArgumentParser(description=cmd_name)

View file

@ -8,7 +8,7 @@ from argparse import ArgumentParser
class Cmd(abc.ABC): # export class Cmd(abc.ABC): # export
def __init__(self, name: str, help: str) -> None: def __init__(self, name: str, help: str) -> None:
from .App import App from ..App import App
self.name = name self.name = name
self.help = help self.help = help
self.parent = None self.parent = None

View file

@ -22,10 +22,10 @@ class CmdGetAuthInfo(Cmd): # export
def _run(self, args: Namespace) -> None: def _run(self, args: Namespace) -> None:
keys = ['username', 'password'] keys = ['username', 'password']
# --- Milk jw-build repo # --- Milk jw-pkg repo
jw_build_dir = self.app.proj_dir('jw-build') jw_build_dir = self.app.proj_dir('jw-pkg')
if not os.path.isdir(jw_build_dir + '/.git'): if not os.path.isdir(jw_build_dir + '/.git'):
self.app.debug(f'jw-build directory is not a Git repo: {jw_build_dir}') self.app.debug(f'jw-pkg directory is not a Git repo: {jw_build_dir}')
return return
remotes = run_cmd(['git', '-C', jw_build_dir, 'remote', '-v']) remotes = run_cmd(['git', '-C', jw_build_dir, 'remote', '-v'])
result: dict[str, str] = {} result: dict[str, str] = {}
@ -38,7 +38,7 @@ class CmdGetAuthInfo(Cmd): # export
for key in keys: for key in keys:
result[key] = getattr(parsed, key) result[key] = getattr(parsed, key)
base = parsed.geturl() base = parsed.geturl()
base = re.sub(r'/jw-build', '', base) base = re.sub(r'/jw-pkg', '', base)
base = re.sub(r'/proj$', '', base) base = re.sub(r'/proj$', '', base)
url['remote-base'] = base url['remote-base'] = base
break break

View file

@ -31,13 +31,13 @@ class CmdListRepos(Cmd): # export
match url.scheme: match url.scheme:
case 'ssh': case 'ssh':
if re.match(r'ssh://.*git\.janware\.com/', args.base_url): if re.match(r'ssh://.*git\.janware\.com/', args.base_url):
from jw.build.lib.SSHClient import SSHClientCmd as SSHClient from jw.pkg.build.lib.SSHClient import SSHClientCmd as SSHClient
ssh = SSHClient(hostname=url.hostname) ssh = SSHClient(hostname=url.hostname)
if username is not None: if username is not None:
ssh.set_username(username) ssh.set_username(username)
if password is not None: if password is not None:
ssh.set_password(password) ssh.set_password(password)
cmd = f'/opt/jw-build/bin/git-srv-admin.sh -u {args.from_user} -j list-personal-projects' cmd = f'/opt/jw-pkg/bin/git-srv-admin.sh -u {args.from_user} -j list-personal-projects'
out = ssh.run_cmd(cmd) out = ssh.run_cmd(cmd)
print(out) print(out)
return return

View file

@ -1,4 +1,4 @@
TOPDIR = ../../../.. TOPDIR = ../../../../../..
PY_UPDATE_INIT_PY = false PY_UPDATE_INIT_PY = false
include $(TOPDIR)/make/proj.mk include $(TOPDIR)/make/proj.mk

View file

@ -1,4 +1,4 @@
TOPDIR = ../../../../.. TOPDIR = ../../../../../..
include $(TOPDIR)/make/proj.mk include $(TOPDIR)/make/proj.mk
include $(JWBDIR)/make/py-mod.mk include $(JWBDIR)/make/py-mod.mk