--create-remote-user-repos had been disabled in
4053451bfd on the grounds that it's
hard to test and possibly superflous. It actually is not superfluous,
as devops builds show, and that's a valid test-case, so re-enable it.
Signed-off-by: Jan Lindemann <jan@janware.com>
Running "make install" from an arbitrary source directory currently
by default either installs to a user-accessible ENV_PREFIX, or, if
DEVELOPMENT is set to false, tries to install into the system's root
filesystem, but fails over permission errors. This was by design: To
now, I considered trying the latter ill-conceived, because installing
without package manager control bears the risk of leaving unversioned
files in the system.
Actually, thinking again, during development this looks like a valid
use case: Having run pkg-rebuild-reinstall before, installing from a
source directory will leave a trace in the package manager's hash
check output, will be handled during the next clean install, and
might be a useful shortcut for trying things in the root file system.
So make this possible by:
$ DEVELOPMENT=false make install
Signed-off-by: Jan Lindemann <jan@janware.com>
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>
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>
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>
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>
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>
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>
"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>
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>
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>
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>
--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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>