Commit Graph

36 Commits

Author SHA1 Message Date
psykose 446b68359f tests: make sure move_caches tests don't fail with envs set 2023-06-26 10:33:40 +02:00
Jakub Panek c26043748e abuild: fix completions to vendor dir, warn on incorrect dir
Signed-off-by: Jakub Panek <me@panekj.dev>
2023-06-22 04:08:05 +00:00
ptrcnull d27b635768 abuild: set cache directories to a temporary directory if MOVE_CACHES is set
this allows for isolating cache directories per package
2023-06-22 05:33:59 +02:00
psykose 8f41a924e3 abuild: fix cmd: provides to not provide directory names
/usr/bin/somedirectory/ was providing cmd:somedirectory, because dirs
have +x.
2023-06-15 14:37:24 +02:00
Sören Tempel 4a2a0337d0 abuild: Scan for binaries with extra setcap(8) capabilities
Similar to suid binaries, abuild will now error out if the package
includes binaries with setcap(8) capabilities but doesn't have `setcap`
in `$options`. This eases identifying package which ship binaries
with extra capabilities.

Furthermore, if these binaries are executable by others a warning is
emitted. This warning could be changed to an error in the future.
The recommendation is to make such binaries only executable by owner
and group, thereby requiring the system administrator to explicitly
add users to a specific group in order to give them accesses to these
capabilities.

See: https://gitlab.alpinelinux.org/alpine/tsc/-/issues/45

Discussion: This change requires abuild to depend on the `libcap`
package for the `getcap` binary. It does not seem to be possible
at the moment to use scanelf(1) to identify these binaries.
2022-07-03 14:30:15 +02:00
Sören Tempel e2ab6219d3 abuild: Warn if -doc subpackage exceeds a certain threshold
In the warning, suggest splitting the -doc subpackage into additional
smaller packages (which are not pulled in by the `docs` meta package).

Fixes https://gitlab.alpinelinux.org/alpine/tsc/-/issues/16
2023-06-03 10:55:12 +00:00
Natanael Copa b24bc33446 abuild: warn if pycache is found
and add tests for -pyc package split
2023-04-18 13:27:51 +00:00
Marian Buschsieweke 6806a0d39b abuild: scan for python3 version requirements
Packages installing python3 site packages for python3 in version 3.x.y
depend on python3~3.x. This automatically adds the required
dependencies.

Unit test cases have been added by reusing the `py3-foo-and-bar` test
package. However, the path of that has been renamed to contain spaces
to be extra sure the logic is safe in regrade to spaces in path
names.
2023-04-18 09:26:12 +00:00
psykose af88d534d3 Revert "abuild: prune python cache dirs by default"
This reverts commit 489fc06e40.

this needs way more thought to work, see
32f314f8076d509bd4c541b1d250b3744947867f in aports

we should probably just create *-pyc splits instead. these
won't reduce mirror size, but at least allow easily uninstalling the cache.
2023-04-14 16:31:54 +02:00
psykose 489fc06e40 abuild: prune python cache dirs by default
these will be generated post-install in a hook.

ref https://gitlab.alpinelinux.org/alpine/aports/-/issues/11906
2023-04-14 08:56:48 +00:00
Natanael Copa 396e6e2737 abuild: add support for -devhelp subpackges
fixes https://gitlab.alpinelinux.org/alpine/abuild/-/merge_requests/87
2023-04-14 08:44:48 +00:00
Marian Buschsieweke 10b4e8e8bd abuild: Fix building with spaces in path 2023-04-14 06:03:17 +00:00
Natanael Copa 16febc41a2 abuild: warn when p in pkgver should be _p
we have for example had sudo 1.9.5p2 which should have been
1.9.5_p2. Show a warning to avoid this in the future.
2023-04-07 11:27:09 +00:00
Natanael Copa e8c1ce6127 abuild: fix cleanoldpkg
we should only delete packages of the specified architecture

fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10078
2022-12-06 16:59:03 +01:00
Natanael Copa ee13f777d5 abuild: fix check of maintainer address
Also disallow leading and trailing spaces/quotes.

fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10080
2022-12-02 16:44:53 +01:00
Natanael Copa 21880d296a abuild: add test for -dev subpackage 2022-12-01 15:53:43 +01:00
Natanael Copa b253118cca abuild: add test for -doc subpackages 2022-12-01 15:46:03 +01:00
Natanael Copa 5c542377a8 abuild: fix amove corner cases
fix `amove dir` (without leading or trailing /)

add various testcases for amove
2022-09-23 12:31:56 +02:00
psykose 927f14f6b3
abuild: fix package size for script-only packages 2022-08-05 16:00:36 +02:00
ptrcnull 33ce0536ef
abuild: set GIT_CEILING_DIRECTORIES before running prepare/build/check/package 2022-06-22 17:50:38 +02:00
Natanael Copa 36e1d04f06 tests: abuild: dont copy keys in global scope
this makes it copy keys when generating the list of tests
2022-06-22 16:13:07 +02:00
Natanael Copa 709235bc82 tests: abuild: port mutiline license test 2022-06-22 16:13:07 +02:00
Natanael Copa bd84b91ba9 test: abuild: port invalid pkgname/subpkgname/subpkgversion 2022-06-22 16:13:07 +02:00
Natanael Copa 07894fa745 tests: abuild: port invalid-initd test 2022-06-22 16:13:07 +02:00
Natanael Copa 30b493d4b2 tests: abuild: port and fix py provides generation 2022-06-22 16:13:07 +02:00
Natanael Copa ca29f73dfe tests: abuild: port subpkg-dep-leak test 2022-06-22 16:13:07 +02:00
Natanael Copa 9c67324854 tests: abuild: port duplicate checksum test 2022-06-22 16:13:07 +02:00
Natanael Copa e684847caf tests: add test for checksum generation 2022-06-22 16:13:07 +02:00
Natanael Copa 2e3816d08c tests: abuild: port reproducible build test 2022-06-22 16:13:07 +02:00
Natanael Copa f932f3d32a tests: abuild: add tests for dbg subpackage
Apparently tmpfs does not support extended attributes user namespace, so
ddrop the SETFATTR=false test.
2022-06-22 16:13:07 +02:00
Natanael Copa 35592db050 tests: abuild: add lib64 tests 2022-06-22 16:13:07 +02:00
Natanael Copa 1b66d65805 tests: abuild: add test for invalid filename 2022-06-22 16:13:07 +02:00
Natanael Copa 1913c6929c tests: refacgor abuild build failure 2022-06-22 16:13:07 +02:00
Natanael Copa 209ad1f6ab tests: abuild: add test for simple build 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