Commit Graph

1427 Commits

Author SHA1 Message Date
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
Natanael Copa
69aea22462 abuild.conf: add CARGO_BUILD_JOBS
Respect the jobs limit for cargo builds by setting CARGO_BUILD_JOBS.

Also bump the default number of jobs to number of cpu cores
2021-04-23 09:52:04 +02:00
Bart Ribbers
65c9a3d8e5 newapkbuild: use pytest for Python tests 2021-04-20 15:08:36 +00:00
Natanael Copa
281720ec39 abuild-fetch: aquire a second lock using flock(2)
It seems that POSIX record lock does not work across namespaces. Use a
second lock using flock.

see https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10026
2021-04-20 17:05:40 +02:00
Natanael Copa
1772495d29 abuild-fetch: refactor move locking logic to a func
make code more readable by move the locking/unlocking to its own
functions.
2021-04-20 16:58:02 +02:00
Natanael Copa
d05dd6d9bd tests: abuild: fix test to work with busybox sha512sum
busybox is picky with the spaces in the checksum file.
2021-04-20 16:34:41 +02:00
Natanael Copa
b4d975a11f tests: add missing test for invalid filename
fixes commit f35f2aa859 (abuild: add test for invalid filenames)
2021-04-20 16:21:33 +02:00
Natanael Copa
77c21fab30 tests: abuild-fetch test http:// 2021-04-20 13:05:09 +02:00
Natanael Copa
42a45c9cbc abuild-fetch: mention -k toption for insecure in usage 2021-04-20 12:58:32 +02:00
Natanael Copa
e2882e4371 tests: abuild-fetch: add test for file locking
make curl block via a fifo, so we can simulate that it is downloading.
when we want fake that curl is done with the download we write to the
fifo.

We then check that a second invocation of abuild-fetch will block til
the first one is done.
2021-04-20 12:44:38 +02:00
Natanael Copa
e8cfedc2b3 tests: abuild: test checksum generation 2021-04-20 11:37:13 +02:00
Natanael Copa
cb9ac5be89 tests: abuild-fetch: test wget fallback
if curl is unavailable wget should be called
2021-04-20 11:26:19 +02:00
Natanael Copa
d708a813a3 tests: add tests for abuild-fetch 2021-04-20 11:16:23 +02:00
Alex Xu (Hello71)
4e548b722b abuild.conf: LDFLAGS+=-O1,--sort-common
These options are used by default in Arch Linux [0], and slightly reduce
binary size.

Note that -D_FORTIFY_SOURCE=2 and -z relro -z now are already enabled by
default in Alpine for all gcc invocations.

[0] https://git.archlinux.org/svntogit/packages.git/tree/trunk/makepkg.conf?h=packages/pacman
2021-04-12 15:06:31 +00:00
Wolf
f523aabce3 Add new lines around the checksums in APKBUILD
In order to make diffs more tidy and the APKBUILD overall more visually
pleasing, new lines are added after opening and before closing quote,
turning

sha512sums="HASH  foo
HASH  bar"

into

sha512sums="
HASH  foo
HASH  bar
"

therefore keeping alignment of file names.
2021-04-12 15:03:02 +00:00
Luca Weiss
f92b56d8c9 newapkbuild: generate check for meson
The function already exists but it was never called.
2021-04-12 15:02:18 +00:00
Luca Weiss
05d36a90ce newapkbuild: escape meson variables
Otherwise we'll generate e.g. 'meson compile -j 7 -C output'
2021-04-12 15:02:18 +00:00
Timothy Legge
3af74788bb apkbuild-cpan.in: package sort order on upgrade 2021-04-04 00:27:34 -03:00
Timothy Legge
775efcf61d apkbuild-cpan.in: fix formatting issue on upgrade 2021-04-04 00:25:47 -03:00
Timothy Legge
b699730091 apkbuild-cpan.in: Fixes #9994 mod version with non-numeric 2021-02-16 02:28:04 +00:00
Timothy Legge
802822f57e apkbuild-cpan.in fix format_deps issues 2021-02-16 02:27:57 +00:00
Timothy Legge
8cbd4a6ac2 apkbuild-cpan.in: Fixes #10010 - might create duplicate perl-module-build deps 2021-02-15 02:29:00 +00:00
Timothy Legge
b7196278b1 apkbuild-cpan.in: Fixes #10025 - invalid 'Duplicate' removed 2021-02-15 01:21:18 +00:00
Natanael Copa
f35f2aa859 abuild: add test for invalid filenames
reject filenames with newlines

fixes #10024
2021-02-04 14:44:16 +01:00
Timothy Legge
9246fbc8b4 apkbuild-pypi.in: remove empty variables 2021-01-23 20:43:26 +00:00
Timothy Legge
82b4d9bf43 apkbuild-pypi.in: Updates to fix some issues 2021-01-22 21:20:36 -04:00
Natanael Copa
7e754436f1 tests: don't read /etc/abuild.conf
Host's /etc/abuild.conf may enable USE_CCACHE which will pull in ccaches
as makedepends which breaks the tests.

fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10017
2021-01-07 15:21:03 +01:00
Timothy Legge
c1dadac7d3 apkbuild-cpan.in: only wrap lines greater than set 2021-01-07 14:06:35 +00:00
Timothy Legge
4544a479d1 apkbuild-cpan.in: remove duplicates from each of depends 2021-01-07 14:06:35 +00:00