Commit graph

4,717 commits

Author SHA1 Message Date
fc017b624b js.mk: Don't minify without minifier

JS_MINIFY_FILTER_IN can be defined to nothing, in which case minifying breaks, so don't minify if there's no filter. As an additional benifit, defining it to the empty string in local.mk allows to use Vim's quickfix window for syntax errors, because there's no intermediate file created.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-11 17:23:22 +01:00
51658528f0 tailwind.mk: Add file

tailwind.mk is meant to generate a CSS file with tailwind classes from configuration files named *.css.tw or *.css.tw.tmpl. The latter flavour understands some make-style variables, as of now only $(TOPDIR).

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-06 15:12:35 +01:00
5ffaf8c680 defs-[dev|dist].mk: Add DATA_DIR, JSON_DIR

Define DATA_DIR, the directory where read-only, non-executable and non-configurable resources should be stored. And define JSON_DIR as $(DATA_DIR)/json.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-03 20:48:32 +01:00
cfaf466487 rpmdist.mk: Support PACKAGE_VCS_FILES = true / false

PACKAGE_VCS_FILES defaults to false. Defining it to true before including rpmdist.mk includes the version-control metadata files in the source packages.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-01 11:35:15 +01:00
e42e3b783b pkg.sh build: Support -a / --include-vcs-files

pkg.sh by default doesn't pack up version control metadata. Passing -a or --include-vcs-files includes them in the source packages.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-01 11:31:54 +01:00
e55793f61a scm.sh ls-files: Support -a (all files)

scm.sh ls-files by defaults does not list the VSC metadata files. Passing -a includes them in the output.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-01 11:29:53 +01:00
016c1f4220 pgit.sh: Don't fetch with target refspec

"git fetch $remote $fromref:$toref" fails if the $fromref is behind $toref.

Unrolling the syntax into "git fetch" followed by "git merge --ff-only $remote/$fromref $toref" is accepted, though, and saves some otherwise necessary case distinction code around it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-29 15:35:39 +01:00
77544c701d Release 1.0.0-147@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-29 13:54:24 +00:00
fa3b8db8c2 Start version: 1.0.0-147
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-29 13:53:59 +00:00
c3c6cdc446 purge-stale-projects.sh: Support --vcs

Support option --vcs. CVS is retired, but worked well as a test case for mixing multiple version-control systems in one tree.

purge-stale-projects.sh is still pretty ugly and will have to go, but its API might still serve as a working template.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-29 13:28:51 +01:00
841e3067a6 Release 1.0.0-146@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-29 00:06:16 +00:00
ccac32c502 Start version: 1.0.0-146
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-29 00:05:51 +00:00
4ad7091159 cmds.CmdBuild: import time

import time is missing from CmdBuild, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 20:18:52 +01:00
1a68185617 Release 1.0.0-145@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-28 14:41:18 +00:00
2a548413be Start version: 1.0.0-145
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-28 14:40:54 +00:00
441051ea4a jw.pkg: Add Makefile

Re-add Python modules into the installed package by adding src/python/jw/pkg/Makefile.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 15:34:24 +01:00
c2353654eb Release 1.0.0-144@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-28 14:23:30 +00:00
6cb0943506 Start version: 1.0.0-144
Signed-off-by: janware DevOps <devops@janware.com>
2025-11-28 14:23:13 +00:00
6340eeace9 Everywhere: Replace "jw_build" by "jw_pkg"
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 13:35:56 +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
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