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.
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).
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.
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.
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.
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.
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.
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.
jw-pkg is related to, but strictly speaking not indispensible for building and packaging software. So, in the attempt have a minimal jw-build, move jw-pkg to jw-base, and fix all packages that use it.
Make list-files target ignore errors. This catches errors from git ls-files | xargs realpath if git ls-files lists dead symbolic links, as in my-project/blah/dev/fd -> ./proc/self/fd.
Implemented by passing -q (quiet) to realpath, not sure what else this suppresses.
Implement the functionality of create-pkg-config.sh in a Python module CmdCreatePkgConfig.py. This allows to remove create-pkg-config.sh and jw-build-functions.sh.
Note that the translation was done pretty literally to play it safe. More code can and should be removed by taking advantage of the fact that jw-projects.py knows more about the project than the shell scripts.
Re-add everthing needed for building and packaging ytools. This is a big commit, 2002 lines of code. It mostly consists of C/C++ machinery, plus some documentation-related stuff.
Re-add everything necessary for recursively building all repos in a directory, e.g. as a build controlled by janware.com/Makefile or any other installation.
This adds 489 lines of code which can (and should) be massively reduced, notably removing code supporting CVS.
"Makefile" is used in dependency checks within projects-dir.mk. Since it might be included from projects-dir-minimal.mk, which also works with "GNUmakefile", make this fallback of a predefinable variable, PROJECTS_MAKEFILE_NAME.
Adapt projects makefile to match the mechanism all proj.mk's are supposed to find their JWBDIR. Namely make JWBDIR_NAME a conditionally assigned variable to allow for some testing of alternative jw-build trees.
In the attempt to move both jw-build and the janware toplevel Makefile from CVS to Git, add two new makefile snippets to make/*.mk:
- projects-dir-minimal.mk
A new toplevel-Makefile for building all projects in one go. It
should be suitable to be downloaded from janware.com/Makefile and
then be used to bootstrap all repos hosted on janware.com, that a
user has access to, just like the current toplevel Makefile is.
It is as small as possible: Little code means few assumptions on
what the world outside of it looks like, notably jw-build. This
is desirable, because it lives outside of version control, albeit
for a short while, and as long as it does, there's no mechanism
in place to keep it current.
That said, on first use, it replaces itself with a symbolic link
into jw-build and is then version controlled with jw-build.
- projects-dir-include.mk
This is essentially the existing projects-dir.mk /
toplevel-Makefile, which it includes. It's meant as a place for
adaptations to the next-generation implementation. This might
prove handy to have while both implementations coexist during the
transition phase.