Commit Graph

1405 Commits

Author SHA1 Message Date
Kevin Daudt
d4af7cd4e2 ci: add job to run tests
This uses the alpinelinux/abuild-ci image to run the test suite, which
has all the required dependencies already installed.
2021-10-07 17:24:10 +02:00
Natanael Copa
1c00caaddb abuild: make sure to not get colors in git_last_commit
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
2021-10-07 13:06:06 +02:00
Natanael Copa
3d9918f14d tests: enable colors in git config
Force colors in git config so we can test that we don't get color codes
in our last commit.

ref https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10042
2021-10-07 13:02:25 +02:00
Natanael Copa
e510181626 abuild-keygen: make cp non-interactive with -n
only use interactive copy when -n is omitted, so abuild-keygen --install
becomes non-interactive.

Add tests for both ineractive and non-interactive --install.

Fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10049
2021-09-27 20:08:30 +02:00
Natanael Copa
62066fa2b9 abuild-keygen: allow run without any sudo
make it possible to skip the sudo invocation for testing
2021-09-27 20:01:32 +02:00
Natanael Copa
f35682d086 ==== release 3.8.0 ==== 2021-09-21 11:29:47 +02:00
Natanael Copa
272c1e4780 abuild-tar: load engines on openssl < 3 2021-09-21 11:29:13 +02:00
Samanta Navarro
dc99ce423a abuild: fix typos
Typos found with codespell
2021-09-21 09:15:34 +00:00
Ariadne Conill
a590096e30 abuild-tar: remove openssl engine registration, deprecated in OpenSSL 3 2021-09-20 10:02:26 -06:00
Natanael Copa
10ad48d1fe ==== release 3.8.0_rc4 ==== 2021-06-10 16:44:46 +02:00
Kaarle Ritvanen
91c4bc018d rootbld: foreign arch build with QEMU user mode 2021-06-10 14:40:55 +00:00
Natanael Copa
22ff0df215 abump: fix check for clean git of APKBUILD 2021-06-10 16:37:26 +02:00
Sören Tempel
33957133ec newapkbuild: automatically add perl to $depends
The same thing is already done for other scripting languages (e.g.
python).
2021-06-10 14:32:52 +00:00
Timothy Legge
e0e6ee0d14 apkbuild-cpan.in: prevent inserting extra new line before checksum on upgrade 2021-06-10 14:31:02 +00:00
Timothy Legge
fbd28a76f0 apkbuild-cpan.in: don't change arch on an upgrade of package 2021-06-10 14:31:02 +00:00
Timothy Legge
474edd8fd9 Fix issue with incorrectly inserted newline 2021-06-10 14:31:02 +00:00
Leo
74b32d03db fix(abuild): use -print0 **after** the print commands 2021-06-10 14:28:44 +00:00
Natanael Copa
dee82f764c tests: skip lock test on s390x
the sleep(0) trick does not appear to work on s390x. which is okish as
worst case we end up with lock file leftovers. skip the test
2021-05-14 12:53:11 +02:00
Natanael Copa
fa0a2511d6 ==== release 3.8.0_rc3 ==== 2021-05-14 12:00:17 +02:00
Natanael Copa
241743073a tests: abump: configure git user 2021-05-14 11:49:38 +02:00
Leo
2ed215fa32 tests(abuild): test whether pyX.Y providers work 2021-05-06 10:50:57 -03:00
Leo
ac3ee42458 feat(abuild): add support for pyX.Y providers
Now all python packages that install python modules under
/usr/lib/pythonX.Y/site-packages will have a provider that indicates
their MAJOR (X) and MINOR (Y) versions.

pyX maps to the MAJOR version of the package, its objective is to allow
users to quickly install a python module without having to search around
for the correct package, doing `apk add py3.9:foo` will install whatever
packages provides the foo module.

The directories checked only go one level deep, so
'/usr/lib/python3.9/site-packages/date' will generate
py3:date=$pkgver-r$pkgrel.

files ending with .py also count and are added with their .py prefix
stripped away. so '/usr/lib/python3.9/site-packages/six.py' will
generate py3:six=$pkgver-r$pkgrel.

The reason for doing this is the same as creating pc:, so: and cmd:, it
is more reliable and robust to depened on what we known of what the package
provides than to try to guess via the pkgname.

Co-authored-by: Chloe Kudryavtsev <toast@toast.cafe>
2021-05-06 10:50:42 -03:00
Natanael Copa
d3845277bc ==== release 3.8.0_rc2 ==== 2021-05-06 15:34:58 +02:00
Wolf
29557a4a54 Set non-zero size if there are any files in the package
If there are only empty files in the pkgdir, on some filesystems
(discovered on btrfs), du might return 0 for the sum size of the files.
But apk-tools considers packages with size = 0 to be virtual and skips
extraction of any files contained.

To work around that (until it is resolved in apk-tools 3), settings the
size to 1 when it is zero AND some files are present should work fine.
2021-05-06 13:32:08 +00:00
Natanael Copa
5f15ae8360 tests: abuild-keygen: test PACKAGER set 2021-05-06 15:30:10 +02:00
Natanael Copa
b4816004a1 tests: abuild-keygen: create a fake git
test what happens when git has no user.email configured
2021-05-06 15:30:10 +02:00
Tom Lebreux
e520288df5 abuild-keygen: Fix crash on unknown git user.email 2021-05-06 08:17:00 -04:00
Natanael Copa
3da770ce35 abuild-fetch: simplify and fix locking
Simplify locking by using lockf(3). It is POSIX compatible and should
work over NFS.

Fix download race condition when:
1) host A creates lockfile and aquire lock to fetch from distfiles
   mirror
2) host B opens the lockfile and waits for lock
3) host A gets 404 from distfiles, releases lock and deletes the
   lockfile, which host A has an open file handle for
4) host B gets lock of the deleted file and downloads file
5) host A retries download and creates a new lockfile, but is not
   blocked by host B, even if it should

Solve this by releaseing the lock, give the other processes a chance
to aquire it (using sleep(0)), and then only delete the lockfile if:
a) download was successful (no 404) or b) no-one else has a lock.

This reverts commit 281720ec39 (abuild-fetch: aquire a second lock
using flock(2))

fixes #10026
2021-05-06 13:03:14 +02:00
Natanael Copa
6a6145b9b3 tests: improve abuild-fetch locking test
make sure that we cover the issue #10026
2021-05-05 17:17:54 +02:00
Natanael Copa
18f8c94237 make: add FILTER var to make check
so we can run specific test with make check FILTER=<what-to-test>
2021-05-05 16:31:05 +02:00
Natanael Copa
8aacd4783f tests: fix abump to work without configured git user 2021-04-30 15:55:22 +02:00
Natanael Copa
57ec5043f0 tests: fix with busybox sha512sum and misc cleanups 2021-04-30 13:57:20 +02:00
Natanael Copa
f687a7dbe7 ==== release 3.8.0_rc1 ==== 2021-04-30 13:45:05 +02:00
Natanael Copa
f23cf180c9 tests: simplify subpkg-dep-leak 2021-04-30 11:14:49 +02:00
Kevin Daudt
cf6cd0231f tests: verify subpkg dependencies don't influence main package
Subpackages can declare their own dependencies, but these should not
affect the main package.

Add a test that verifies this behaviour.
2021-04-30 10:43:09 +02:00
Natanael Copa
2ffb1294b1 remove obsolete .devbuildrc 2021-04-29 13:03:42 +02:00
Natanael Copa
fe2aca3b7d abump: check version before we build 2021-04-29 13:02:10 +02:00
Natanael Copa
1510dbf6fb tests: add tests for abump 2021-04-29 12:45:48 +02:00
Natanael Copa
250346a2ed abump: pass extra options to abuild via ABUILD_OPTS
this is so we can drop the -r option in our test suite
2021-04-29 12:38:29 +02:00
Natanael Copa
fd91001089 abuild: allow set extra options for apk index
Use ABUILD_APK_INDEX_OPTS as extra options for apk index. This is so we
can set the apk keys dir to the directory with our temporary test keys
2021-04-29 12:37:38 +02:00
Natanael Copa
7f6f208279 abump: remove -R,--recursive option
abuild does not support it since commit 9a398eac0c (abuild: remove
recursive mode)
2021-04-29 12:10:21 +02:00
Natanael Copa
d7150a3fb1 abuild: warn if -dbg is not first in subpackages
fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10002
2021-04-29 11:45:59 +02:00
Natanael Copa
db1950c5ce abuild: test for duplicates when doing checksum
fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10013
2021-04-28 13:02:28 +02:00
Natanael Copa
c9a4ddf3b4 tests: abuild: fix checksum test
use the correct abuild script

fixes commit e8cfedc2b3 (tests: abuild: test checksum generation)
2021-04-28 12:59:03 +02:00
Natanael Copa
a8de7b7f55 tests: add tests for SETFATTR
see https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10027
2021-04-28 10:57:26 +02:00
Natanael Copa
b0fb0de17c tests: clean up src and pkg dir after tests 2021-04-28 10:48:54 +02:00
Natanael Copa
39b552751e tests: add test for -dbg package 2021-04-28 10:44:28 +02:00
Natanael Copa
32b7789e9a abuild: allow override setfattr
In osme situations it might be needed to disable setfattr. Allow this
via: `SETFATTR=true abuild ...`

fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10027
2021-04-28 10:33:23 +02:00
Natanael Copa
754270e460 abuild-keygen: abort on error
run under `set -e` to we abort on first error

fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10028
2021-04-28 10:24:24 +02:00
Natanael Copa
9c3427d16f tests: add tests for abuild-keygen 2021-04-28 10:22:24 +02:00