remove all file system paths from the resulting executable.
Instead of absolute file system paths, the recorded file names
will begin either a module path@version (when using modules),
or a plain import path (when using the standard library, or GOPATH).
Currently, abuild stores the license variable ad-verbatim in the PKGINFO
file. This causes many downstream systems to fail. For example, `apk
info` won't show anything after the newline, our webview that lists
licenses do not show these either.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
By default, the Go module cache is read-only. This become a problem
when cleaning up the build directory from within abuild. For this
reason, many existing aports for Go software employ one of the following
solutions: (1) passing -modcacherw manually (2) setting the chmod-clean
option or (3) overwriting default_cleanup_srcdir. By solving this
problem globally we make it easier to create packages for Go software
and ensure consistency in regards to cleaning the module cache.
The syntax highlighting on gitlab for abuild.in is off, probably because
it detected a different language.
Lets help by explicitly specifying `gitlab-language` in gitattributes.
Otherwise apk will rely on defaults 'etc/apk/cache' and 'var/apk/cache'
based on new chroot directory and will delete everything when rootbld finishes.
This test is flaky and relies on a file hosted remotely, which can be
unreachable. Ideally there should a way to have this file served from
the test suite itself, but this might be challenging to do without
adding dependencies.
Installing a build key requires root permissions, something that is not
possible in all cases, most notably on the builders.
Instead of generating a key each time, which results in many keys being
generated each test suite run, check whether a key is already present by
using `abuild-sign --installed`, and only generate a key when that
returns false.
Remove the SUDO environment variable, as it depends on what's installed
and configured on the host what implementation should be used.
It would not suffice to add sudo or doas as a makedepend, as it would
also need to be configured to allow abuild-keygen -ain to be executed
without password.
Arithmetic operations with void pointers are an extension by some
compilers and not part of the C standard, which does not specify the
size of void.
CFLAGS with -pedantic reveals this during compile time. I have adjusted
the usage of ?: so CFLAGS can contain -pedantic now.
The default provider priority is 0, which disables the normal way apk
selects an unversioned virtual dependency. Instead, version the
provider so that cmd: dependencies can be robustly used like normal
dependencies.
abuild and abump call a few helpers that are expected to be available in
PATH. As abuild is not installed yet, they are not in the default PATH
locations.
Add the project root dir to $PATH to make sure these helpers can be found.
If `APORTSDIR` is not set, abuild tries to find it. One way it does this
is by trying to look at the url for the git remote 'origin'. This fails
either if there is no git repository, or the git repository has no
remote called 'origin'.
Instead of having abuild guess the location, provide it by exporting
APORTSDIR.
git log may return color codes if users colored output forcibly enabled
with:
[color]
ui = always
Use `git rev-list` instead of `git log` to make sure that we don't get
any color codes.
fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10042