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>
--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>
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>
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>
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>
Replace git-srv-admin.sh list-personal-projects by the more universal
"jw-projects.py list-repos" for enumerating repo names. This is a
step towards supporting Git servers other than janware.com.
Signed-off-by: Jan Lindemann <jan@janware.com>
pgit.sh has ssh://$login@git.janware.com/srv/git/$fromuser/proj/$reponame
hard-coded as the remote Git URLs of every cloned project.
This commit adds support for the global option --remote-base. Passing
it changes the URL to <remote-base>/$fromuser/$reponame..
Signed-off-by: Jan Lindemann <jan@janware.com>
Adding a symbolic link to src/python/jw allows jw-projects.py to run
without pointing PYTHONPATH to that module.
Signed-off-by: Jan Lindemann <jan@janware.com>
Add support for --create-user-repos to pgit.sh. It controls whether
or not personal remote repositories on janware.com are created when
cloning from another user.
Signed-off-by: Jan Lindemann <jan@janware.com>
git-srv-admin.sh is not necessarily in PATH, notably because
jw-build doesn't add itself to it anylonger, so invoke it with itsits
full path.
Signed-off-by: Jan Lindemann <jan@janware.com>
Without purge-stale-projects.sh, projects not longer in the upstream
directory don't get purged, so add it back.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
Since currently remote SSH git repos are identified via
git-srv-admin.sh, we still need it to run make over a bare toplevel
Makefile.
Signed-off-by: Jan Lindemann <jan@janware.com>
There's a certain logic that jw-pkg is part of jw-build, because it
comes in handy to compile config file templates in a post-install
stage. On the other hand, jw-base looks like a better place for that.
Re-adding for now, to not break too many packages.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
Move nearly all of projects.py into src/python/jw/build/App.py. The
plan is to split the script into parts and import them.
Signed-off-by: Jan Lindemann <jan@janware.com>
pkg.sh's operating system abstraction doesn't make much sense with
the debian compatibilty script removed, so add it back.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
pgit.sh is not indispensable for building a projects directory, but
it is necessary for some convenience targets in projects-dir.mk.
Signed-off-by: Jan Lindemann <jan@janware.com>
Re-add all files necessary to package jw-build itself, i.e.
sucessfully run make pkg-rebuild-reinstall. This adds 1892 lines of
code.
Signed-off-by: Jan Lindemann <jan@janware.com>
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>
Make a few scripts optional which don't belong into a minimal
jw-build, increasing compatibility with a branch which removes them.
Signed-off-by: Jan Lindemann <jan@janware.com>
Missing -devel packages during build often lead to this:
WARNING: No project directory for module "dw-pi-playlist: No project
path found for module "dw-pi-playlist"
but actually, the warning isn't correctly logged. Instead, an exception is
thrown. Fix that.
Signed-off-by: Jan Lindemann <jan@janware.com>
jw-pkg determines the file attributes of template compilation output via a line
matching the '^#\s*conf' regular expression. Allow that regex to be configured.
Signed-off-by: Jan Lindemann <jan@janware.com>
Up to now, jw-pkg only evaluates config lines at the top of secret-tables. Look
for config patterns at the top of templates, too.
Signed-off-by: Jan Lindemann <jan@janware.com>
/sbin/brctl is not part of openSUSE anymore, use ip link commands instead.
Also, remove the vlan option, now unsupported by qemu.
Signed-off-by: Jan Lindemann <jan@janware.com>
proj_dir() raises an exception for projects which don't have a dedicated
project directory, even though for some projects this is legal. php-cli, for
instance, only installs stuff below /srv/www/proj/php-cli.
This commit makes projects.py tolerate that.
Signed-off-by: Jan Lindemann <jan@janware.com>
%prep is passed -n <name> option. This is considered an error by rpm
Release 4.20.1-1.1. It is superfluous anyway, because the name is communicated to rpm
via %setup -n <name> later in the %prep section. Remove the -n option.
Signed-off-by: Jan Lindemann <jan@janware.com>
Make scm.sh ls-files list all files belonging to submodules, too. The use case
is to have list-text-files return them.
Signed-off-by: Jan Lindemann <jan@janware.com>
Installing packages breaks with eval, because it removes quotes,
notably around perl(XYZ) capabilities. Works just as well without
eval, remove it
Signed-off-by: Jan Lindemann <jan@janware.com>