Commit Graph

1615 Commits

Author SHA1 Message Date
Natanael Copa 63467b1ef3 abuild: pass -v option to subshells
Help debugging in fakeroot by passing -v option
2022-06-22 16:13:07 +02:00
Natanael Copa 4da872b8c9 tests: abuild: test show version 2022-06-22 16:13:07 +02:00
Natanael Copa f69cbe8b96 abuild: show usage on stderr on invalid options 2022-06-22 16:13:07 +02:00
Natanael Copa 0a9f7d1e31 tests: abuild-sign: refactor owner 0/0 test
Refactor test that verifies that owner in tar archive is numeric 0/0
2022-06-22 16:13:07 +02:00
Natanael Copa ea4c0e0eba abuild-sign: fix --installed to detect missing keys 2022-06-22 16:13:07 +02:00
Natanael Copa 32d080e427 abuild-sign: send help text to stderr on error 2022-06-22 16:13:07 +02:00
Natanael Copa 97d6a8567d tests: add tests for abuild-sign
Test help text, invalid opts and args, and --installed
2022-06-22 16:13:07 +02:00
Natanael Copa 657a2086cf abuild-keygen: allow override git binary
Makes it easier to test without creating a fake git binary
2022-06-22 16:13:07 +02:00
Natanael Copa 2326f0c4ef tests: refactor abuild-keygen tests 2022-06-22 16:13:07 +02:00
Natanael Copa 7f675c1de3 abuild-keygen: use 4096 bits as the default 2022-06-22 16:13:07 +02:00
Natanael Copa 11c1091659 abulid-keygen: only send help text to stderr on error 2022-06-22 16:13:07 +02:00
Natanael Copa ad5697ac44 tests: refactor test for abuild-gzsplit
Also test that the splitted components contains what is expected
2022-06-22 16:13:07 +02:00
Natanael Copa 26938597a0 tests: remove abuild-fetch.bats
It is replaced by abuild_fetch_test
2022-06-22 16:13:07 +02:00
Natanael Copa 14b89510ec tests: abuild-fetch: add test for fetch locking 2022-06-22 16:13:07 +02:00
Natanael Copa 956f452c10 tests: abuild-fetch: use -d to set output dir 2022-06-22 16:13:07 +02:00
Natanael Copa 0fe4de3663 tests: abuild-fetch: test wget --no-check-certificate 2022-06-22 16:13:07 +02:00
Natanael Copa c87b6a47fe tests: abuild-fetch: test wget failure 2022-06-22 16:13:07 +02:00
Natanael Copa 0c40d8aca7 tests: abuild-fetch: test wget fallback 2022-06-22 16:13:07 +02:00
Natanael Copa 684cd989e6 tests: abuild-fetch: add test for http --insecure
when abuild-fetch is used with http source, curl should add --insecure
option. Verify this in a test.
2022-06-22 16:13:07 +02:00
Natanael Copa d7d4eb7d60 tests: abuild-fetch: test curl failure 2022-06-22 16:13:07 +02:00
Natanael Copa 38a62bd063 tests: abuild-fetch: add test for curl invocation 2022-06-22 16:13:07 +02:00
Natanael Copa 911550dbe1 tests: add test for abuild-fetch help 2022-06-22 16:13:07 +02:00
Natanael Copa f24dcff607 tests: functions.sh: test missing git 2022-06-22 16:13:07 +02:00
Natanael Copa b9739f2c3f functions.sh: make it possible to set git binary
to help with testing
2022-06-22 16:13:07 +02:00
Natanael Copa 9dc6b74058 tests: Switch to kyua/atf-test, add tests for functions.sh 2022-06-22 16:13:07 +02:00
Natanael Copa 4d3c8c8533 functions.sh: send error message to stderr 2022-06-14 16:38:40 +02:00
Leo 8219a3219f newapkbuild: use meson-abuild helper instead of meson
abuild-meson is a shellscript that wraps around meson and passes options
meant for packaging software that uses meson, for Alpine Linux.
2022-06-14 13:45:20 +00:00
psykose b070451ae3 apkgrel: pass -- to git with name of file in do_add
the name of the file can be ambiguous, as it might also be the name of a
branch. passing -- makes git look at it as a file only, and not a
potential branch.
2022-06-14 13:41:14 +00:00
Nathan Rennie-Waldock 83f19b7fd8 abuild: Fix always reporting ccache as missing when USE_CCACHE=1 2022-06-14 12:40:59 +00:00
Jakub Jirutka 140d8ab82c newapkbuild: do not run cargo test with --release
It takes a longer time to compile and, most importantly, it may cause
unnecessary rebuild of everything in the package phase (installation).
2022-06-14 12:25:28 +00:00
Jakub Jirutka bf1dae494b newapkbuild: fetch rust dependencies in prepare phase
Fetch all dependencies in the prepare phase and do not access network
in the following phases.
2022-06-14 12:25:28 +00:00
Clayton Craft f7f53bac28 abuild.conf: disable Go's buildvcs
This was added in Go 1.18 and enabled by default, and causes builds to
fail if $builddir is not a repo.
2022-06-14 14:17:25 +02:00
Jakub Panek 79624340a1 abuild.conf: add -trimpath flag
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).
2022-06-14 12:12:39 +00:00
Olliver Schinagl f5d6e5e34b abuild: Do not store whitespaces in license field
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>
2022-06-14 12:08:01 +00:00
Sören Tempel 0ab9d5b621 abuild.conf: add -modcacherw to default Go build flags
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.
2022-06-07 15:51:57 +00:00
Alex Xu (Hello71) b69e0230d0 tests: use BATS_TEST_TMPDIR, don't dump temp files in repo 2022-05-21 14:23:58 +00:00
Kevin Daudt 074a335464 gitlab: highlight abuild.in as shell
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.
2022-05-03 12:42:36 +02:00
donoban d9f03b387a rootbld: add '--cache-dir' when preparing the $BUILD_ROOT
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.
2022-04-05 08:02:48 +00:00
donoban 84d7b7693d rootbld: run mkusers inside the chroot and don't affect host users 2022-04-05 08:02:48 +00:00
Natanael Copa 681ef9dfcf tests: add test with invalid version of subpkgs' dependency
Ref: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10058
2022-01-17 16:17:25 +01:00
Natanael Copa 9a96275d87 abuild: test that subpkg's dependencies versions are valid
Also verify the version of provides

Fixes: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10058
2022-01-17 16:14:58 +01:00
Natanael Copa 8824e43ad9 abuild: verify subpkgnames
Refactor pkgname check and also check subpkgnames

Add tests for invalid subpkgnames
2022-01-17 15:44:10 +01:00
Natanael Copa 070341e21d tests: add tests for invalid pkgname
Add s test for valid pkgnames to verify the testsuite APKBUILD actually
works as intended, and a few tests for invalid pkgnames
2022-01-17 15:36:49 +01:00
Natanael Copa bc71314cc3 ==== release 3.9.0 ==== 2021-11-22 15:03:42 +01:00
Kevin Daudt 6cd337fa9c ==== release 3.9.0_rc2 ==== 2021-10-11 23:32:14 +02:00
Kevin Daudt a1975471ab tests/abuild: skip remote initd tests
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.
2021-10-11 23:13:57 +02:00
Kevin Daudt 2a95c3d50c tests: only generate key when not available yet
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.
2021-10-11 23:12:59 +02:00
Kevin Daudt a0d6085e9b tests: don't hardcode sudo implementation
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.
2021-10-11 22:44:43 +02:00
Kevin Daudt 4f723af7e5 ==== release 3.9.0_rc1 ==== 2021-10-11 20:53:50 +02:00
Ariadne Conill 78e36813d1 functions: add hostspecs for loongarch
Alpine itself will most likely use only the loongarch64 target, but it
makes sense to reserve the others as well.
2021-10-11 18:45:50 +00:00