Commit graph

3,997 commits

Author SHA1 Message Date
9217d38964 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>
2025-11-28 13:35:56 +01:00
ca95a9d6b2 projects-dir-minimal.mk: $(info) -> $(warning)
Use $(warning) instead of $(info), in order to avoid cluttering
stdout for targets which output machine-readable content, e.g.
list-text-files-0.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 13:34:02 +01:00
bed9e0cf03 Release 1.0.0-143@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-27 07:09:14 +00:00
09fd58e0ad Start version: 1.0.0-143
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-27 07:08:50 +00:00
e31e50036d pgit.sh: push doesn't understand --login
--login is not understood by pgit.sh push. Solve that by allowing all
commands a --login option. This addresses our use case, but isn't
ideal of course. Will be finally fixed by moving pgit.sh's
functionality into Python code.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-26 20:55:35 +01:00
0d95ccc5a0 pgit.sh: clone --login configures broken remote
pgit.sh clone --login <username> fails to insert said username into a
remotes url while adding it: Of ssh://<username>@git.janware.com/srv/git,
only ssh://@git.janware.com/srv/git makes it into the config. Fix
that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-26 20:00:51 +01:00
7152a811e9 topdir.mk: Add target git-pull-official
git-pull-official is currently an alias to git-pull-devops.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-24 11:34:03 +01:00
bf86f6c625 topdir.mk: Add targets git-pull-% and git-pull-maintainer
git-pull-% pulls whatever $(GIT_MAIN_BRANCH) happens to be
from the remote jw-% into the current branch, with --rebase and
--autostash.

git-pull-maintainer does the same with <maintainer>.  <maintainer> is
figured out from the configuration in projects.conf. If it's the
invoking user, origin is used.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-24 11:22:56 +01:00
e53a79a80d Release 1.0.0-142@suse-tumbleweed/x86_64
Signed-off-by: Janware DevOps <devops@janware.com>
2025-11-24 09:49:46 +00:00
1839a70029 Start version: 1.0.0-142
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-24 09:49:21 +00:00
f9f0041790 pgit.sh: Support --login
In the move away from environment variables, replace JANWARE_USER
support in pgit.sh by the --login option.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-24 10:35:07 +01:00
d047ad650c pgit.sh: Support --refspec
In the attempt to move away from communicating options via
environment variables from one part of jw-build software to another,
replace PGIT_CLONE_FROM_USER with the clearer --refspec option. Which
is also more versatile.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-24 10:04:47 +01:00
c6444a4a72 projects-dir-minimal.mk: Improve on link-makefile.done
- Make PROJECTS_MAKEFILE_NAME point to first in $(MAKEFILE_LIST)

  - Allow to include projects-dir-minimal.mk in hand-written Makefile
    without fear that its going to be overwritten with a link

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-23 20:00:50 +01:00
f0832d2b4b Release 1.0.0-141@suse-tumbleweed/x86_64
Signed-off-by: Janware DevOps <devops@janware.com>
2025-11-23 13:57:37 +00:00
66e7947c69 Start version: 1.0.0-141
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-23 13:25:59 +00:00
4053451bfd projects-dir.mk: Disable --create-remote-user-repos
Creating user repositories is hard to test. Not sure if the concept
will survive the current workflow changes, disable it for now.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 18:10:55 +01:00
9283479489 make, scripts: Don't unconditionally clone with proactiveAuth=basic
Don't unconditionally add proactiveAuth=basic to Git's config during
clone, but only if cloning happens after authentication.

This saves unauthenticated users funny password prompts. On the other
hand, this makes a server setting persistent which could be changed
on the server.

  URL =~ /api/  (or so) => 401, followed by Basic Auth
  URL !=~ /api/ (or so) => Redirect or free access, depending on resource

Currently all resources, including API, are accessible by either
basic auth or a Cookie, but basic auth needs to be present in the
first request, which throws off some clients (notably Git without
proactiveAuth=basic).

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 17:32:04 +01:00
fc02dad92c projects-dir-minimal.mk: Default PROJECTS_DIR_REMOTE_BASE to jw-build's remote
If jw-build is already cloned, infect all other repositories with its
remote via PROJECTS_DIR_REMOTE_BASE.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 16:54:04 +01:00
561905bab7 projects-dir.mk: Fix empty JANWARE_USER error
JW_BUILD_SSH_EXTRA_OPTS contains a -l $(JANWARE_USER), which make ssh
break if $(JANWARE_USER) is empty. Fix that case.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 16:33:18 +01:00
c37f2aaca3 pgit.sh: Deprecate CentOS 7
CentOS 7's Git doesn\'t understand -C, consider that obsolete and don't
cd into a directory any longer.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 16:15:26 +01:00
f4106e9da2 build.lib.cmds.SSHClient: Fix dtor exception
SSHClient's destructor raises an exception because of broken
os.environ syntax, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 15:48:13 +01:00
99dca58e1d projects-dir.mk: Make GIT_ASKPASS absolute
The GIT_ASKPASS environment variable can point to a relative path,
and since pgit.sh currently does a chdir, it needs to be made an
absolute path.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 15:28:05 +01:00
e46ab382e9 pgit.sh: Set http.proactiveAuth=basic
For git clone, use and persist the http.proactiveAuth=basic config
option, because it's needed for janware.com servers.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 15:07:17 +01:00
7d436f1c76 projects-dir[-minimal].mk: Go from PROJECTS_DIR_REMOTE_BASE
Currently, the primary discriminating criterion on how to handle a
set of remote repositories is whether or not JANWARE_USER is defined.
The canonical way to do that is PROJECTS_DIR_REMOTE_BASE, though, so
go from that definition.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 13:52:41 +01:00
babf58e2dd build.lib.cmds.SSHClient: Finish __init_askpass()
Finish and test the __init_askpass() method, works.

__init_askpass() had never been tested. Finish it and make sure it
works.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 12:42:45 +01:00
f9fe1dbe51 projects-dir-minimal.mk: Add PROJECTS_DIR_REMOTE_USER_SUBPATH = /proj
PROJECTS_DIR_REMOTE_USER_SUBPATH is a janware.com specialty somewhat.
Having subpaths is a Forgejo feature request on Codeberg, though, so
it might also be here to stay.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 12:40:41 +01:00
27e9b23849 build.cmds.CmdListRepos: Support username/password authentication
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 11:29:50 +01:00
50744fc41e build.cmds.CmdListRepos: Pass -f to curl
curl exits with 0 success status, even if the server returns HTTP
401. Passing -f fixes that and has curl error out with exit code 22.
It doesn't show which error, though.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 10:56:47 +01:00
150bc97fc9 build.lib.util, build.App: Beautify exceptions
Make exceptions somewhat more readable.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 10:44:14 +01:00
9d06e0bf2e CmdGetAuthInfo: Code beautification
Fix clumsy code printing auth info.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 10:26:16 +01:00
41cc712dee projects-dir-minimal.mk: Clone jw-build with proactiveAuth=basic
Pass -c http.proactiveAuth=basic to the initial "git clone jw-build"
invocation. This is necessary while jw-build is still behind
authentication. The restriction will likely be lifted (for jw-build),
but for testing now it's fine, and it doesn't do any harm, either.
With the way janware.com currently operates, it will also necessary
for push over HTTP, so  make it persistent in jw-build's
configuration.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 09:38:24 +01:00
4c35ceb27a projects-dir-minimal.mk: Support JW_BUILD_BRANCH
Pass --branch $(JW_BUILD_BRANCH) to git clone invocations during the
initial cloning of jw-build. Used for testing.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 09:46:47 +01:00
250ef17764 Release 1.0.0-140@suse-tumbleweed/x86_64
Signed-off-by: Janware DevOps <devops@janware.com>
2025-11-20 00:09:49 +00:00
7c3dc53ddc Start version: 1.0.0-140
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-20 00:09:23 +00:00
e95f91aff8 CmdGetAuthInfo: Fix: Suppress user name "None"
Don't print username="None" if there's no such user

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 20:00:13 +01:00
ae01ad6bdf Release 1.0.0-139@suse-tumbleweed/x86_64
Signed-off-by: Janware DevOps <devops@janware.com>
2025-11-19 08:33:24 +00:00
f01cbba53a Start version: 1.0.0-139
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-19 08:32:58 +00:00
6d7d18d9bd projects-dir-minimal.mk: Fix get-user-info infocation
jw-python is invoked with -t (topdir) instead of -p (prefix) for
JANWARE_USER detection, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 09:16:24 +01:00
f750b2cf05 CmdGetAuthInfo: Don't use non-git jw-build
Don't try to use non-git jw-build repositories to retrieve auth info.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 09:15:13 +01:00
bf6a83ccac build.cmds.CmdListRepos: Fix ssh://git.janware.com
A typo breaks enumeration of Git repos on git.janware.com, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 08:40:24 +01:00
e1a4746ad5 projects-dir-minimal.mk: Use get-auth-info for JANWARE_USER
Default JANWARE_USER to the user retrieved by jw-projects.py get-auth-info.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 08:37:07 +01:00
1187c10c86 build.cmds.GetAuthInfo: Add module
Add command get-auth-info to jw-projects.py. It is meant to retrieve
JANWARE_USER from an already cloned jw-build tree.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 08:14:43 +01:00
8de4a90796 projects-dir-minimal.mk: Fix linking after package build
Linking the projects-dir Makefile fails if make pkg-rebuild has been
run on jw-build, because it leaves another projects-dir-minimal.mk
below the dist directory. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 08:24:58 +01:00
d740f30226 projects-dir[-minimal.mk]: Group PGIT_SH-related variables
Group variables related with pgit.sh (PGIT_SH and PGIT_SH_CLONE)
closer together. Define CLONE_FROM_USER early on.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 21:14:19 +01:00
b7833c928a pgit.sh fix: --create-remote-user-repos parsed incorrectly
--create-remote-user-repos is not recognized because of is not
recognized because of a typo, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 21:12:54 +01:00
d484749b79 cmds.CmdListRepos: Don't import from lib
Don't directly import from lib (i.e. from __init__.py), because that
won't work until "make all" has not run through, i.e. during fresh
checkout.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 20:09:23 +01:00
aac261d782 projects-dir[-minimal].mk: Change usage comment
The usage comments heading projects-dir-minimal.mk and
projects-dir.mk state that for cloning all repositories, JANWARE_USER
needs to be defined. That restriction is now gone, so reflect that in
the comment.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:56:21 +01:00
69132d9246 projects-dir[-minimal].mk: Support PROJECTS_DIR_REMOTE_BASE
Add the variable PROJECTS_DIR_REMOTE_BASE, defaulting to
ssh://git.janware.com/srv/git if REMOTE_USER is defined, and to
https://janware.com/code in case it isn't.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:55:20 +01:00
7d1ff5c6e6 projects-dir.mk: Default PGIT_CLONE_FROM_USER to janware
Clone from user janware if JANWARE_USER is not defined.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:56:02 +01:00
fe81bd209e projects-dir[-minimal].mk: Don't default JANWARE_USER
Do not set JANWARE_USER to $(id -un) in case it's undefined. Instead,
rely on it being set explicitly in the environment if so desired.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:44:57 +01:00