Commit graph

34 commits

Author SHA1 Message Date
f6f6e56943
make / scripts: git.janware.com -> devgit.janware.com

janware upstream development server moved from git.janware.com to devgit.janware.com. This commit follows the move with pretty much a simple

s/git.janware.com/devgit.janware.com/

over jw-pkg. It found 14 matches, that's pretty bad.

FIXME: Reduce the redundancy, or, better, replace the devgit.janware.com goodies by a more generally useful concept altogether.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-12 15:15:29 +02:00
d8653ac486 Remove /srv/git from janware Git URLs

git.janware.com has /srv/git removed from its Git URLs, follow suit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-13 12:15:37 +02:00
5af68a6541 projects-dir-minimal.mk: get-auth-info --interactive false

PROJECTS_DIR_REMOTE_BASE and JANWARE_USER is determined by jw-pkg.py get-auth-info. Interactivity hurts here, though, turn it off.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-07 15:34:52 +02:00
ed17aaa6c9 make: Align equal signs in *.mk to column 30

Chore: Format equal signs uniformly. They should all be at column 30 but aren't. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:57:50 +01:00
0e4ab928de projects-dir-minimal.mk: Add target init

Add an init target. Use it if you want to tell the Makefile: _Just_ initalize the build machinery and nothing else, don't pull and build everything else you can. Not strictly necessary, most of the time pulling everything is what's wanted, and that does the init anyway.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 01:20:26 +01:00
132dce8b3f jw-projects.py: Rename it to jw-pkg.py

jw-projects.py is now a multi-call executable, with "projects" being just one of its subcommands. Rename it to jw-pkg.py to reflect that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 15:24:16 +01:00
0b83c863a2 jw.build.cmds: Move build.cmds -> cmds.projects

Reorganize the Python module structure. Placing the command classes under jw.cmds.projects instead of jw.build.cmds will allow to add a nested command structure, with the current commands, being mostly related to building software, found below a "projects" toplevel command.

Other conceivable commands could be "package" for packaging, or "distro" for commands wrapping the distribution's package manager.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
f869b5aaca defs.mk: Define Q and use it in *.mk

Define Q ?= @, and replace @<command> in recipes by $(Q)<command>. Meant to be overridden from the environment for debugging as in

Q= make

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
49086708e4 build.cmds.CmdListRepos: Support local repos

Make jw-projects.py list-repos support a local directory as base URL of all git repositories, notably used by PROJECTS_DIR_REMOTE_BASE, which can now point to a local directory.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-15 15:05:23 +00:00
50a19954b4 projects-dir-minimal.mk: Make included targets once

Targets defined by projects-dir.mk are not available before it is included, but make makes up its mind about what targets are available after parsing the included makefiles, so remove that redundancy.

On the other hand, a dependency alone is not enough for make to understand that an included makefile has been remade, it needs a rule, so add a dummy-rule body. In this case only echoing that the include file has been provided.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-14 13:05:15 +01:00
f90f5aeebe Everywhere: Replace "JW_BUILD" by "JW_PKG"
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 13:35:56 +01:00
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
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
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
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
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
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
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
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
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
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
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
9018eb7c30 projects-dir-minimal.mk: Run make after cloning jw-build

After initially cloning jw-build and including projects-dir-minimal.mk, new targets are not considered, so run make again.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:53:28 +01:00
b82d4249f9 pgit.sh: Remove CVS support

Don't identify projects directory by a the presence of a correct CVS subdirectory any longer.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:30:59 +01:00
1a0eb42191 projects-dir-minimal.mk: Link Makefile more agressively

The link to the projects dir toplevel Makefile is not created if a jw-build directory already exists for some reason, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 17:13:29 +01:00
df9a4e6a40 projects-dir-*.mk: Re-add files necessary for building projects directory

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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-13 16:23:35 +01:00
bc883deed4 Everywhere: Remove everything non-essential for "make clean all"

This commit removes everything not strictly necessary for running "make clean all" inside jw-build.

packaging jw-devtest. This cuts the repo down from 24077 to 4725 lines of code.

The idea is to

1) Further remove bloat from the remaining bits

2) Re-add what's necessary to build and package other essential repos.

The decision should be based on whether or not jw-build can also be useful in a non-janware context.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 15:02:56 +01:00
c9ddeef8b4 projects-dir-minimal.mk: Don't clone jw-dev branch

Use the default branch to clone projects-dir-minimal.mk during initialiazation of the build tree.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-07 12:27:16 +01:00
df4a295d79 Add git-projects-dir-[include|minimal].mk

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.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-03 22:28:08 +01:00